forked from gitbuch/gitbuch_cc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
43 lines (33 loc) · 1.63 KB
/
Makefile
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
37
38
39
40
41
42
43
default: git.chunked
all: git.chunked git.html
git.txt: advanced.txt automatisierung.txt erste_schritte.txt gitdir.txt \
github.txt grundlagen.txt installation.txt praxis.txt remote.txt \
server.txt shell.txt vorwort.txt workflows.txt zusammenspiel.txt
touch $@
git.html: git.txt asciidoc.conf
asciidoc -a numbered -a data-uri -a toclevels=3 $<
# ARE YOU OUT OF YOUR MIND? ARE YOU NOT CAPABLE OF WRITING UTTERLY
# SIMPLE XSL TEMPLATES TO ACHIEVE THIS SIMPLE THING? –– No. I’ve tried and failed.
styles/toc.html: git.chunked-prereq
( cat styles/toc.before.html; \
xmllint --html --xpath '//div[@class="toc"]/dl[@class="toc"]' git.chunked/index.html; \
cat styles/toc.after.html ) > $@
git.chunked-prereq: git.txt styles asciidoc.conf
rm -f styles/toc.html
a2x -f chunked --xsl-file styles/chunked.xsl --resource styles --stylesheet=gitbuch.css git.txt
git.chunked: git.chunked-prereq styles/toc.html
a2x -f chunked --xsl-file styles/chunked.xsl --resource styles --stylesheet=gitbuch.css git.txt
epub: git.epub
git.epub: git.txt
a2x -fepub --stylesheet="docbook-xsl.css styles/ebook.css" --epubcheck $<
pdf: git.pdf
git.pdf: git.txt styles/dblatex.sty
a2x -fpdf --dblatex-opts "-P latex.output.revhistory=0 \
-P doc.publisher.show=0 \
-P latex.class.book=book \
-P geometry.options=margin=3cm \
-P latex.class.options=12pt \
-s styles/dblatex.sty" \
--asciidoc-opts="-f asciidoc-pdf.conf" $<
clean:
rm -rf git.html git.chunked style/toc.html git.epub.d git.epub git.pdf