summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 86f6bdafa659b9c5513dfbf234e135b432dc30a9 (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
# $Id$

chapters = chapter_*.xml

book.html: build.sh main.xml $(chapters)
	sh build.sh && \
	ls -l $@

book.pdf: main.xml $(chapters) .dblatex
	dblatex \
		--pdf \
		-x'-xinclude' \
		-o $@ \
		$<

view.pdf: book.pdf
	xdg-open $<

view.html: book.html
	xdg-open $<

.dblatex:
	$(shell which dblatex 2>/dev/null || echo "ERROR: 'dblatex' REQUIRED, SEE http://github.com/vbatts/SlackBuilds/ FOR THE SlackBuild")


.PHONY: clean
clean:
	rm -f book.html book.pdf

.DEFAULT_GOAL := book.html