summaryrefslogtreecommitdiff
path: root/doc/ThornGuide
diff options
context:
space:
mode:
authorswhite <swhite@17b73243-c579-4c4c-a9d2-2d5706c11dac>2005-05-26 15:43:21 +0000
committerswhite <swhite@17b73243-c579-4c4c-a9d2-2d5706c11dac>2005-05-26 15:43:21 +0000
commit889a52657daa2daaf46a1dac1338aa30edd514de (patch)
tree4d37af6289cac019519e32dbe498fb7d64e9df86 /doc/ThornGuide
parent305996fd427742551c60d214db0551d495383247 (diff)
Effects a fix for PR 1343 and a partial fix for PR 989
This was discussed on CactusMaint Wed, 27 Apr 2005 as Patch for PR 1913: ThornGuide and Latex errors (Note the 1913 seems to be a typo--it should have been 1343) Files changed: Makefile, doc/ThornGuide/Makefile Affects targets: ThornGuide, ThornGuide.pdf, <config>-ThornGuide UsersGuide, ReferenceManual, MaintGuide Main purpose: To give the user a sensible error message in case something goes wrong with latex'ing, pointing them to the appropriate latex log files, and stopping the build. Also, made on-screen messages a little clearer as to what is going on. Since the patch was posted, these additions were suggested and implemented. * Instead of copying the ps files to the doc directory, they are now moved (more efficient) * If ThornList is missing, make <config>-ThornGuide now complains. * Now also greps for LaTeX Warning, and complains if it finds one. Tested: Ran all targets on functioning CCL files, and on one with bad embedded LaTeX (a missing right-curley-bracket will do it). To Do: 1) make ThornGuide.pdf still doesn't work because pdflatex doesn't take eps files. Would ps2pdf be a suitable alternative? (PR 1937) 2) Erik and Jonathan would both like to see all latex warnings about preferences worked out. 3) Scripts that parse the CCL files still fail silently, resulting in incomplete documentation. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4061 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'doc/ThornGuide')
-rw-r--r--doc/ThornGuide/Makefile49
1 files changed, 30 insertions, 19 deletions
diff --git a/doc/ThornGuide/Makefile b/doc/ThornGuide/Makefile
index 332d2e72..19a8f142 100644
--- a/doc/ThornGuide/Makefile
+++ b/doc/ThornGuide/Makefile
@@ -43,38 +43,49 @@ IMAGE_FILE=$(CCTK_HOME)/doc/UsersGuide/bincactus2.eps
default : $(MASTER_FILE).ps
$(MASTER_FILE).ps: $(MASTER_FILE).dvi
- @echo " Running dvips on $<...."
+ @echo " Converting $< to PostScript ...."
dvips -f $< 2> LOG_DVIPS_MSGS | $(CCTK_HOME)/lib/sbin/FixPageNumbersInPostscript.pl > $@
- if test -e "$@"; then \
- echo " $@ created."; \
- else \
+ if ! test -e "$@"; then \
echo " Cannot find $@, an error must have occured."; \
fi
$(MASTER_FILE).dvi: $(MASTER_FILE).tex
- @echo " Latexing $<...."
- latex $< < /dev/null > LOG_LATEX_FULL_MSGS 2>&1
- latex $< < /dev/null > LOG_LATEX_FULL_MSGS 2>&1
- latex $< < /dev/null 2>&1 | tee LOG_LATEX_FULL_MSGS | grep -v Underfull | grep -v Overfull | grep -v OT1 > LOG_LATEX_MSGS
- if test -e "$@"; then \
- echo " $@ created."; \
- else \
+ @echo " LaTeXing $<...."
+ # Fall through any latex errors so as to print sensible error message
+ -latex --interaction errorstopmode $< < /dev/null 2>&1 > LOG_LATEX_FULL_MSGS
+ -latex $< < /dev/null 2>&1 > LOG_LATEX_FULL_MSGS
+ -latex $< < /dev/null 2>&1 | tee LOG_LATEX_FULL_MSGS | grep -v Underfull | grep -v Overfull | grep -v OT1 > LOG_LATEX_MSGS
+ if test -e "$@"; then \
+ if grep "^\! " "LOG_LATEX_FULL_MSGS"; then \
+ echo " Problem in $<. See doc/ThornGuide/build/LOG_LATEX_* ."; \
+ exit 1; \
+ elif grep "^LaTeX Warning:" "LOG_LATEX_FULL_MSGS"; then \
+ echo " Warnings in $<. See doc/ThornGuide/build/LOG_LATEX_* ."; \
+ exit 0; \
+ fi; \
+ else \
echo " Cannot find $@, an error must have occured."; \
fi
$(MASTER_FILE).pdf: $(MASTER_FILE).tex
@echo " Running pdflatex on $<...."
- pdflatex $< < /dev/null > LOG_PDFLATEX_MSGS 2>&1
- pdflatex $< < /dev/null > LOG_PDFLATEX_MSGS 2>&1
- pdflatex $< < /dev/null 2>&1 | grep -v Underfull | grep -v Overfull | grep -v OT1 > LOG_PDFLATEX_MSGS
- if test -e "$@"; then \
- echo " $@ created."; \
- else \
+ -pdflatex $< < /dev/null 2>&1 > LOG_PDFLATEX_MSGS
+ -pdflatex $< < /dev/null 2>&1 > LOG_PDFLATEX_MSGS
+ -pdflatex $< < /dev/null 2>&1 | grep -v Underfull | grep -v Overfull | grep -v OT1 > LOG_PDFLATEX_MSGS
+ if test -e "$@"; then \
+ if grep "^\! " "LOG_PDFLATEX_MSGS"; then \
+ echo " Problem in $<. See doc/ThornGuide/build/LOG_PDFLATEX_MSGS ."; \
+ exit 1; \
+ elif grep "^LaTeX Warning:" "LOG_LATEX_FULL_MSGS"; then \
+ echo " Warnings in $<. See doc/ThornGuide/build/LOG_LATEX_* ."; \
+ exit 0; \
+ fi; \
+ else \
echo " Cannot find $@, an error must have occured."; \
fi
$(MASTER_FILE).tex: $(foreach thorn, $(THORN_DEPENDENCIES), $(thorn)/param.ccl $(thorn)/interface.ccl $(thorn)/schedule.ccl) $(THORNLIST)
- @echo " Creating thorn documentation $(MASTER_FILE).tex"
+ @echo " Gathering documentation from thorn ccl files"
@echo " Processing...."
@echo " param.ccl...."
$(PERL) -s $(CCTK_HOME)/lib/sbin/ParamLatex.pl -cctk_home=$(CCTK_HOME) -directory=$(ARRANGEMENTS_DIR) -thornlist=$(THORNLIST) -outdir=./ -section -grouping=bythorn -sort=scope > LOG_PARAMLATEX_MSGS 2>&1
@@ -92,5 +103,5 @@ make.thornlist: $(THORNLIST)
THORN_DEPENDENCIES=`$(PERL) -s $(CCTK_HOME)/lib/sbin/ThornList.pl -arrangements_dir=$(ARRANGEMENTS_DIR) -thornlist=$(THORNLIST)`
$(THORNLIST):
- @echo "Creating $@...."
+ @echo " Creating $@...."
$(PERL) -s $(CCTK_HOME)/lib/sbin/ThornList.pl -arrangements_dir=$(ARRANGEMENTS_DIR) -thorns=$(THORNS) -arrangements=$(ARRANGEMENTS)> $@