forked from gitbuch/gitbuch_cc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
30 lines (23 loc) · 1.12 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
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
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:
a2x -dbook -fepub git.txt
epubcheck git.epub
clean:
rm -rf git.html git.chunked style/toc.html git.epub.d git.epub