From 936de2f5aee727eabd3a415c2bd4b5b3120b4def Mon Sep 17 00:00:00 2001 From: Ben Lynn Date: Tue, 5 May 2009 01:21:24 -0700 Subject: [PATCH] Minor Makefile tweak. --- Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index f567807..bd81e1b 100644 --- a/Makefile +++ b/Makefile @@ -14,17 +14,19 @@ book.xml: $(addprefix $(LANG)/,$(TXTFILES)) 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 langauge, + # If a file has not yet been translated for the target language, # then substitute the English version. ( 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 - > $@ -# Allow unfinished translations to build with this dummy rule. -# Report an error if we reach this rule for the English version. +# This rule allows unfinished translations to build. +# Report an error if the English version of the text file is missing. $(addprefix $(LANG)/,$(TXTFILES)) : ifeq ($(LANG),en) @if [ ! -f $@ ]; then echo English file missing: $@; exit 123; fi +else + @if [ ! -f $@ ]; then echo $@ missing: using English version; fi endif # Ignore tidy's exit code because Asciidoc generates section IDs beginning with -- 2.11.4.GIT