mirror of https://github.com/c3d2/slidenado/
Makefile
* clean didnt work for me, TARGET with "ALL" did not list files for `rm` - fixes #1 for me * added error reporting in case interpreter or script is missing * enabled adding new scripts for other interpreters later, e.g. python implementation of generator; so users do not need to install ruby
This commit is contained in:
parent
169e8795f8
commit
12836aa730
13
Makefile
13
Makefile
|
@ -1,15 +1,18 @@
|
|||
TARGETS=$(patsubst dates/%.yaml, dates/%/ALL, $(wildcard dates/*.yaml))
|
||||
ALL: ${TARGETS}
|
||||
GENERATOR='./generate.rb'
|
||||
|
||||
MAKE_TARGETS=$(patsubst dates/%.yaml, dates/%/ALL, $(wildcard dates/*.yaml))
|
||||
CLEAN_TARGETS=$(patsubst dates/%.yaml, dates/%/*, $(wildcard dates/*.yaml))
|
||||
ALL: ${MAKE_TARGETS}
|
||||
|
||||
clean:
|
||||
rm -rf ${TARGETS}
|
||||
rm -rf ${CLEAN_TARGETS}
|
||||
|
||||
# Keep Makefiles
|
||||
.SECONDARY: $(patsubst dates/%/ALL, dates/%/Makefile, $(TARGETS))
|
||||
.SECONDARY: $(patsubst dates/%/ALL, dates/%/Makefile, $(MAKE_TARGETS))
|
||||
|
||||
dates/%/Makefile: dates/%.yaml $(wildcard decks/*.yaml)
|
||||
mkdir -p $(shell dirname $@)
|
||||
./generate.rb $< $(shell dirname $@)
|
||||
$(GENERATOR) $< $(shell dirname $@) || printf "\033[1;31minterpreter or script missing\033[0m\n"
|
||||
|
||||
dates/%/ALL: dates/%/Makefile
|
||||
$(MAKE) -C $(shell dirname $@)
|
||||
|
|
Loading…
Reference in New Issue