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