# -*- make -*- # (C) 2013 by Eugeniy Mikhailov, CLEAN_TARGETS += clean_rem REAL_CLEAN_TARGETS += real_clean_rem dest_dir_rem ?= $(dest_dir) destination_dirs += $(dest_dir_rem) rem_files = $(wildcard *.rem) html_from_rem = $(rem_files:%.rem=%.html) html_from_rem_dest_targets = $(html_from_rem:%=$(dest_dir_rem)/%) html_rem: $(html_from_rem) $(html_from_rem): %.html : %.rem remind -p5 -iclass_starts='date($(CLASS_STARTING_YEAR),$(CLASS_STARTING_MONTH),$(CLASS_STARTING_DAY))' $< $(CLASS_STARTING_YEAR)/$(CLASS_STARTING_MONTH)/$(CLASS_STARTING_DAY) | ./bin/rem2html -title "Calendar" | \ sed 's//\n/' | \ cat > $@ clean_rem: real_clean_rem: ifneq ($(strip $(html_from_rem)),) rm -f $(html_from_rem) endif install_html_from_rem: $(html_from_rem_dest_targets) $(html_from_rem_dest_targets): $(dest_dir_rem)/% : % | $(dest_dir_rem) ifneq ($(strip $(html_from_rem)),) $(INSTALL) -m 0644 '$<' '$@' endif