summaryrefslogtreecommitdiffstats
path: root/Makefile.common
diff options
context:
space:
mode:
authorPaul W. Frields <stickster@gmail.com>2007-03-22 03:27:55 +0000
committerPaul W. Frields <stickster@gmail.com>2007-03-22 03:27:55 +0000
commit031a5ea57b350af5b618008a74cea85162eb7af4 (patch)
tree6a5efd9af49d5dc689fd292107e7d32a55a44520 /Makefile.common
parenta90000249ac579a295f9accf7c1af28ae3634acc (diff)
downloadfedora-doc-utils-031a5ea57b350af5b618008a74cea85162eb7af4.tar.gz
fedora-doc-utils-031a5ea57b350af5b618008a74cea85162eb7af4.tar.xz
fedora-doc-utils-031a5ea57b350af5b618008a74cea85162eb7af4.zip
Move OMF stuff into proper position since it relies on XMLFILES.
Diffstat (limited to 'Makefile.common')
-rw-r--r--Makefile.common218
1 files changed, 109 insertions, 109 deletions
diff --git a/Makefile.common b/Makefile.common
index eba493b..d158b32 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -340,115 +340,6 @@ help::
#########################################################################
-###########
-#
-# Get or build OMF.
-#
-# If the per-doc Makefile provides a ${OMFINFILES} list, we use those.
-# If it does not:
-# 1. look for ${PRI_LANG}/*.omf.in and use those; or, failing that,
-# 2. if ${BUILDOMF} is defined, make one using XSLT and rpm-info data.
-#
-# The template OMF files are expected to use @VARNAME@ notation to
-# allow replacement of their content dynamically at build time. They
-# should retain this notation during PO/POT conversion so that
-# translators never have to worry about that content. Substitution
-# only occurs during the packaging process.
-#
-
-# FIXME: There may not be a need to have the ${PRI_LANG} prefixing
-# each entry in ${OMFINFILES}. Might be a good idea to take that out.
-
-# if OMFINFILES is empty, try and get the file list.
-# If it's still empty, and BUILDOMF is set, use that to populate the list.
-# Otherwise it stays empty. After all, we may not want them at all.
-
-ifeq "${OMFINFILES}" ""
-OMFINFILES=$(foreach F,$(wildcard ${PRI_LANG}/*.omf.in),$(shell basename ${F}))
-ifeq "${OMFINFILES}" ""
-ifdef BUILDOMF
-OMFINFILES=${PKGNAME}.omf.in
-${PRI_LANG}/${PKGNAME}.omf.in:: ${PRI_LANG}/${RPMINFO}
- ${XSLTPROC} --stringparam lang ${PRI_LANG} \
- --stringparam docbase ${PKGNAME} \
- ${FDPCOMMONDIR}/packaging/omf-in.xsl \
- $< > $@
-endif
-endif
-endif
-
-showvars::
- @echo "OMFINFILES=\"${OMFINFILES}\""
-
-define OMFVAR_template
-$(foreach F,${OMFINFILES},$(eval OMFINFILES-${1}+=${1}/${F}))
-$(foreach F,${OMFINFILES},$(eval OMFFILES-${1}+=$(patsubst %.in,${1}/%,${F})))
-showvars-debug::
- @echo "OMFFILES-${1}=\"${OMFFILES-${1}}\""
-endef
-
-$(foreach L,${LANGUAGES},$(eval $(call OMFVAR_template,${L})))
-
-define OMFIN_template
-.PHONY: omf-in-${1}
-omf-in-${1}:: ${OMFINFILES-${1}}
-# Treat .omf.in files just like XML... since they are!
-$(foreach F,${OMFINFILES},$(eval $(call XML_template,${1},${PRI_LANG}/${F})))
-
-clean::
- ${RM} ${OMFINFILES-${1}}
-
-help::
- @printf ${TFMT} 'omf-in-${1}' 'Make OMF input file for ${1}'
-
-endef
-
-$(foreach L,${OTHERS},$(eval $(call OMFIN_template,${L})))
-
-.PHONY: omf-in
-omf-in:: $(foreach L,${LANGUAGES},${OMFINFILES-${L}})
-
-help::
- @printf ${TFMT} 'omf-in' 'Make all OMF input files'
-
-
-# To make the real OMF, just do a quick bit of sed processing.
-# The spacing in the second command is purposeful to ensure no extra
-# space appears in the sed command.
-#
-# Note the difference between @LANG@ and @LANGC@: the former is always
-# replaced by the locale name, whereas the latter is replaced by the
-# locale name *unless* the locale is en_US, in which case it is replaced
-# by "C", the fallback.
-%.omf: %.omf.in
- sed -e 's!@RELEASE@!${VERSION}!g' $< > $@
- sed -i 's!@DATE@!${REVDATE}!g' $@
- sed -i 's!@LANG@!$(patsubst %/$(shell basename $<),%,$<)!g' $@
- sed -i 's!@LANGC@!$(if $(findstring en_US,$(patsubst \
- %/$(shell basename $<),%,$<)),C,$(patsubst \
- %/$(shell basename $<),%,$<))!g' $@
-
-
-define OMF_template
-.PHONY: omf-${1}
-omf-${1}:: ${OMFFILES-${1}}
-
-clean::
- ${RM} ${OMFFILES-${1}}
-
-help::
- @printf ${TFMT} 'omf-${1}' 'Make all OMF files for ${1} locale'
-
-endef
-
-$(foreach L,${LANGUAGES},$(eval $(call OMF_template,${L})))
-
-.PHONY: omf
-omf:: $(foreach L,${LANGUAGES},${OMFFILES-${L}})
-help::
- @printf ${TFMT} 'omf' 'Make all OMF files for all locales'
-# End of OMF ###############################
-
#########################################################################
# Rules to generate the "${LANG}/${DOC_ENTITIES}.ent" file, if used
define DOC_ENTITIES_template
@@ -597,6 +488,115 @@ distclean::
$(foreach L,${OTHERS},${RM} -r ${L})
#########################################################################
+###########
+#
+# Get or build OMF.
+#
+# If the per-doc Makefile provides a ${OMFINFILES} list, we use those.
+# If it does not:
+# 1. look for ${PRI_LANG}/*.omf.in and use those; or, failing that,
+# 2. if ${BUILDOMF} is defined, make one using XSLT and rpm-info data.
+#
+# The template OMF files are expected to use @VARNAME@ notation to
+# allow replacement of their content dynamically at build time. They
+# should retain this notation during PO/POT conversion so that
+# translators never have to worry about that content. Substitution
+# only occurs during the packaging process.
+#
+
+# FIXME: There may not be a need to have the ${PRI_LANG} prefixing
+# each entry in ${OMFINFILES}. Might be a good idea to take that out.
+
+# if OMFINFILES is empty, try and get the file list.
+# If it's still empty, and BUILDOMF is set, use that to populate the list.
+# Otherwise it stays empty. After all, we may not want them at all.
+
+ifeq "${OMFINFILES}" ""
+OMFINFILES=$(foreach F,$(wildcard ${PRI_LANG}/*.omf.in),$(shell basename ${F}))
+ifeq "${OMFINFILES}" ""
+ifdef BUILDOMF
+OMFINFILES=${PKGNAME}.omf.in
+${PRI_LANG}/${PKGNAME}.omf.in:: ${PRI_LANG}/${RPMINFO}
+ ${XSLTPROC} --stringparam lang ${PRI_LANG} \
+ --stringparam docbase ${PKGNAME} \
+ ${FDPCOMMONDIR}/packaging/omf-in.xsl \
+ $< > $@
+endif
+endif
+endif
+
+showvars::
+ @echo "OMFINFILES=\"${OMFINFILES}\""
+
+define OMFVAR_template
+$(foreach F,${OMFINFILES},$(eval OMFINFILES-${1}+=${1}/${F}))
+$(foreach F,${OMFINFILES},$(eval OMFFILES-${1}+=$(patsubst %.in,${1}/%,${F})))
+showvars-debug::
+ @echo "OMFFILES-${1}=\"${OMFFILES-${1}}\""
+endef
+
+$(foreach L,${LANGUAGES},$(eval $(call OMFVAR_template,${L})))
+
+define OMFIN_template
+.PHONY: omf-in-${1}
+omf-in-${1}:: ${OMFINFILES-${1}}
+# Treat .omf.in files just like XML... since they are!
+$(foreach F,${OMFINFILES},$(eval $(call XML_template,${1},${PRI_LANG}/${F})))
+
+clean::
+ ${RM} ${OMFINFILES-${1}}
+
+help::
+ @printf ${TFMT} 'omf-in-${1}' 'Make OMF input file for ${1}'
+
+endef
+
+$(foreach L,${OTHERS},$(eval $(call OMFIN_template,${L})))
+
+.PHONY: omf-in
+omf-in:: $(foreach L,${LANGUAGES},${OMFINFILES-${L}})
+
+help::
+ @printf ${TFMT} 'omf-in' 'Make all OMF input files'
+
+
+# To make the real OMF, just do a quick bit of sed processing.
+# The spacing in the second command is purposeful to ensure no extra
+# space appears in the sed command.
+#
+# Note the difference between @LANG@ and @LANGC@: the former is always
+# replaced by the locale name, whereas the latter is replaced by the
+# locale name *unless* the locale is en_US, in which case it is replaced
+# by "C", the fallback.
+%.omf: %.omf.in
+ sed -e 's!@RELEASE@!${VERSION}!g' $< > $@
+ sed -i 's!@DATE@!${REVDATE}!g' $@
+ sed -i 's!@LANG@!$(patsubst %/$(shell basename $<),%,$<)!g' $@
+ sed -i 's!@LANGC@!$(if $(findstring en_US,$(patsubst \
+ %/$(shell basename $<),%,$<)),C,$(patsubst \
+ %/$(shell basename $<),%,$<))!g' $@
+
+
+define OMF_template
+.PHONY: omf-${1}
+omf-${1}:: ${OMFFILES-${1}}
+
+clean::
+ ${RM} ${OMFFILES-${1}}
+
+help::
+ @printf ${TFMT} 'omf-${1}' 'Make all OMF files for ${1} locale'
+
+endef
+
+$(foreach L,${LANGUAGES},$(eval $(call OMF_template,${L})))
+
+.PHONY: omf
+omf:: $(foreach L,${LANGUAGES},${OMFFILES-${L}})
+help::
+ @printf ${TFMT} 'omf' 'Make all OMF files for all locales'
+# End of OMF ###############################
+
#########################################################################
# For each LANG in LANGUAGES, generate a target and rule similar to:
# mydoc-en/index.html:: mydoc-en.xml ${XMLEXTRAFILES}-en