/trunk/Doc/Manual/Makefile
Makefile | 78 lines | 44 code | 15 blank | 19 comment | 2 complexity | bd39bd2efa930328a2844e708d463181 MD5 | raw file
1# Makefile for generating the SWIG documentation 2# 3# Note that the htmldoc package needs to be installed, but requires patching (using the 4# margin-left.patch file from this directory) in order to correctly generate the pdf docs. 5# The .html files are first processed and updated with chapter numbering and anchor names 6# are added to the HTML headings using the python scripts. The htmldoc program is then 7# used to generate the PDF document and single page HTML version of the documentation. 8# HTML TIDY (package also known as tidy) is also required and is used as an aid to HTML 9# validation. 10# 11# Additional html validation can be done using the validate target. 12# Additional link checking can be done using the linkchecker target. 13# 14 15# Note the # and " are escaped 16HTMLDOC_OPTIONS = "--book --toclevels 4 --no-numbered --toctitle \"Table of Contents\" --title --titleimage swig16.png --linkcolor \#0000ff --linkstyle underline --size Universal --left 0.50in --right 0.50in --top 0.50in --bottom 0.50in --header .t. --footer h.1 --nup 1 --tocheader .t. --tocfooter ..i --portrait --color --no-pscommands --no-xrxcomments --compression=1 --jpeg=0 --fontsize 10.0 --fontspacing 1.2 --headingfont Helvetica --bodyfont Times --headfootsize 10.0 --headfootfont Helvetica --charset iso-8859-1 --links --no-embedfonts --pagemode outline --pagelayout single --firstpage c1 --pageeffect none --pageduration 10 --effectduration 1.0 --no-encryption --permissions all --owner-password \"\" --user-password \"\" --browserwidth 680" 17 18.PHONY: maketoc check generate all maintainer-clean validate test 19 20all: maketoc check generate 21 22maketoc: CCache.html 23 python maketoc.py 24 25CCache.html: ../../CCache/ccache.yo 26 yodl2html -o CCache.html ../../CCache/ccache.yo 27 28# Use htmltidy to warn about some HTML errors. Note that it is not used to clean/tidy the HTML, 29# it is just used as a primitive HTML checker. 30# CCache.html is generated by yodl2html and has a few insignificant problems, so we don't put it through tidy 31check: 32 tidy -errors --gnu-emacs yes -quiet index.html 33 tidy -errors --gnu-emacs yes -quiet Sections.html 34 all=`sed '/^#/d' chapters | grep -v CCache.html`; for a in $$all; do tidy -errors --gnu-emacs yes -quiet $$a; done; 35 36generate: swightml.book swigpdf.book 37 htmldoc --batch swightml.book || true 38 htmldoc --batch swigpdf.book || true 39 python fixstyle.py SWIGDocumentation.html 40 41swigpdf.book: chapters Sections.html 42 echo "#HTMLDOC 1.8.24" > swigpdf.book 43 echo -t pdf13 -f SWIGDocumentation.pdf $(HTMLDOC_OPTIONS) --stylesheet style.css >> swigpdf.book 44 echo "Sections.html" >> swigpdf.book 45 cat chapters >> swigpdf.book 46 47swightml.book: chapters Sections.html 48 echo "#HTMLDOC 1.8.24" > swightml.book 49 echo -t html -f SWIGDocumentation.html $(HTMLDOC_OPTIONS) >> swightml.book 50 echo "Sections.html" >> swightml.book 51 cat chapters >> swightml.book 52 53maintainer-clean: clean-baks 54 rm -f swightml.book 55 rm -f swigpdf.book 56 rm -f CCache.html 57 rm -f SWIGDocumentation.html 58 rm -f SWIGDocumentation.pdf 59 60clean-baks: 61 rm -f *.bak 62 63test: 64 grep "href=\".*\.html\"" index.html 65 grep "href=\".*\.html\"" Sections.html 66 all=`sed '/^#/d' chapters`; for a in $$all; do grep -l "href=\".*\.html\"" $$a; done; 67 68# Validating using the WDG offline validator - http://www.htmlhelp.com/tools/validator/offline/ 69validate: 70 all=`sed '/^#/d' chapters`; for a in $$all; do validate --emacs $$a; done; 71 72# Link checking using linkchecker 73linkchecker: 74 @echo ----------------------------------------------------------------------- 75 @echo Note linkchecker versions prior to 6.1 do not work properly wrt anchors 76 @echo ----------------------------------------------------------------------- 77 linkchecker --config=./linkchecker.config index.html 78