diff --git a/Makefile b/Makefile index f785812..1cc0e55 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,23 @@ -PAGES = index.html rules.html donate.html +PAGES_SRC = index.html rules.html donate.html +PAGES_BUILD = $(addprefix build/tor/,$(PAGES_SRC)) $(addprefix build/clearnet/,$(PAGES_SRC)) -all: $(PAGES) symlinks +all: $(PAGES_BUILD) symlinks -.PHONY: symlinks clean +.PHONY: clean -symlinks: - ln -sf ../../static build/tor/ - ln -sf ../../static build/clearnet/ +symlinks: build/tor/static build/clearnet/static + +build/tor/static: + ln -s ../../static build/tor/ + +build/clearnet/static: + ln -s ../../static build/clearnet/ clean: - rm -f $(addprefix build/tor/,$(PAGES)) - rm -f $(addprefix build/clearnet/,$(PAGES)) + rm -rf $(PAGES_BUILD) -%.html: %.j2.html base.j2.html - j2 -D site tor $< > build/tor/$@ - j2 -D site clearnet $< > build/clearnet/$@ +build/tor/%.html: %.j2.html base.j2.html + j2 -D site tor $< > $@ + +build/clearnet/%.html: %.j2.html base.j2.html + j2 -D site clearnet $< > $@