~ubuntu-branches/ubuntu/edgy/swig1.3/edgy

« back to all changes in this revision

Viewing changes to Doc/Manual/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2005-01-10 09:48:52 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20050110094852-axi555axhj1brbwq
Tags: 1.3.22-5ubuntu2
Build using python2.4 and pike7.6. Closes: #4146.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Makefile for generating the SWIG documentation
 
2
#
 
3
# Note that the htmldoc package needs to be installed.
 
4
# The .html files are first processed and updated with chapter numbering and anchor names
 
5
# are added to the HTML headings using the python scripts. The htmldoc program is then
 
6
# used to generate the PDF document and single page HTML version of the documentation.
 
7
# HTML TIDY (package also known as tidy) is also required and is used as an aid to HTML
 
8
# validation.
 
9
#
 
10
 
 
11
# Note the # and " are escaped
 
12
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"
 
13
 
 
14
.PHONY: maketoc check generate all clean
 
15
 
 
16
all: maketoc check generate
 
17
 
 
18
maketoc:
 
19
        python maketoc.py
 
20
 
 
21
# Use htmltidy to warn about some HTML errors. Note that it is not used to clean/tidy the HTML,
 
22
# it is just used as a primitive HTML checker.
 
23
check:
 
24
          tidy -errors --gnu-emacs yes -quiet index.html
 
25
          tidy -errors --gnu-emacs yes -quiet Sections.html
 
26
          all=`sed '/^#/d' chapters`; for a in $$all; do tidy -errors --gnu-emacs yes -quiet $$a; done;
 
27
 
 
28
generate: swightml.book swigpdf.book
 
29
        htmldoc --batch swightml.book
 
30
        htmldoc --batch swigpdf.book
 
31
 
 
32
swightml.book:
 
33
        echo "#HTMLDOC 1.8.23" > swightml.book
 
34
        echo -t pdf13 -f SWIGDocumentation.pdf $(HTMLDOC_OPTIONS) >> swightml.book
 
35
        echo "Sections.html" >> swightml.book
 
36
        cat chapters >> swightml.book
 
37
 
 
38
swigpdf.book:
 
39
        echo "#HTMLDOC 1.8.23" > swigpdf.book
 
40
        echo -t html -f SWIGDocumentation.html $(HTMLDOC_OPTIONS) >> swigpdf.book
 
41
        echo "Sections.html" >> swigpdf.book
 
42
        cat chapters >> swigpdf.book
 
43
 
 
44
clean:
 
45
        rm -f swightml.book
 
46
        rm -f swigpdf.book
 
47
        rm -f SWIGDocumentation.html
 
48
        rm -f SWIGDocumentation.pdf
 
49
        rm -f *.bak
 
50
 
 
51
test:
 
52
          grep "href=\".*\.html\"" index.html
 
53
          grep "href=\".*\.html\"" Sections.html
 
54
          all=`sed '/^#/d' chapters`; for a in $$all; do grep -l "href=\".*\.html\"" $$a; done;
 
55
 
 
56
validate:
 
57
          all=`sed '/^#/d' chapters`; for a in $$all; do /home/william/builds/wdg_validate/validate --emacs $$a; done;
 
58