Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH 2/2] zshguide: Makefile fixes



- there was very interesting effect of line continuation
on perl - as "\<new line>" was passed verbatim to perl, it was
apparently interpreted as reference to variable with name
<new line> resulting in

\documentclass[a4paper]{book}
SCALAR(0xd1b100)\usepackage[T1]{fontenc}

This is with perl 5.12.2. Patch makes sure continuation is
interpreted and stripped off by shell.

- "make web" was missing zshguide_us.pdf target

- add some more temp files to "clean" target
---
 Makefile |   28 +++++++++++++++-------------
 1 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/Makefile b/Makefile
index 83dd8a4..2fa0ec2 100755
--- a/Makefile
+++ b/Makefile
@@ -8,9 +8,9 @@ SRC_DIST = Makefile zshguide.yo $(CHAPTERS)
 DTD = <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
 
 .latex.pdf:
-	while pdflatex $< | perl -pe '/should run.*again/ && $$run++; \
-	/^LaTeX Warning:.*Rerun/ && $$run++; \
-	eof && exit(!$$run);'; do true; done
+	while pdflatex $< | perl -pe '/should run.*again/ && $$run++; '\
+	'/^LaTeX Warning:.*Rerun/ && $$run++; '\
+	'eof && exit(!$$run);'; do true; done
 .yo.txt:
 	yodl2txt $<
 
@@ -48,19 +48,19 @@ PERLCOMMON = "\\usepackage[T1]{fontenc}\n", \
 	yodl2latex $<
 	cp $@ tmp.latex
 	perl -ne 'if (/^\\usepackage/) { \
-	  print "\\documentclass[a4paper]{book}\n", \
-	  "\\usepackage{a4wide}\n", $(PERLCOMMON)' \
+	  print "\\documentclass[a4paper]{book}\n", '\
+	'  "\\usepackage{a4wide}\n", $(PERLCOMMON)' \
 	$@ > $@.tmp  &&  mv $@.tmp $@
-	perl -ne 'if (/^\\usepackage/) { \
-	  print "\\documentclass{book}\n", \
-	  $(PERLCOMMON)' \
+	perl -ne 'if (/^\\usepackage/) { '\
+	'  print "\\documentclass{book}\n", '\
+	'  $(PERLCOMMON)' \
 	tmp.latex > $*_us.latex
 	rm -f tmp.latex
 
 .latex.dvi:
-	if latex $< | perl -pe '/should run.*again/ && $$run++; \
-	/^LaTeX Warning:.*Rerun/ && $$run++; \
-	eof && exit(!$$run);'; then \
+	if latex $< | perl -pe '/should run.*again/ && $$run++; '\
+	'/^LaTeX Warning:.*Rerun/ && $$run++; '\
+	'eof && exit(!$$run);'; then \
 	latex $<; \
 	fi
 .dvi.ps:
@@ -73,7 +73,7 @@ all: zshguide.html zshguide.latex zshguide.txt zshguide.pdf \
 
 zshguide.txt zshguide.html zshguide.latex: zshguide.yo $(CHAPTERS)
 
-zshguide.pdf zshguide.dvi: zshguide.latex
+zshguide.pdf zshguide_us.pdf zshguide.dvi: zshguide.latex
 
 # zshguide.ps: zshguide.dvi
 
@@ -92,4 +92,6 @@ web:    zshguide.html zshguide.latex zshguide.pdf zshguide_us.pdf
 
 clean:
 	rm -f zshguide*.html zshguide*.txt zshguide*.tex zshguide*.latex \
-	zshguide*.dvi zshguide.pdf zshguide*.ps zshguide.aux zshguide.toc
+	zshguide*.dvi zshguide.pdf zshguide*.ps zshguide.aux zshguide.toc \
+	zshguide*.log zshguide*.pdf *~ zshguide*.aux zshguide*.toc \
+	zshguide*.tmp tmp.latex
-- 
1.7.3.2



Messages sorted by: Reverse Date, Date, Thread, Author