1
0

standard make rules: watch, auto

This commit is contained in:
Simon Michael
2019-11-03 10:39:52 -08:00
parent 95a8ee735e
commit 35e3ba839c

View File

@@ -11,7 +11,7 @@ PANDOC=pandoc -f markdown-smart+autolink_bare_uris
$(PANDOC) --template index.tmpl $< -o $@ $(PANDOC) --template index.tmpl $< -o $@
# regenerate html whenever an md file changes # regenerate html whenever an md file changes
html-auto: html-auto auto:
ls *.md | entr make html ls *.md | entr make html
BROWSE=open BROWSE=open
@@ -22,7 +22,7 @@ LIVERELOAD=livereloadx -p $(LIVERELOADPORT) -s
# A reload happens at the end when the css/js files get copied. # A reload happens at the end when the css/js files get copied.
# Auto-regenerate html, and watch changes in a new browser window. # Auto-regenerate html, and watch changes in a new browser window.
html-watch: html-watch watch:
make html-auto & make html-auto &
(sleep 1; $(BROWSE) http://localhost:$(LIVERELOADPORT)/) & (sleep 1; $(BROWSE) http://localhost:$(LIVERELOADPORT)/) &
$(LIVERELOAD) . $(LIVERELOAD) .