docs-common Makefile.common,1.37,1.38
Tommy Reynolds (jtr)
fedora-docs-commits at redhat.com
Fri Feb 3 15:53:12 UTC 2006
Author: jtr
Update of /cvs/docs/docs-common
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18306
Modified Files:
Makefile.common
Log Message:
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.
Index: Makefile.common
===================================================================
RCS file: /cvs/docs/docs-common/Makefile.common,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- Makefile.common 31 Jan 2006 17:58:20 -0000 1.37
+++ Makefile.common 3 Feb 2006 15:52:52 -0000 1.38
@@ -65,6 +65,13 @@
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 @@
--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 @@
#
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 @@
${RM} *.desktop
${RM} *.spec
${RM} *.src.tar.gz
+ ${RM} *.po
spec:: ${SPECFILE}
More information about the Fedora-docs-commits
mailing list