Docs.make 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. # This should be "include"d from the top-level Makefile, and nowhere else
  2. # Extra commands
  3. HTML2PDF= htmldoc --footer d.1
  4. GRASS_PDFDIR= $(DOCSDIR)/pdf
  5. # generate programmer's manual as single HTML document:
  6. htmldocs-single:
  7. $(MAKE) -C . htmldox-single
  8. for dir in lib ; do \
  9. $(MAKE) -C $$dir htmldox-single ; \
  10. done
  11. # generate programmer's manual as multiple HTML documents:
  12. docs_dirs = \
  13. lib/db \
  14. lib/raster3d \
  15. lib/gis \
  16. lib/gmath \
  17. lib/gpde \
  18. lib/proj \
  19. lib/ogsf \
  20. lib/segment \
  21. lib/vector \
  22. lib/vector/dglib
  23. htmldocs_dirs := $(patsubst %,%/html,$(docs_dirs))
  24. latexdocs_dirs := $(patsubst %,%/latex,$(docs_dirs))
  25. htmldocs:
  26. $(MAKE) -C . htmldox
  27. for dir in $(docs_dirs) ; do \
  28. $(MAKE) -C $$dir htmldox ; \
  29. done
  30. packagehtmldocs: htmldocs
  31. tar chvfz $(GRASS_NAME)refman_$(DATE)_html.tar.gz $(htmldocs_dirs)
  32. #alternatively, the docs can be generated as single PDF document (see doxygen FAQ for 'TeX capacity exceeded'):
  33. # (cd lib/ ; make pdfdox)
  34. pdfdocs:
  35. for dir in $(docs_dirs) ; do \
  36. $(MAKE) -C $$dir pdfdox ; \
  37. done
  38. @echo "Written PDF docs in: $(latexdocs_dirs)"
  39. cleandocs:
  40. $(MAKE) -C . cleandox
  41. for dir in $(docs_dirs) ; do \
  42. $(MAKE) -C $$dir cleandox ; \
  43. done
  44. indices = \
  45. database.html \
  46. display.html \
  47. general.html \
  48. imagery.html \
  49. miscellaneous.html \
  50. photo.html \
  51. postscript.html \
  52. raster.html \
  53. raster3d.html \
  54. vector.html
  55. html_pdf = \
  56. cd $(ARCH_DISTDIR)/docs/html && \
  57. $(HTML2PDF) --webpage $(1).html $(2).*.html -f $(GRASS_PDFDIR)/$(GRASS_NAME)$(1).pdf
  58. html2pdfdoc:
  59. @ echo "Light PDF document from modules' HTML documentation"
  60. @ # http://www.htmldoc.org
  61. @test -d $(GRASS_PDFDIR) || mkdir -p $(GRASS_PDFDIR)
  62. $(call html_pdf commands,--no-links $(indices))
  63. html2pdfdoccomplete:
  64. @ echo "Complete PDF document from modules' HTML documentation"
  65. @ # http://www.htmldoc.org
  66. @test -d $(GRASS_PDFDIR) || mkdir -p $(GRASS_PDFDIR)
  67. $(call html_pdf database,db.*.html)
  68. $(call html_pdf display,d.*.html)
  69. $(call html_pdf general,g.*.html)
  70. $(call html_pdf imagery,i.*.html)
  71. $(call html_pdf miscellaneous,m.*.html)
  72. $(call html_pdf photo,i.ortho*.html photo*.html)
  73. $(call html_pdf postscript,ps.*.html)
  74. $(call html_pdf raster,r.*.html)
  75. $(call html_pdf raster3d,r3.*.html)
  76. $(call html_pdf vector,v.*.html)
  77. changelog:
  78. @ echo "creating ChangeLog file (following the 'main' branch only)..."
  79. @ # utils/gitlog2changelog.py creates a GNU style ChangeLog file:
  80. python utils/gitlog2changelog.py
  81. .PHONY: htmldocs-single htmldocs packagehtmldocs pdfdocs cleandocs html2pdfdoc
  82. .PHONY: html2pdfdoccomplete changelog