1 .PHONY
: target
clean sync push
3 target
: book book
/default.css book.html book.pdf
5 # The book consists of these text files in the following order:
7 TXTFILES
=preface.txt intro.txt basic.txt clone.txt branch.txt history.txt \
8 grandmaster.txt secrets.txt drawbacks.txt
12 book.xml
: $(addprefix $(LANG
)/,$(TXTFILES
))
13 ( for FILE in
$^
; do cat
$$FILE ; echo
; done
) | asciidoc
-d book
-b docbook
- > $@
15 # Ignore tidy's exit code because Asciidoc generates section IDs beginning with
16 # "_", which xmlto converts to "id" attributes of <a> tags. The standard
17 # insists that "id" attributes begin with a letter, which causes tidy to
18 # print a warning and return a nonzero code.
20 # When Asciidoc 8.3.0+ is widespread, I'll use its idprefix attribute instead
21 # of ignoring return codes.
24 xmlto
-m custom-html.xsl
-o book html book.xml
25 sed
-i
's/xmlns:fo[^ ]*//g' book
/*.html
26 -ls book
/*.html | xargs
-n
1 tidy
-utf8
-m
-i
-q
29 book
/default.css
: book.css
31 rsync book.css book
/default.css
34 xmlto
-m custom-nochunks.xsl html-nochunks
$^
41 -rm -rf book.xml book.html book
44 rsync
-r book.html book.pdf book
/* blynn@tl1.stanford.edu
:www
/gitmagic
/
47 git push blynn@git.or.cz
:srv
/git
/gitmagic.git
48 git push git@github.com
:blynn
/gitmagic.git