From 4e65733a77946659116a8930b960e85752bcfb23 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Wed, 5 Apr 2017 19:43:21 +0200 Subject: Expand form targets using make wildcard (not find). --- Makefile | 7 ++++--- 1 file 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 -- cgit v1.2.3