Minify HTML templates upon compiling program.
@@ -33,11 +33,13 @@ CLEANFILES = \
src/d3js.h \
src/hoganjs.h \
src/chartsjs.h \
- src/appjs.h
+ src/appjs.h \
+ resources/tpls.html.tmp
# Tpls
tpls.h: bin2c$(EXEEXT) resources/tpls.html
- ./bin2c resources/tpls.html src/tpls.h tpls
+ cat resources/tpls.html | sed "s/^[ \t]*//" | sed "/^$$/d" | tr -d "\r\n" > resources/tpls.html.tmp
+ ./bin2c resources/tpls.html.tmp src/tpls.h tpls
# Bootstrap
bootstrapcss.h: bin2c$(EXEEXT) resources/css/bootstrap.min.css
./bin2c resources/css/bootstrap.min.css src/bootstrapcss.h bootstrap_css
