Commit | Line | Data |
---|---|---|
64864447 | 1 | SRC := $(filter-out $(wildcard meta_*), $(wildcard *.m4 fsf-internship/*.m4)) |
8c1ba2f2 | 2 | OUTPUTS := $(patsubst %.m4,out/%.html, $(SRC)) |
842b89b2 | 3 | STATIC := $(patsubst static/%,out/%, $(wildcard static/* static/.*)) |
38037201 | 4 | |
066f7565 | 5 | all: $(OUTPUTS) out/notes.atom out/notes.rss out/style.css $(STATIC) |
38037201 | 6 | |
d9462d28 AB |
7 | out/%.html: %.m4 header.html footer.html |
8 | @mkdir -p $(@D) | |
9 | m4 $< > $@ | |
466a17dd AB |
10 | out/notes.atom: meta_feed_atom.m4 ; m4 $< > $@ |
11 | out/notes.rss: meta_feed_rss.m4 ; m4 $< > $@ | |
8c1ba2f2 AB |
12 | $(STATIC): ; ln -s $(PWD)/static/$(@F) $@ |
13 | ||
14 | # publications bibliography | |
842b89b2 | 15 | static/publications-partial.html: static/bandali.bib static/bandali-bib-* |
64864447 | 16 | static/publications-partial.html: $(filter-out static/publications-partial.html, $(wildcard static/publications-*)) |
842b89b2 | 17 | static/publications-partial.html: |
8c1ba2f2 | 18 | $(MAKE) -C $(@D) $(@F) |
842b89b2 AB |
19 | out/publications.html: static/publications-partial.html |
20 | out/bandali-bib.html: static/bandali-bib-partial.html | |
38037201 | 21 | |
d9462d28 AB |
22 | clean: |
23 | rm -rf out/ | |
24 | ||
38037201 | 25 | deploy: |
3fdab855 AB |
26 | rsync -avzLP out/ abandali@bndl.org:www/site/ |
27 | ssh abandali@bndl.org mv www/site/.htaccess-www www/.htaccess | |
e4b339cf | 28 | |
8c1ba2f2 AB |
29 | watch: |
30 | while true; do \ | |
31 | echo $(SRC) header.html footer.html \ | |
842b89b2 | 32 | static/bandali.bib static/bandali-bib-* static/publications-* \ |
8c1ba2f2 AB |
33 | Makefile static/Makefile | \ |
34 | tr " " "\n" | entr -d make; done | |
35 | ||
36 | .PHONY: deploy watch |