3 ms·
You might also like this "make watcher" hack for continuous builds: while true; do make -q || make; sleep 0.5; done https://stackoverflow.com/a/48496716 https
by chr15m 3y ago
You might also like this "make watcher" hack for continuous builds:
while true; do make -q || make; sleep 0.5; done
https://stackoverflow.com/a/48496716 https://stackoverflow.com/a/48496716
- norir 3y agoNice quick and dirty hack, but the latency isn't great and it will hammer the file system in large projects calculating time stamps. It's especially bad on windows although polling on mac has also historically been rather expensive (linux is better in this regard though polling still isn't free). I'd much rather install entr if it's available and do something like `ls ** | entr -c make`
- ChickeNES 3y agoOr even better, fswatch (https://github.com/emcrisostomo/fswatch https://github.com/emcrisostomo/fswatch) which works on Linux, BSDs, macOS, Windows, and even Solaris
- buserror 3y agoTHIS is the lightest way to have continuous make, without wasting cycles and hammering the file system. inotifywait is a pretty standard tool that does exactly what's needed. watch : while true; do \ clear; $(MAKE) -j all tests; \ inotifywait -qre close_write src tests; \ done