summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTommy Reynolds <Tommy.Reynolds@MegaCoder.com>2006-02-03 15:52:52 +0000
committerTommy Reynolds <Tommy.Reynolds@MegaCoder.com>2006-02-03 15:52:52 +0000
commitff480e0d573422fa2d0a7d3ffc59f3c6b5b79852 (patch)
treeddadb5f4aff2e159767c215fe87e26cb0124d122
parentaa73c5041ebb7f99ead9d584dfb09ad7995504e7 (diff)
downloadfedora-doc-utils-ff480e0d573422fa2d0a7d3ffc59f3c6b5b79852.tar.gz
fedora-doc-utils-ff480e0d573422fa2d0a7d3ffc59f3c6b5b79852.tar.xz
fedora-doc-utils-ff480e0d573422fa2d0a7d3ffc59f3c6b5b79852.zip
Added "make po" target to generate PO files for all the "en" XML files
for the project. File "foo-en.xml" will be associated with a "foo-en.po" file, which may be edited and then merged into a new translation using the fdpsh "apply_po foo-en.xml>foo-xx.xml" command.
-rw-r--r--Makefile.common21
1 files changed, 20 insertions, 1 deletions
diff --git a/Makefile.common b/Makefile.common
index d4d4eea..f145690 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -65,6 +65,13 @@ XMLTO =xmlto
XSLTPROC=xsltproc
XMLFORMAT=xmlformat
XMLFOPTS=-f $(FDPDIR)/docs-common/bin/xmlformat-fdp.conf
+XML2PO =xml2po
+#########################################################################
+# Rules to produce .po files from .xml files. Get the tools to do this
+# from the gnome-doc-utils RPM.
+.SUFFIXES: .po .xml
+%.po: %.xml
+ ${XML2PO} $< >$@
#########################################################################
# Use our very own "docs-common/bin/fdpsh" as the command interpreter
# This automatically has ${FDPBIN} as first in the ${PATH}
@@ -91,10 +98,16 @@ RPMJUNK = \
--define "_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" \
FIXME
#########################################################################
+# Set a provisional ${LANG} value. We'll dynamically change this as
+# needed. The "en" value is used because that is the original language
+# of most of our current documentation.
+LANG =en
+#########################################################################
# PUT NO TARGETS BEFORE THIS ONE, not even in your base Makefile
# In a properly-constructed Makefile, this will be the default target
-TARGETS=all tarball pdf html html-nochunks clean distclean showvars fdp-info
+TARGETS=all clean distclean fdp-info html html-nochunks pdf po showvars \
+ tarball
.PHONY: ${TARGETS}
.PHONY: $(foreach LANG,${LANGUAGES},html-${LANG})
.PHONY: $(foreach LANG,${LANGUAGES},html-nochunks-${LANG})
@@ -204,6 +217,11 @@ $(foreach LANG,${LANGUAGES},$(eval $(call DISTCLEAN_template,${LANG})))
#
distclean:: $(foreach LANG,${LANGUAGES},${DOCBASE}-${LANG}-distclean)
#########################################################################
+# Target "po" produces ".po" files from the manifested XML files for
+# the current language.
+POFILES =${DOCBASE}-${LANG}.po ${XMLEXTRAFILES-${LANG}:.xml=.po}
+po:: ${POFILES}
+#########################################################################
#
showvars::
@echo "DOCBASE=\"$(DOCBASE)\""
@@ -276,6 +294,7 @@ distclean::
${RM} *.desktop
${RM} *.spec
${RM} *.src.tar.gz
+ ${RM} *.po
spec:: ${SPECFILE}