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.
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
19 # Makefile - build Zend Framework product and documentation
22 # all - render DocBook manual in HTML.
23 # clean - remove staged files.
24 # check - validate DocBook manual using xmllint.
25 # check1 - validate one DocBook XML file using xmllint.
26 # Requires that you set the XMLFILE variable.
29 # -- parameters you are likely to want to change --
31 # XMLFILE is the name of one DocBook XML file that you want to
32 # test with xmllint, using the 'check1' target.
42 DOCBOOK_DTD
=http
://framework.zend.com
/docbook
/xml
/4.5/docbookx.dtd
43 DOCBOOK_XSL
=http
://framework.zend.com
/docbook-xsl
/htmlhelp
/htmlhelp.xsl
44 DOCBOOK_FO_XSL
=http
://framework.zend.com
/docbook-xsl
/fo
/docbook.xsl
47 MANUAL_LINT_XML
=manual-lint.xml.in
51 all: $(MANUAL_XML
) html
53 # Build the docs in HTML format
57 html
/index.html
: $(MANUAL_XML
) $(HTML_XSL
)
58 @echo
"Rendering the whole manual with $(XSLTPROC)..."
59 $(XMLLINT
) --xinclude
--output _temp_manual.xml
$(MANUAL_XML
)
60 $(XSLTPROC
) --xinclude
--output html
/index.html
$(HTML_XSL
) _temp_manual.xml
61 @echo
"Copying manual figures (recursively)..."
62 -[ -d figures
] && cp
-r figures html
/figures
64 $(MANUAL_XML
): $(MANUAL_XML
).in
65 sed
-e
's!@DOCBOOK_DTD@!$(DOCBOOK_DTD)!' $< > $@
67 $(HTML_XSL
): $(HTML_XSL
).in
68 sed
-e
's!@DOCBOOK_XSL@!$(DOCBOOK_XSL)!' $< > $@
70 # Build the docs in PDF format
72 pdf-xep
: $(MANUAL_XML
)
73 $(XSLTPROC
) --xinclude
--output ZendFramework.fo
$(DOCBOOK_FO_XSL
) $(MANUAL_XML
)
74 "$(XEP)" -fo ZendFramework.fo
-pdf ZendFramework.pdf
77 @echo
"Checking the whole manual with $(XMLLINT)..."
78 @
$(XMLLINT
) --xinclude
--output _temp_manual.xml
$(MANUAL_XML
)
79 @
$(XMLLINT
) --valid
--noout
--postvalid _temp_manual.xml \
82 check1
: $(MANUAL_LINT_XML
)
83 @if
[ -n
"$(XMLFILE)" ] ; then \
84 if
[ -f
"$(MODULE)/$(XMLFILE)" ] ; then \
85 echo
"Checking $(XMLFILE) with $(XMLLINT)..." ; \
86 sed
-e
's!@XMLFILE@!$(MODULE)/$(XMLFILE)!' -e
's!@DOCBOOK_DTD@!$(DOCBOOK_DTD)!' $(MANUAL_LINT_XML
) \
87 |
$(XMLLINT
) --xinclude
--output _temp_
$(XMLFILE
) - ; \
88 $(XMLLINT
) --valid
--noout
--postvalid _temp_
$(XMLFILE
) \
91 echo
"File $(MODULE)/$(XMLFILE) not found." ; \
94 echo
"Please specify a filename, e.g. 'make XMLFILE=filename.xml lint'" ; \
98 -rm -f html
/*.html html
/HTML.manifest
103 -rm -f config.
* configure
104 -rm -rf autom4te.cache
106 -rm -f
$(HTML_XSL
) $(MANUAL_XML
)