diff options
Diffstat (limited to 'Makefile.common')
-rw-r--r-- | Makefile.common | 43 |
1 files changed, 39 insertions, 4 deletions
diff --git a/Makefile.common b/Makefile.common index 12a59fc..be1de84 100644 --- a/Makefile.common +++ b/Makefile.common @@ -110,9 +110,13 @@ LN =ln ######################################################################### # 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 @@ LANGUAGES=${PRI_LANG} ${OTHERS} # 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 @@ showvars:: @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' |