summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2017-04-18 21:31:07 +0200
committerJonas Smedegaard <dr@jones.dk>2017-04-18 21:31:07 +0200
commite2f4e305e3f009ecb49b5c87a49c86978f3bdc27 (patch)
treecbb732a047ac20598309fc3b4bc89f24be50c5ee /Makefile
parentb7ae373ec3c81232dfb23cf7e4417a7718af2833 (diff)
parentdf80b903ce93295c030f2a185d68686216cbdb3b (diff)
Merge branch 'master' into plaintitleplaintitle
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 10 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 4217275..1611825 100644
--- a/Makefile
+++ b/Makefile
@@ -54,9 +54,16 @@ content:
build:
$(if $(cssprojects),$(MAKE) $(cssprojects))
+ set -e;\
$(foreach config,$(shell find config -name '*.setup'),ikiwiki --setup $(config)$(avoid-broken-git)$(if $(always-make), --rebuild, --refresh);)
- $(if $(wildcard forms),cd forms && find * -name '*.cgi' \
- -exec install -DT '{}' ../build/forms/'{}' ';' \
- -exec perl -i -pe "s:'../build':'$(CURDIR)/build':g" ../build/forms/'{}' ';')
+ 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)';\
+ $(foreach htmlstempath,$(path:%.cgi=build/html/%),\
+ cp -f $(htmlstempath).html $(htmlstempath).tmpl;\
+ FORMBUILDER_NOHEADER=1 'build/forms/$(path)' > $(htmlstempath).html~;\
+ mv -f $(htmlstempath).html~ $(htmlstempath).html;\
+ rm $(htmlstempath).tmpl))
.PHONY: all build configfiles