docs-common Makefile.common,1.82,1.83
Tommy Reynolds (jtr)
fedora-docs-commits at redhat.com
Wed Mar 1 23:38:04 UTC 2006
Author: jtr
Update of /cvs/docs/docs-common
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6313
Modified Files:
Makefile.common
Log Message:
Added support for per-document translatable entities file.
Index: Makefile.common
===================================================================
RCS file: /cvs/docs/docs-common/Makefile.common,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -r1.82 -r1.83
--- Makefile.common 1 Mar 2006 22:33:46 -0000 1.82
+++ Makefile.common 1 Mar 2006 23:37:57 -0000 1.83
@@ -110,9 +110,13 @@
#########################################################################
# Rules to produce .po files from .xml files. Get the tools to do this
# from the gnome-doc-utils RPM.
-.SUFFIXES: .po .pot .xml
+.SUFFIXES: .po .pot .ent .xml
%.po: %.xml
${XML2PO} $< >$@
+
+%.ent: %.xml
+ ${XSLTPROC} -o $@ --stringparam FDPCOMMONDIR "NONE" \
+ ${FDPDIR}/docs-common/common/entities/entities.xsl $<
#########################################################################
#########################################################################
@@ -152,7 +156,18 @@
# Expand the template the XMLFILES_template to produce XMLFILES-${LANG}
# macros that enumerate all of the input files for the document.
+define XMLFILENAME_template
+showvars::
+ @echo "XMLFILES-${1}=$${XMLFILES-${1}}"
+endef
+
$(foreach L,${LANGUAGES},$(eval $(call XMLFILES_template,${L})))
+# Append per-document entities file if any
+ifneq "${DOC_ENTITIES}" ""
+$(foreach L, ${LANGUAGES}, $(eval XMLFILES-${L}+=${L}/${DOC_ENTITIES}.xml))
+endif
+
+$(foreach L, ${LANGUAGES},$(eval $(call XMLFILENAME_template,${L})))
#
#########################################################################
@@ -757,20 +772,40 @@
@echo "PWD=$(PWD)"
#########################################################################
+define DOC_ENTITIES_template
+${1}/${DOC_ENTITIES}.ent:: ${1}/${DOC_ENTITIES}.xml
+endef
+
+ifneq "${DOC_ENTITIES}" ""
+$(foreach L, ${PRI_LANG} ${OTHERS},$(eval $(call DOC_ENTITIES_template,${L})))
+
+showvars::
+ echo "DOC_ENTITIES=${DOC_ENTITIES}"
+endif
+
+#########################################################################
+
+#########################################################################
# 'LOCALE_template' issues rules and targets to symbolicly link the local
# file 'locale-entities.xml' to the per-locale entity files located in
# the "docs-common/common/entities/" directory.
#
-LOCALE_ENTITIES='locale-entities.xml'
+FDP_ENTITIES=fdp-entities.ent
define LOCALE_template
.PHONY: set-locale-${1}
set-locale-${1}::
${LN} -f -s ${FDPDIR}/docs-common/common/entities/entities-${1}.ent \
- ${LOCALE_ENTITIES}
+ ${FDP_ENTITIES}
+ifneq "${DOC_ENTITIES}" ""
+ ${LN} -f -s ${1}/${DOC_ENTITIES}.ent .
+endif
clean::
- ${RM} ${LOCALE_ENTITIES}
+ ${RM} ${FDP_ENTITIES}
+ifneq "${DOC_ENTITIES}" ""
+ ${RM} ${DOC_ENTITIES}
+endif
help::
@printf ${TFMT} 'set-locale-${1}' 'Link to locale ${1} FDP entities'
More information about the docs-commits
mailing list