PageRenderTime 26ms CodeModel.GetById 0ms RepoModel.GetById 0ms app.codeStats 0ms

/trunk/Doc/Manual/Makefile

#
Makefile | 78 lines | 44 code | 15 blank | 19 comment | 2 complexity | bd39bd2efa930328a2844e708d463181 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  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. # Note the # and " are escaped
  15. 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"
  16. .PHONY: maketoc check generate all maintainer-clean validate test
  17. all: maketoc check generate
  18. maketoc: CCache.html
  19. python maketoc.py
  20. CCache.html: ../../CCache/ccache.yo
  21. yodl2html -o CCache.html ../../CCache/ccache.yo
  22. # Use htmltidy to warn about some HTML errors. Note that it is not used to clean/tidy the HTML,
  23. # it is just used as a primitive HTML checker.
  24. # CCache.html is generated by yodl2html and has a few insignificant problems, so we don't put it through tidy
  25. check:
  26. tidy -errors --gnu-emacs yes -quiet index.html
  27. tidy -errors --gnu-emacs yes -quiet Sections.html
  28. all=`sed '/^#/d' chapters | grep -v CCache.html`; for a in $$all; do tidy -errors --gnu-emacs yes -quiet $$a; done;
  29. generate: swightml.book swigpdf.book
  30. htmldoc --batch swightml.book || true
  31. htmldoc --batch swigpdf.book || true
  32. python fixstyle.py SWIGDocumentation.html
  33. swigpdf.book: chapters Sections.html
  34. echo "#HTMLDOC 1.8.24" > swigpdf.book
  35. echo -t pdf13 -f SWIGDocumentation.pdf $(HTMLDOC_OPTIONS) --stylesheet style.css >> swigpdf.book
  36. echo "Sections.html" >> swigpdf.book
  37. cat chapters >> swigpdf.book
  38. swightml.book: chapters Sections.html
  39. echo "#HTMLDOC 1.8.24" > swightml.book
  40. echo -t html -f SWIGDocumentation.html $(HTMLDOC_OPTIONS) >> swightml.book
  41. echo "Sections.html" >> swightml.book
  42. cat chapters >> swightml.book
  43. maintainer-clean: clean-baks
  44. rm -f swightml.book
  45. rm -f swigpdf.book
  46. rm -f CCache.html
  47. rm -f SWIGDocumentation.html
  48. rm -f SWIGDocumentation.pdf
  49. clean-baks:
  50. rm -f *.bak
  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. # Validating using the WDG offline validator - http://www.htmlhelp.com/tools/validator/offline/
  56. validate:
  57. all=`sed '/^#/d' chapters`; for a in $$all; do validate --emacs $$a; done;
  58. # Link checking using linkchecker
  59. linkchecker:
  60. @echo -----------------------------------------------------------------------
  61. @echo Note linkchecker versions prior to 6.1 do not work properly wrt anchors
  62. @echo -----------------------------------------------------------------------
  63. linkchecker --config=./linkchecker.config index.html