diff options
author | Jonas Smedegaard <dr@jones.dk> | 2017-04-18 21:30:48 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2017-04-18 21:30:48 +0200 |
commit | 1de0bbdfe8c79a12a5cc7ac5e1ee88543799d3ed (patch) | |
tree | 35e329ba623c40ad878aae3e4b28f259f962c3ee /Makefile | |
parent | 7eb99fe346c4b2474467d918953326bd81b0462c (diff) | |
parent | df80b903ce93295c030f2a185d68686216cbdb3b (diff) |
Merge branch 'master' into master-damaster-da
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -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 |