summaryrefslogtreecommitdiffhomepage
path: root/doc/web/makefile
blob: 801b56cbb7e3728e3faa913d296be572c9897570 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
index.src = ../../readme.md
index = readme.md
releases = ../../changelog.md
css = xmobar.css
images = ../screenshots/xmobar-bottom.png ../screenshots/xmobar-top.png \
         ../screenshots/xmobar-exwm.png
remote = root@xmobar.org:/var/www/xmobar.org/
htmls = index.html releases.html
title = % xmobar - a minimalistic status bar

default: index.html

$(index): $(index.src)
	@tail -n+3 $(index.src) | sed "1s/^/$(title)\n/" > $(index)

index.html: changelog.html $(index) $(css)
	pandoc -f markdown -t html -c $(css) -N -s \
               $(index) > index.html

changelog.html: $(releases) $(css)
	pandoc -f markdown -t html -c $(css) -s \
               $(releases) > changelog.html

upload-images:
	rsync -zav $(images) $(remote)/doc/screenshots

upload-changes: changelog.html
	scp changelog.html $(remote)

upload-pages: $(htmls)
	scp $(htmls) $(css) $(remote)

upload: upload-images upload-pages

clean:
	rm -f $(htmls) $(index) *.png