I ran into this useful tip that if you\'re working on files a lot and you want them to build automatically you run:
watch make
And it re-runs make every couple s
Using classic gnu make and inotifywait, without interval-based polling:
make
inotifywait
watch: while true; do \ make $(WATCHMAKE); \ inotifywait -qre close_write .; \ done
This way make is triggered on every file write in the current directory tree. You can specify the target by running
make watch WATCHMAKE=foo