html_templates := $(wildcard templates/*.html)
css_templates := $(wildcard templates/*.css)
png_templates := $(wildcard templates/*.png)
macro_files := $(patsubst %,templates/%,header footer header.de footer.de)
html_files := $(patsubst templates/%,%,$(html_templates))
css_files := $(patsubst templates/%,%,$(css_templates))
png_files := $(patsubst templates/%,%,$(png_templates))
all: $(html_files) $(css_files) $(png_files)
%.html: templates/%.html $(macro_files)
rm -f $@; tpage --include_path=templates $< >$@ || (rm -f $@; exit 1)
%.css: templates/%.css
rm -f $@; cp -f $< $@
%.png: templates/%.png
rm -f $@; cp -f $< $@
clean:
rm -f $(html_files) $(css_files) $(png_files)
.PHONY: all clean