Created
November 14, 2014 02:29
-
-
Save automaticgiant/3a8c826c26a6d2e5654c to your computer and use it in GitHub Desktop.
make watch with inotifywait
This file contains hidden or 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
CPPFLAGS ::= -std=c++11 -Wall -Werror | |
tests ::= $(shell ls tests/*.cpp) | |
objects ::= $(tests:.cpp=.o) | |
compile: clean $(objects) | |
%.o: %.cpp $(corecpp) | |
@g++ $(CPPFLAGS) $< -o $@ | |
@chmod +x $@ | |
@tests/test_runner.sh $@ | |
clean: | |
@rm -f tests/*.o | |
watch: | |
while true; do \ | |
inotifywait --event MODIFY -q -r *.h tests @*.o; \ | |
make; \ | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment