Skip to content

Instantly share code, notes, and snippets.

@automaticgiant
Created November 14, 2014 02:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save automaticgiant/3a8c826c26a6d2e5654c to your computer and use it in GitHub Desktop.
Save automaticgiant/3a8c826c26a6d2e5654c to your computer and use it in GitHub Desktop.
make watch with inotifywait
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