Makefile: use $(shell ..) instead of `..`

This commit is contained in:
Astro 2016-09-19 23:31:22 +02:00
parent 63bb96e50b
commit 706886b966
1 changed files with 10 additions and 5 deletions

View File

@ -1,10 +1,15 @@
TARGETS=$(patsubst dates/%.yaml, dates/%, $(wildcard dates/*.yaml))
TARGETS=$(patsubst dates/%.yaml, dates/%/ALL, $(wildcard dates/*.yaml))
ALL: ${TARGETS}
clean:
rm -rf ${TARGETS}
dates/%:
mkdir -p $@
./generate.rb $@.yaml $@
$(MAKE) -C $@
# Keep Makefiles
.SECONDARY: $(patsubst dates/%/ALL, dates/%/Makefile, $(TARGETS))
dates/%/Makefile: dates/%.yaml $(wildcard decks/*.yaml)
mkdir -p $(shell dirname $@)
./generate.rb $< $(shell dirname $@)
dates/%/ALL: dates/%/Makefile
$(MAKE) -C $(shell dirname $@) $(shell basename $@)