ref: 991f5e738ea8d43c3d7c5d0a6f43e1d3edcf2970
parent: ffd25b0fe6bb63bd4b94a4187ffc8442f7a3c3cb
author: Tor Andersson <[email protected]>
date: Tue Sep 5 11:33:12 EDT 2017
Add 'make watch' target. Requires the inotify-tools package on linux, and allows automatic rebuilds when the source is modified.
--- a/Makefile
+++ b/Makefile
@@ -82,6 +82,9 @@
@ echo >> $@ Libs: -L$(libdir) -lmujs
@ echo >> $@ Libs.private: -lm
+watch:
+ @ while ! inotifywait -q -e modify $(SRCS) $(HDRS) ; do time -p $(MAKE) ; done
+
install-common: release
install -d $(DESTDIR)$(incdir)
install -d $(DESTDIR)$(libdir)