summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2017-04-05 19:43:21 +0200
committerJonas Smedegaard <dr@jones.dk>2017-04-05 19:43:21 +0200
commit4e65733a77946659116a8930b960e85752bcfb23 (patch)
treec9d33609e36c361b2f24d14c530c9207da20cdf9
parent3b7c98ad14993b476ca4b4ae234e2caa9682b3e5 (diff)
Expand form targets using make wildcard (not find).
-rw-r--r--Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 4217275..adedae8 100644
--- a/Makefile
+++ b/Makefile
@@ -55,8 +55,9 @@ content:
build:
$(if $(cssprojects),$(MAKE) $(cssprojects))
$(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)';)
.PHONY: all build configfiles