minor edit
[thefekete.net.git] / Makefile
1 M=$(wildcard *.md)
2 H=$(patsubst %.md,build/%.html,$M)
3 L=img/
4
5 all: $H
6
7 build/:
8 mkdir -p $@
9
10 build/%.html: %.md build/ Makefile
11 markdown $< >$@
12 cp -a $L build/
13
14 view:
15 xdg-open build/index.html
16
17 publish: all
18 @git diff-index --quiet HEAD -- && test -z "$(git ls-files --others)" || ( \
19 1>&2 echo "Index is dirty or there are uncommitted files!"; \
20 git status; \
21 exit 1; \
22 )
23 rsync -vha --delete build/ root@thefekete.net:/var/www/thefekete.net/
24
25 clean:
26 rm -rfv build/
27
28 .PHONY: all publish view clean