File: Makefile

package info (click to toggle)
swig1.3 1.3.40-3
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 28,512 kB
  • ctags: 14,780
  • sloc: cpp: 41,436; ansic: 31,416; python: 9,313; java: 7,332; makefile: 5,264; cs: 5,231; yacc: 4,995; sh: 4,646; ruby: 3,774; perl: 3,638; lisp: 1,993; php: 1,736; tcl: 1,266; ml: 708
file content (70 lines) | stat: -rw-r--r-- 3,257 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Makefile for generating the SWIG documentation
#
# Note that the htmldoc package needs to be installed, but requires patching (using the
# margin-left.patch file from this directory) in order to correctly generate the pdf docs.
# 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.
#
# Additional html validation can be done using the validate target.
#

# 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 validate test

all: maketoc check generate

maketoc: CCache.html
	python maketoc.py

CCache.html: ../../CCache/ccache.yo
	yodl2html -o CCache.html ../../CCache/ccache.yo

# 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.
# CCache.html is generated by yodl2html and has a few insignificant problems, so we don't put it through tidy
check:
	  tidy -errors --gnu-emacs yes -quiet index.html
	  tidy -errors --gnu-emacs yes -quiet Sections.html
	  all=`sed '/^#/d' chapters | grep -v CCache.html`; for a in $$all; do tidy -errors --gnu-emacs yes -quiet $$a; done;

generate: swightml.book swigpdf.book
	htmldoc --batch swightml.book || true
	htmldoc --batch swigpdf.book || true
	python fixstyle.py SWIGDocumentation.html

swigpdf.book:
	echo "#HTMLDOC 1.8.24" > swigpdf.book
	echo -t pdf13 -f SWIGDocumentation.pdf $(HTMLDOC_OPTIONS) --stylesheet style.css >> swigpdf.book
	echo "Sections.html" >> swigpdf.book
	cat chapters >> swigpdf.book

swightml.book:
	echo "#HTMLDOC 1.8.24" > swightml.book
	echo -t html -f SWIGDocumentation.html $(HTMLDOC_OPTIONS) >> swightml.book
	echo "Sections.html" >> swightml.book
	cat chapters >> swightml.book

clean: clean-baks
	rm -f swightml.book
	rm -f swigpdf.book
	rm -f CCache.html
	rm -f SWIGDocumentation.html
	rm -f SWIGDocumentation.pdf

clean-baks:
	rm -f *.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;

# Validating using the WDG offline validator - http://www.htmlhelp.com/tools/validator/offline/
validate:
	  all=`sed '/^#/d' chapters`; for a in $$all; do validate --emacs $$a; done;