diff options
author | Jonas Smedegaard <dr@jones.dk> | 2017-04-05 19:43:21 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2017-04-05 19:43:21 +0200 |
commit | 4e65733a77946659116a8930b960e85752bcfb23 (patch) | |
tree | c9d33609e36c361b2f24d14c530c9207da20cdf9 | |
parent | 3b7c98ad14993b476ca4b4ae234e2caa9682b3e5 (diff) |
Expand form targets using make wildcard (not find).
-rw-r--r-- | Makefile | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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 |