diff options
author | Jonas Smedegaard <dr@jones.dk> | 2017-04-05 20:21:07 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2017-04-05 20:21:07 +0200 |
commit | e13e7ae2bf9ae571d02a64c4b6dd5eca646e39e4 (patch) | |
tree | d19f529116515a11c3ca95ac2db0df5259d92c3a /Makefile | |
parent | 4e65733a77946659116a8930b960e85752bcfb23 (diff) |
Inject forms into built pages.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -58,6 +58,9 @@ build: set -e;\ $(foreach path,$(patsubst forms/%,%,$(wildcard forms/*.cgi forms/*/*.cgi)),\ install -DT 'forms/$(path)' 'build/forms/$(path)'; \ - perl -i -pe "s:'../build':'$(CURDIR)/build':g" 'build/forms/$(path)';) + perl -i -pe "s:'../build':'$(CURDIR)/build':g" 'build/forms/$(path)';\ + $(foreach htmlstempath,$(path:%.cgi=build/html/%),\ + $(if $(wildcard $(htmlstempath).tmpl),,cp $(htmlstempath).html $(htmlstempath).tmpl;)\ + 'build/forms/$(path)' > $(htmlstempath).html)) .PHONY: all build configfiles |