docs-common Makefile.common,1.103,1.104
Tommy Reynolds (jtr)
fedora-docs-commits at redhat.com
Sun Mar 12 17:48:19 UTC 2006
- Previous message (by thread): press-release fdp-pr-en_US.xml, NONE, 1.1 Makefile, 1.2, 1.3 fdp-pr.pot, 1.1, 1.2 fdp-pr.xsl, 1.4, 1.5 fdp-pr-en.xml, 1.3, NONE
- Next message (by thread): install-guide rpm-info.xml,1.13,1.14
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jtr
Update of /cvs/docs/docs-common
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15389
Modified Files:
Makefile.common
Log Message:
Separate PDF generation into two steps: first create the XML-FO form
of the XML, and then render the XML-FO into PDF. Added "fo",
"fo-all", "fo-${LANG}" targets to do the XML-FO conversion, and then
have the "pdf-${LANG}" targets use the "${LANG}/${DOCBASE}.fo" file
as their only prerequisite.
I'm using xmllint to reformat the .FO files for now; otherwise it's
all one very, very long line and all the diagnostics complain about
that one line ;-)
Index: Makefile.common
===================================================================
RCS file: /cvs/docs/docs-common/Makefile.common,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -r1.103 -r1.104
--- Makefile.common 8 Mar 2006 01:27:04 -0000 1.103
+++ Makefile.common 12 Mar 2006 17:48:11 -0000 1.104
@@ -2,18 +2,8 @@
# Makefile.common
#
# This file, to be included from every document's local Makefile, provides
-# the basic targets used by the Fedora Docs Project:
-# all -- Default target, builds HTML document only
-# ${DOCNAME}/index.html -- Builds HTML version of document
-# html -- See "${DOCNAME}/index.html"
-# html-nochunks -- See "${DOCNAME}.html"; single HTML file
-# ${DOCNAME}.tar.gz -- Packages HTML document into a tar archive
-# tarball -- See "${DOCNAME}.tar.gz"
-# clean -- Deletes all generated files and directories
-# distclean -- See "clean"
-# ${DOCNAME}.pdf -- Builds PDF version of document
-# pdf -- See "${DOCNAME}.pdf"
-# txt -- Make ASCII txt version
+# the basic targets used by the Fedora Docs Project. To see a list,
+# type "make help".
#########################################################################
#########################################################################
@@ -480,21 +470,41 @@
#########################################################################
# For each language in ${LANGUAGES}, generate an Adobe Portable Document
# Format (PDF) file.
+define FO_template
+.PHONY: fo-${1}
+fo-${1}:: ${1}/${DOCBASE}.fo
+${1}/${DOCBASE}.fo:: ${XMLFILES-${1}} ${XMLDEPFILES-${1}} set-locale-${1}
+ LANG=${1}.UTF-8 xsltproc --xinclude ${XSLPDF} \
+ ${1}/${DOCBASE}.xml | ${XMLLINT} --format -o $$@ -
+clean::
+ ${RM} ${1}/${DOCBASE}.fo
+help::
+ @printf ${TFMT} 'fo-${1}' 'Creates ${1}/${DOCBASE}.fo file'
+ @printf ${TFMT} '${1}/${DOCBASE}.fo' 'XSL-FO file for locale ${1}'
+endef
+
+$(foreach L,${LANGUAGES},$(eval $(call FO_template,${L})))
+
+.PHONY: fo fo-all
+fo fo-all:: $(foreach L,${LANGUAGES},fo-${L})
+help::
+ @printf ${TFMT} 'fo' 'Generate .FO files for all languages'
+ @printf ${TFMT} 'fo-all' 'Generate .FO files for all languages'
+
define PDF_template
.PHONY: pdf-${1}
-
pdf-$(1):: ${DOCBASE}-$(1).pdf
-${DOCBASE}-$(1).pdf:: ${XMLFILES-${1}} ${XMLDEPFILES-${1}} set-locale-${1}
- LANG=${1}.UTF-8 ${XMLTO} pdf -x $(XSLPDF) $(1)/$(DOCBASE).xml
- mv -f ${DOCBASE}.pdf ${DOCBASE}-${1}.pdf
+${DOCBASE}-${1}.pdf:: ${1}/${DOCBASE}.fo
+ LANG=${1}.UTF-8 ${XMLTO} -o ${1} pdf $$<
+ mv -f ${1}/${DOCBASE}.pdf $$@
distclean::
${RM} ${DOCBASE}-${1}.pdf
help::
- @printf ${TFMT} 'pdf-${1}' 'Renders XML into PDF file for locale ${1}'
- @printf ${TFMT} '${DOCBASE}-${1}.pdf' 'Renders XML into PDF file'
+ @printf ${TFMT} 'pdf-${1}' 'Renders XML-FO into PDF for locale ${1}'
+ @printf ${TFMT} '${DOCBASE}-${1}.pdf' 'Renders XML-FO into PDF file'
endef
- Previous message (by thread): press-release fdp-pr-en_US.xml, NONE, 1.1 Makefile, 1.2, 1.3 fdp-pr.pot, 1.1, 1.2 fdp-pr.xsl, 1.4, 1.5 fdp-pr-en.xml, 1.3, NONE
- Next message (by thread): install-guide rpm-info.xml,1.13,1.14
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Fedora-docs-commits
mailing list