Doxygen.make 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # common dependencies and rules for building libraries
  2. DOXINPUT=$(DOXNAME)lib.dox
  3. DOXOUTPUT=$(DOXNAME)lib
  4. #check for program
  5. checkdoxygen:
  6. @(type doxygen > /dev/null || (echo "ERROR: Install 'doxygen' software first (get from http://www.doxygen.org)" && exit 1))
  7. @(type dot > /dev/null || (echo "ERROR: Install 'Graphviz/dot' software first" && exit 1))
  8. # generate docs as single HTML document:
  9. htmldox-single: checkdoxygen cleandox
  10. doxygen $(MODULE_TOPDIR)/include/Make/Doxyfile_arch_html
  11. @echo "HTML reference in directory ./html/index.html"
  12. # generate docs as multiple HTML documents:
  13. htmldox: checkdoxygen cleandox
  14. # hack needed to get main page at beginning:
  15. @mv $(DOXINPUT) $(DOXINPUT).org
  16. @sed 's+/\*! \\page +/\*! \\mainpage +g' $(DOXINPUT).org > $(DOXINPUT)
  17. doxygen $(MODULE_TOPDIR)/include/Make/Doxyfile_arch_html
  18. @mv $(DOXINPUT).org $(DOXINPUT)
  19. @echo "HTML reference in directory ./html/index.html"
  20. # NOTE: stubs/ and sqlp/ are excluded in ./Doxyfile_arch_latex
  21. latexdox: checkdoxygen cleandox
  22. test ! -d latex || (cd ./latex && $(MAKE) clean)
  23. # hack needed to get main page at beginning:
  24. @mv $(DOXINPUT) $(DOXINPUT).org
  25. @sed 's+/\*! \\page +/\*! \\mainpage +g' $(DOXINPUT).org > $(DOXINPUT)
  26. doxygen $(MODULE_TOPDIR)/include/Make/Doxyfile_arch_latex
  27. #this hack is needed to make Acroread's search engine happy:
  28. (cd ./latex ; echo "\usepackage[T1]{fontenc}" >> doxygen.sty)
  29. (cd ./latex && $(MAKE) )
  30. @mv $(DOXINPUT).org $(DOXINPUT)
  31. @echo "Latex reference in directory ./latex/refman.dvi"
  32. pdfdox: checkdoxygen cleandox
  33. test ! -d latex || (cd ./latex && $(MAKE) clean)
  34. # hack needed to get main page at beginning:
  35. @mv $(DOXINPUT) $(DOXINPUT).org
  36. @sed 's+/\*! \\page +/\*! \\mainpage +g' $(DOXINPUT).org > $(DOXINPUT)
  37. doxygen $(MODULE_TOPDIR)/include/Make/Doxyfile_arch_latex
  38. #this hack is needed to make Acroread's search engine happy:
  39. (cd ./latex ; echo "\usepackage[T1]{fontenc}" >> doxygen.sty)
  40. (cd ./latex && $(MAKE) refman.pdf && mv refman.pdf grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}$(DOXOUTPUT)_`date '+%Y_%m_%d'`_refman.pdf)
  41. @mv $(DOXINPUT).org $(DOXINPUT)
  42. @echo "PDF reference in directory ./latex/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}$(DOXOUTPUT)_`date '+%Y_%m_%d'`_refman.pdf"
  43. cleandox:
  44. rm -rf ./latex ./html