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} ALL: ${TARGETS}
clean: clean:
rm -rf ${TARGETS} rm -rf ${TARGETS}
dates/%: # Keep Makefiles
mkdir -p $@ .SECONDARY: $(patsubst dates/%/ALL, dates/%/Makefile, $(TARGETS))
./generate.rb $@.yaml $@
$(MAKE) -C $@ 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 $@)