slidenado/Makefile

21 lines
669 B
Makefile
Raw Normal View History

INTERPRETER := ruby
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}
2016-07-06 19:48:52 +02:00
clean:
rm -rf ${CLEAN_TARGETS}
2016-07-06 19:48:52 +02:00
# Keep Makefiles
.SECONDARY: $(patsubst dates/%/ALL, dates/%/Makefile, $(MAKE_TARGETS))
dates/%/Makefile: dates/%.yaml $(wildcard decks/*.yaml)
mkdir -p $(shell dirname $@)
command -v $(INTERPRETER) || (printf "Could not find '%s' Please install or add it to PATH!\n" $(INTERPRETER); exit 1)
$(INTERPRETER) $(GENERATOR) $< $(shell dirname $@)
dates/%/ALL: dates/%/Makefile
2016-09-20 02:05:17 +02:00
$(MAKE) -C $(shell dirname $@)