various small changes
[~bandali/bndl.org] / GNUmakefile
... / ...
CommitLineData
1SRC := $(filter-out $(wildcard meta_*), $(wildcard *.m4))
2OUTPUTS := $(patsubst %.m4,out/%.html, $(SRC))
3STATIC := $(patsubst static/%,out/%, $(filter-out static/GNUmakefile, $(wildcard static/* static/.*)))
4
5all: $(OUTPUTS) out/notes.atom out/notes.rss out/style.css out/GNUmakefile $(STATIC)
6
7out/%.html: %.m4 header.html footer.html
8 @mkdir -p $(@D)
9 m4 $< > $@
10out/notes.atom: meta_feed_atom.m4 ; m4 $< > $@
11out/notes.rss: meta_feed_rss.m4 ; m4 $< > $@
12out/GNUmakefile: GNUmakefile ; ln -s $(PWD)/$< $@
13$(STATIC): ; ln -s $(PWD)/static/$(@F) $@
14
15# publications bibliography
16static/publications-partial.html: static/bandali.bib static/bandali-bib-*
17static/publications-partial.html: $(filter-out static/publications-partial.html, $(wildcard static/publications-*))
18static/publications-partial.html:
19 $(MAKE) -C $(@D) $(@F)
20out/publications.html: static/publications-partial.html
21out/bandali-bib.html: static/bandali-bib-partial.html
22
23clean:
24 rm -rf out/
25
26deploy:
27 rsync -avzLP out/ abandali@bndl.org:www/bndl.org/
28 ssh abandali@bndl.org mv www/bndl.org/.htaccess-www www/.htaccess
29
30watch:
31 while true; do \
32 echo $(SRC) header.html footer.html \
33 static/bandali.bib static/bandali-bib-* static/publications-* \
34 GNUmakefile static/GNUmakefile | \
35 tr " " "\n" | entr -d make; done
36
37.PHONY: deploy watch