From e13e7ae2bf9ae571d02a64c4b6dd5eca646e39e4 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Wed, 5 Apr 2017 20:21:07 +0200 Subject: Inject forms into built pages. --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index adedae8..59c7274 100644 --- a/Makefile +++ b/Makefile @@ -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 -- cgit v1.2.3