Last active
May 8, 2020 14:25
-
-
Save Terminus-IMRC/3e6b9e8bc5ca8160a1c72acc87c51182 to your computer and use it in GitHub Desktop.
An infinite loop in Makefile with remaking rules
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(info ** Remaking: MAKE_RESTARTS=$(MAKE_RESTARTS) **) | |
# | |
# If WAIT >= t, this Makefile will loop infinitely. | |
# If WAIT < t, it won't loop infinitely due to filesystem's time resolution. | |
# +------------+------+ | |
# | Filesystem | t | | |
# +------------+------+ | |
# | ext4 | 0.01 | | |
# | hfsplus | 1 | | |
# +------------+------+ | |
# | |
WAIT = 1 | |
.PRECIOUS: Makefile | |
Makefile: FORCE | |
touch $@ | |
sleep $(WAIT) | |
.PHONY: FORCE | |
FORCE: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment