Makefile.in 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. #
  2. # Zend Framework
  3. #
  4. # LICENSE
  5. #
  6. # This source file is subject to the new BSD license that is bundled
  7. # with this package in the file LICENSE.txt.
  8. # It is also available through the world-wide-web at this URL:
  9. # http://framework.zend.com/license/new-bsd
  10. # If you did not receive a copy of the license and are unable to
  11. # obtain it through the world-wide-web, please send an email
  12. # to license@zend.com so we can send you a copy immediately.
  13. #
  14. # @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  15. # @license http://framework.zend.com/license/new-bsd New BSD License
  16. #
  17. #
  18. # Makefile - build Zend Framework product and documentation
  19. #
  20. # Main targets:
  21. # all - render DocBook manual in HTML.
  22. # clean - remove staged files.
  23. # check - validate DocBook manual using xmllint.
  24. # check1 - validate one DocBook XML file using xmllint.
  25. # Requires that you set the XMLFILE variable.
  26. #
  27. # -- parameters you are likely to want to change --
  28. # XMLFILE is the name of one DocBook XML file that you want to
  29. # test with xmllint, using the 'check1' target.
  30. XEP=@XEP@
  31. XINC=@XINC@
  32. FOP=@FOP@
  33. XSLTPROC=@XSLTPROC@
  34. XMLLINT=@XMLLINT@
  35. ECSRC=@ECSRC@
  36. HERE=@HERE@
  37. DOCBOOK_DTD=http://framework.zend.com/docbook/xml/4.5/docbookx.dtd
  38. DOCBOOK_XSL=http://framework.zend.com/docbook-xsl/htmlhelp/htmlhelp.xsl
  39. DOCBOOK_FO_XSL=http://framework.zend.com/docbook-xsl/fo/docbook.xsl
  40. HTML_XSL=html.xsl
  41. MANUAL_XML=manual.xml
  42. MANUAL_PRINT1_XML=manual-print1.xml
  43. MANUAL_PRINT2_XML=manual-print2.xml
  44. MANUAL_LINT_XML=manual-lint.xml.in
  45. MODULE=module_specs
  46. XMLFILE=
  47. all: $(MANUAL_XML) html
  48. # Build the docs in HTML format
  49. html: html/index.html
  50. html/index.html: $(MANUAL_XML) $(HTML_XSL)
  51. @echo "Rendering the whole manual with $(XSLTPROC)..."
  52. $(XMLLINT) --xinclude --output _temp_manual.xml $(MANUAL_XML)
  53. $(XSLTPROC) --xinclude --output html/index.html $(HTML_XSL) _temp_manual.xml
  54. @echo "Copying manual figures (recursively)..."
  55. -[ -d figures ] && cp -r figures html/figures
  56. $(MANUAL_XML): $(MANUAL_XML).in
  57. sed -e 's!@DOCBOOK_DTD@!$(DOCBOOK_DTD)!' $< > $@
  58. $(MANUAL_PRINT1_XML): $(MANUAL_PRINT1_XML).in
  59. sed -e 's!@DOCBOOK_DTD@!$(DOCBOOK_DTD)!' $< > $@
  60. $(MANUAL_PRINT2_XML): $(MANUAL_PRINT2_XML).in
  61. sed -e 's!@DOCBOOK_DTD@!$(DOCBOOK_DTD)!' $< > $@
  62. $(HTML_XSL): $(HTML_XSL).in
  63. sed -e 's!@DOCBOOK_XSL@!$(DOCBOOK_XSL)!' $< > $@
  64. # Build the docs in PDF format
  65. pdf-xep: $(MANUAL_XML)
  66. $(XSLTPROC) --xinclude --output ZendFramework.fo $(DOCBOOK_FO_XSL) $(MANUAL_XML)
  67. "$(XEP)" -fo ZendFramework.fo -pdf ZendFramework.pdf
  68. pdf-print-volume1: $(MANUAL_PRINT1_XML)
  69. $(XSLTPROC) --xinclude --output ZendFramework.fo $(DOCBOOK_FO_XSL) $(MANUAL_PRINT1_XML)
  70. "$(FOP)" -fo ZendFramework.fo -pdf ZendFrameworkVolume1.pdf
  71. pdf-print-volume2: $(MANUAL_PRINT2_XML)
  72. $(XSLTPROC) --xinclude --output ZendFramework.fo $(DOCBOOK_FO_XSL) $(MANUAL_PRINT2_XML)
  73. "$(FOP)" -fo ZendFramework.fo -pdf ZendFrameworkVolume2.pdf
  74. pdf-print: pdf-print-volume1 pdf-print-volume2
  75. check: $(MANUAL_XML)
  76. @echo "Checking the whole manual with $(XMLLINT)..."
  77. @$(XMLLINT) --xinclude --output _temp_manual.xml $(MANUAL_XML)
  78. @$(XMLLINT) --valid --noout --postvalid _temp_manual.xml \
  79. && echo "OK"
  80. check1: $(MANUAL_LINT_XML)
  81. @if [ -n "$(XMLFILE)" ] ; then \
  82. if [ -f "$(MODULE)/$(XMLFILE)" ] ; then \
  83. echo "Checking $(XMLFILE) with $(XMLLINT)..." ; \
  84. sed -e 's!@XMLFILE@!$(MODULE)/$(XMLFILE)!' -e 's!@DOCBOOK_DTD@!$(DOCBOOK_DTD)!' $(MANUAL_LINT_XML) \
  85. | $(XMLLINT) --xinclude --output _temp_$(XMLFILE) - ; \
  86. $(XMLLINT) --valid --noout --postvalid _temp_$(XMLFILE) \
  87. && echo "OK" ; \
  88. else \
  89. echo "File $(MODULE)/$(XMLFILE) not found." ; \
  90. fi ; \
  91. else \
  92. echo "Please specify a filename, e.g. 'make XMLFILE=filename.xml lint'" ; \
  93. fi
  94. clean:
  95. -rm -f html/*.html html/HTML.manifest
  96. -rm -Rf html/figures
  97. -rm -f _temp_*.xml
  98. -rm -f ./*.pdf
  99. cleanall: clean
  100. -rm -f config.* configure
  101. -rm -rf autom4te.cache
  102. -rm -f Makefile
  103. -rm -f $(HTML_XSL) $(MANUAL_XML) $(MANUAL_PRINT1_XML) $(MANUAL_PRINT2_XML)