makefile for generating the single page html docs and pdf documentation using htmltidy and htmldoc
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6076 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
9f95753704
commit
1f9e0810b5
1 changed files with 55 additions and 0 deletions
55
SWIG/Doc/Manual/Makefile
Normal file
55
SWIG/Doc/Manual/Makefile
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
# Makefile for generating the SWIG documentation
|
||||
#
|
||||
# Note that the htmldoc package needs to be installed.
|
||||
# The .html files are first processed and updated with chapter numbering and anchor names
|
||||
# are added to the HTML headings using the python scripts. The htmldoc program is then
|
||||
# used to generate the PDF document and single page HTML version of the documentation.
|
||||
# HTML TIDY (package also known as tidy) is also required and is used as an aid to HTML
|
||||
# validation.
|
||||
#
|
||||
|
||||
# Note the # and " are escaped
|
||||
HTMLDOC_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"
|
||||
|
||||
.PHONY: maketoc check generate all clean
|
||||
|
||||
all: maketoc check generate
|
||||
|
||||
maketoc:
|
||||
python maketoc.py
|
||||
|
||||
# Use htmltidy to warn about some HTML errors. Note that it is not used to clean/tidy the HTML,
|
||||
# it is just used as a primitive HTML checker.
|
||||
check:
|
||||
tidy -errors --gnu-emacs yes -quiet index.html
|
||||
tidy -errors --gnu-emacs yes -quiet Sections.html
|
||||
all=`sed '/^#/d' chapters`; for a in $$all; do tidy -errors --gnu-emacs yes -quiet $$a; done;
|
||||
|
||||
generate: swightml.book swigpdf.book
|
||||
htmldoc --batch swightml.book
|
||||
htmldoc --batch swigpdf.book
|
||||
|
||||
swightml.book:
|
||||
echo "#HTMLDOC 1.8.23" > swightml.book
|
||||
echo -t pdf13 -f SWIGDocumentation.pdf $(HTMLDOC_OPTIONS) >> swightml.book
|
||||
echo "Sections.html" >> swightml.book
|
||||
cat chapters >> swightml.book
|
||||
|
||||
swigpdf.book:
|
||||
echo "#HTMLDOC 1.8.23" > swigpdf.book
|
||||
echo -t html -f SWIGDocumentation.html $(HTMLDOC_OPTIONS) >> swigpdf.book
|
||||
echo "Sections.html" >> swigpdf.book
|
||||
cat chapters >> swigpdf.book
|
||||
|
||||
clean:
|
||||
rm -f swightml.book
|
||||
rm -f swigpdf.book
|
||||
rm -f SWIGDocumentation.html
|
||||
rm -f SWIGDocumentation.pdf
|
||||
rm *.bak
|
||||
|
||||
test:
|
||||
grep "href=\".*\.html\"" index.html
|
||||
grep "href=\".*\.html\"" Sections.html
|
||||
all=`sed '/^#/d' chapters`; for a in $$all; do grep -l "href=\".*\.html\"" $$a; done;
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue