Skip to content

Commit

Permalink
Makefile fix for AsciiDoc 8.5.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
blynn committed Nov 18, 2009
1 parent 0a005ab commit 51e4a79
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# The language we are building.
# For example, Run "make LANG=es" to build the Spanish edition.
LANG := en
SHELL := /bin/bash

.PHONY: target clean sync push

Expand All @@ -12,12 +13,15 @@ TXTFILES := preface.txt intro.txt basic.txt clone.txt branch.txt history.txt \
multiplayer.txt grandmaster.txt secrets.txt drawbacks.txt translate.txt

book.xml: $(addprefix $(LANG)/,$(TXTFILES))
# Kludge to make preface sections work for languages besides English.
echo '[specialsections]' > conf
sed -n '/^== .* ==$$/p' $(LANG)/preface.txt | sed 's/^== \(.*\) ==$$/^\1$$=sect-preface/' >> conf
# Concatenate the text files and feed to AsciiDoc.
# If a file has not yet been translated for the target language,
# then substitute the English version.
# Kludge to make preface sections work for languages besides English
# for older AsciiDoc versions.
if [[ `asciidoc --version | cut -f 2 -d ' '` < "8.5.0" ]]; then \
echo '[specialsections]' > conf ; \
sed -n '/^== .* ==$$/p' $(LANG)/preface.txt | sed 's/^== \(.*\) ==$$/^\1$$=sect-preface/' >> conf ; \
else echo "" > conf ; fi; \
( for FILE in $^ ; do if [ -f $$FILE ]; then cat $$FILE; else \
cat en/$$(basename $$FILE); fi; echo ; done ) | \
asciidoc -a lang=$(LANG) -d book -b docbook -f conf - > $@
Expand Down
2 changes: 1 addition & 1 deletion en/preface.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Rather than go into details, we provide rough instructions for particular effect

Dustin Sallings, Alberto Bertogli, James Cameron, Douglas Livingstone,
Michael Budde, Richard Albury, Tarmigan, Derek Mahar, Frode Aannevik, Keith
Rarick, Andy Somerville, Ralf Recker, Øyvind A. Holm, Miklos Vajna,
Rarick, Andy Somerville, Ralf Recker, Øyvind A. Holm, Miklos Vajna, and
Sébastien Hinderer contributed corrections and improvements.

Francois Marier maintains the Debian package originally created by Daniel
Expand Down

0 comments on commit 51e4a79

Please sign in to comment.