Makefile: incremental builds 🎉
This commit is contained in:
parent
4cd7b8b118
commit
8890abfbf6
28
Makefile
28
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 $< > $@
|
||||
|
|
Loading…
Reference in New Issue