diff options
Diffstat (limited to 'common/entities/Makefile')
-rw-r--r-- | common/entities/Makefile | 36 |
1 files changed, 13 insertions, 23 deletions
diff --git a/common/entities/Makefile b/common/entities/Makefile index d146271..bcff8f2 100644 --- a/common/entities/Makefile +++ b/common/entities/Makefile @@ -1,5 +1,5 @@ PRI_LANG=en_US -OTHERS =en it pt_BR ru zh_CN +OTHERS =de en it pt_BR ru zh_CN ####################################################################### # PLEASE: @@ -25,16 +25,6 @@ ENTFILES=$(foreach L,${PRI_LANG} ${OTHERS},entities-${L}.ent) ####################################################################### ####################################################################### -# Rule: Apply stylesheet to transform XML into locale-specific ".ent" -# entities file -# -%.ent: %.xml - xsltproc -o $@ --stringparam FDPCOMMONDIR "${FDPCOMMONDIR}" \ - entities.xsl $< -# -####################################################################### - -####################################################################### # Printf(1) format string for describing targets by "make help". HELPFMT ="%-23s\t| %s.\n" # @@ -63,7 +53,7 @@ help:: ####################################################################### ####################################################################### -# Target 'entities.pot' makes a TEMPORARY seed translation file. We +# Target 'entities.pot' makes a seed translation file. We # use the original-language entities XML file as the source. # .PHONY: pot @@ -71,6 +61,9 @@ help:: pot entities.pot:: entities-${PRI_LANG}.xml xml2po -o entities.pot $< +distclean:: + ${RM} entities.pot + help:: @printf ${HELPFMT} "make pot" "Create template PO file" @printf ${HELPFMT} "make entities.pot" "Create template PO file" @@ -174,19 +167,16 @@ distclean clobber:: clean ${RM} ${ENTFILES} help:: - @printf ${HELPFMT} "make distclean" "Delete all generated files" - @printf ${HELPFMT} "make clobber" "Delete all generated files" + @printf ${HELPFMT} "make distclean" "Delete all generated files" + @printf ${HELPFMT} "make clobber" "Delete all generated files" # ####################################################################### ####################################################################### -# We create EXACTLY one .POT file, and treat is as a temporary file. -# Do NOT EDIT the .POT file if you are sharing this directory! -# -entities.pot:: entities-${PRI_LANG}.xml - xml2po -o $@ $< - -help:: - @printf ${HELPFMT} "make entities.pot" "Create template .PO file" -# +define ENT_template +entities-${1}.ent:: entities-${1}.xml entities.pot + xsltproc -o @$@ --stringparam FDPCOMMONDIR "${FDPCOMMONDIR}" \ + entities.xsl entities-${1}.xml +endef +$(foreach L,${PRI_LANG} ${OTHERS},$(eval $(call ENT_template,${L}))) ####################################################################### |