diff options
author | Paul W. Frields <stickster@gmail.com> | 2006-08-05 03:50:51 +0000 |
---|---|---|
committer | Paul W. Frields <stickster@gmail.com> | 2006-08-05 03:50:51 +0000 |
commit | 141362ebcca9814b0934ef90c01e3ea1bb8ede80 (patch) | |
tree | c5878719d70519bfd8abe3b1f3c7617479f46867 /Makefile.common | |
parent | 9ba41f4a0d49d466db3d4d051bccfe4e3e78e3a1 (diff) | |
download | fedora-doc-utils-141362ebcca9814b0934ef90c01e3ea1bb8ede80.tar.gz fedora-doc-utils-141362ebcca9814b0934ef90c01e3ea1bb8ede80.tar.xz fedora-doc-utils-141362ebcca9814b0934ef90c01e3ea1bb8ede80.zip |
This change temporarily breaks building but will improve translation
overall. The rpm-info.xml should no longer contain any translations,
and should now be stored in the original language directory. It will
still be used to generate fdp-info.xml, and we will probably also
strip RPM information out of the DTD since we intend to use a standard
specfile for this purpose from here on out.
Diffstat (limited to 'Makefile.common')
-rw-r--r-- | Makefile.common | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/Makefile.common b/Makefile.common index b44c8f8..a95e6df 100644 --- a/Makefile.common +++ b/Makefile.common @@ -102,7 +102,7 @@ ifeq "${PRI_LANG}" "" PRI_LANG= en endif ifeq "${RPMINFO}" "" -RPMINFO = ${PWD}/rpm-info.xml +RPMINFO = rpm-info.xml endif ifeq "${RPMPREP}" "" RPMPREP=yes @@ -684,12 +684,38 @@ help:: ######################################################################### ######################################################################### +# The "${LANG}/rpm-info.xml" file contains the revision information for +# the original DocBook source. We use it to generate the "fdp-info.xml" +# file discussed in the next section. +# +define rpm-info_template +${1}/${RPMINFO}:: po/${1}.po ${PRI_LANG}/${RPMINFO} + mkdir -p ${1} + ${XML2PO} ${XML2POFLAGS} -p po/${1}.po \ + ${PRI_LANG}/${RPMINFO} >$$@ + +clean:: + ${RM} ${1}/${RPMINFO} + +help:: + @printf ${TFMT} '${1}/${RPMINFO}' 'Make translated document revision info' +endef + +# ${PRI_LANG}/${RPMINFO} must exist, only generate for OTHERS +$(foreach L,${OTHERS},$(eval $(call rpm-info_template,${L}))) +# Make sure rpm-info is part of the document PO template +$(foreach L,${LANGUAGES},$(eval XMLFILES-${L}+=${L}/${RPMINFO})) +# +######################################################################### + + +######################################################################### # The "${LANG}/fdp-info.xml" file contains the <articleinfo> or # <bookinfo> stanza. It is automatically generated from data in the # "rpm-info.xml" file whenever that file changes. # define fdp-info_template -$(1)/fdp-info.xml:: $(RPMINFO) +$(1)/fdp-info.xml:: ${1}/$(RPMINFO) mkdir -p ${1} LANG=$(1).UTF-8 ${XSLTPROC} --stringparam lang $(1) \ --stringparam fdpdir $(FDPDIR) \ @@ -697,7 +723,7 @@ $(1)/fdp-info.xml:: $(RPMINFO) doctype ${PRI_LANG}/$(DOCBASE).xml) \ --stringparam legalbase ${LEGALNOTICEBASE} \ ${FDPDIR}/docs-common/packaging/bookinfo.xsl \ - $(RPMINFO) | \ + ${1}/$(RPMINFO) | \ $(XMLFORMAT) $(XMLFOPTS) >$$@ clean:: |