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