summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTommy Reynolds <Tommy.Reynolds@MegaCoder.com>2006-03-01 00:11:09 +0000
committerTommy Reynolds <Tommy.Reynolds@MegaCoder.com>2006-03-01 00:11:09 +0000
commit5c2f018e152000fab4ff2e62e68ae6862bedcd93 (patch)
treef350edc56eec3cbfbbe1ad5dc6621da40e6e8054
parent8e34df6f268b96614da5dbececea84fa28e1588d (diff)
downloadfedora-doc-utils-5c2f018e152000fab4ff2e62e68ae6862bedcd93.tar.gz
fedora-doc-utils-5c2f018e152000fab4ff2e62e68ae6862bedcd93.tar.xz
fedora-doc-utils-5c2f018e152000fab4ff2e62e68ae6862bedcd93.zip
Set proper locale before validating XML. Do a more thourough jobrelease-notes-FC-5-GOLD-for-ISO
of cleaning up after ourselves.
-rw-r--r--Makefile.common16
1 files changed, 14 insertions, 2 deletions
diff --git a/Makefile.common b/Makefile.common
index 7035208..12a59fc 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -256,6 +256,7 @@ define HTMLNOCHUNK_template
.PHONY: html-nochunks-${1}
html-nochunks-$(1):: ${DOCBASE}-$(1).html
+
${DOCBASE}-$(1).html:: ${XMLFILES-${1}} $(1)/fdp-info.xml set-locale-${1}
LANG=${1}.UTF-8 ${XMLTO} html-nochunks -x $(XSLHTMLNOCHUNKS) $(1)/$(DOCBASE).xml
mv $(DOCBASE).html $(DOCBASE)-$(1).html
@@ -315,8 +316,10 @@ define PDF_template
.PHONY: pdf-${1}
pdf-$(1):: ${DOCBASE}-$(1).pdf
+
${DOCBASE}-$(1).pdf:: ${XMLFILES-${1}} ${1}/fdp-info.xml set-locale-${1}
- LANG=${1}.UTF-8 ${XMLTO} pdf -x $(XSLPDF) $(1)/$(DOCBASE)-$(1).xml
+ LANG=${1}.UTF-8 ${XMLTO} pdf -x $(XSLPDF) $(1)/$(DOCBASE).xml
+ mv -f ${DOCBASE}.pdf ${DOCBASE}-${1}.pdf
distclean::
${RM} ${DOCBASE}-${1}.pdf
@@ -338,6 +341,7 @@ define TXT_template
.PHONY: txt-${1} text-${1}
txt-$(1) text-$(1):: ${DOCBASE}-$(1).txt
+
${DOCBASE}-$(1).txt:: ${XMLFILES-${1}} ${1}/fdp-info.xml set-locale-${1}
${XMLLINT} ${XMLLINTOPT} $(1)/$(DOCBASE).xml > $(1)/$(DOCBASE).lint.xml
${XSLTPROC} $(FDPDIR)/docs-common/packaging/strip-for-txt.xsl \
@@ -347,6 +351,9 @@ ${DOCBASE}-$(1).txt:: ${XMLFILES-${1}} ${1}/fdp-info.xml set-locale-${1}
mv $(DOCBASE).stripped.txt $(DOCBASE)-$(1).txt
rm $(1)/$(DOCBASE).stripped.xml
+clean::
+ ${RM} ${1}/${DOCBASE}.stripped.xml
+
distclean::
${RM} ${DOCBASE}-${1}.txt
@@ -465,6 +472,9 @@ help::
@printf ${TFMT} 'po-${1}' 'Creates or updates locale ${1} .PO file'
@printf ${TFMT} 'po/${1}.po' 'Creates or updates locale ${1} .PO file'
+clean::
+ ${RM} .xml2po.mo
+
endef
$(foreach L,${OTHERS},$(eval $(call PO_template,${L})))
@@ -754,6 +764,7 @@ showvars::
LOCALE_ENTITIES='locale-entities.xml'
define LOCALE_template
.PHONY: set-locale-${1}
+
set-locale-${1}::
${LN} -f -s ${FDPDIR}/docs-common/common/entities/entities-${1}.ent \
${LOCALE_ENTITIES}
@@ -774,9 +785,10 @@ $(foreach L,${PRI_LANG} ${OTHERS},$(eval $(call LOCALE_template,${L})))
# 'VALIDATE_template' emits rules and targets to validate the XML for the
# specified ${LANG}
define VALIDATE_template
+
.PHONY: validate-xml-${1}
-validate-xml-${1}: ${XMLFILES-${1}} ${1}/fdp-info.xml
+validate-xml-${1}:: ${XMLFILES-${1}} ${1}/fdp-info.xml set-locale-${1}
${XMLLINT} --noout --xinclude --postvalid ${1}/${DOCBASE}.xml
help::