press-release Makefile,1.9,1.10 pt.po,1.2,NONE
Tommy Reynolds (jtr)
fedora-docs-commits at redhat.com
Sun Aug 13 19:25:55 UTC 2006
Author: jtr
Update of /cvs/docs/press-release
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14538
Modified Files:
Makefile
Removed Files:
pt.po
Log Message:
Open for business
Index: Makefile
===================================================================
RCS file: /cvs/docs/press-release/Makefile,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- Makefile 11 Apr 2006 00:06:06 -0000 1.9
+++ Makefile 13 Aug 2006 19:25:52 -0000 1.10
@@ -1,195 +1,34 @@
########################################################################
-# The ${DOC_BASE} symbol provides the basic name for this document.
-DOC_BASE=fdp-pr
-########################################################################
-# The ${PRI_LANG} symbol gives the locale for the original language for
-# the document.
-PRI_LANG=en_US
-########################################################################
-# The ${OTHERS} symbol is a list of additional locales into which the
-# document is to be translated.
-# OTHERS=de es it no
-OTHERS=pt
-########################################################################
-# WARNING! Make no changes below this line or you will void the
-# warranty ;-)
-########################################################################
-# Provide some utility macros
-XMLTO =xmlto
-XMLTOFLAGS=-m params.xsl
-XSL =fdp-pr.xsl
-SED =/bin/sed
-XML2PO =xml2po
-MSGMERGE=msgmerge
-MSGMERGEFLAGS=
-########################################################################
-LANGUAGES=${PRI_LANG} ${OTHERS}
-########################################################################
-# Define our own set of suffixes to streamline the process
-.SUFFIXES:
-.SUFFIXES: .txt .pdf .po .pot .xml .xsl .dtd .in
-########################################################################
-# Mark the proper virtual targets so that a "make -t all" does not create
-# an empty file called "all".
-.PHONY: all clean distclean clobber pot help
-########################################################################
-# The default target "all"
-all:: ${DOC_BASE}.pot
-all:: $(foreach LOCALE,${LANGUAGES},${DOC_BASE}-${LOCALE}.pdf)
-# FIXME all:: $(foreach LOCALE,${LANGUAGES},${DOC_BASE}-${LOCALE}.txt)
-########################################################################
-HFMT =%-31s\t%s\n
-help::
- @printf "${HFMT}" "all" "Default target; generate PDF's"
- @printf "${HFMT}" "clean" "Delete temporary files"
- @printf "${HFMT}" "distclean" "Delete output and temporary files"
- @printf "${HFMT}" "clobber" "Delete output and temporary files"
- @printf "${HFMT}" "help" "This message; use 'make help|sort'"
-########################################################################
-# Compute the rules to transform our XML documents into both PDF and TXT
-# forms
-define PDF_template
-.PHONY: pdf-${1}
-
-pdf-${1}:: ${DOC_BASE}-${1}.pdf
-
-help::
- @printf "${HFMT}" "pdf-${1}" "Generate PDF for locale '${1}'"
-
-${DOC_BASE}-$(1).pdf:: ${DOC_BASE}-$(1).xml params.xsl.in ${XSL}
- LC_ALL=${1}.UTF-8 ${SED} \
- -e "s|DATE|$$(shell LC_ALL=${1} date +'%x %X')|" \
- -e "s|LANG|${1}|" \
- params.xsl.in >params.xsl
- LC_ALL=${1}.UTF-8 ${XMLTO} -x ${XSL} ${XMLTOFLAGS} pdf \
- ${DOC_BASE}-$(1).xml
-
-help::
- @printf "${HFMT}" "${DOC_BASE}-${1}.pdf" "Render PDF for locale '${1}'"
-
-distclean::
- ${RM} ${DOC_BASE}-${1}.pdf
-endef
-
-$(foreach LOCALE,${LANGUAGES},$(eval $(call PDF_template,${LOCALE})))
-########################################################################
-
-########################################################################
-define TXT_template
-# This assumes w3m(1) is installed. The stock xmlto RPM uses it.
-XMLPOSTFLAGS=-p '-cols 72'
-
-.PHONY: txt-${1}
-
-txt-${1}:: ${DOC_BASE}-${1}.txt
-
-help::
- @printf "${HFMT}" "txt-${1}" "Generate text version for locale '${1}'"
-
-${DOC_BASE}-$(1).txt:: ${DOC_BASE}-$(1).xml params.xsl.in ${XSL}
- LC_ALL=${1}.UTF-8 ${SED} \
- -e "s|DATE|$$(shell LC_ALL=${1} date +'%x %X')|" \
- params.xsl.in >params.xsl
- LC_ALL=${1}.UTF-8 ${XMLTO} -x ${XSL} ${XMLTOFLAGS} $${XMLPOSTFLAGS} \
- txt ${DOC_BASE}-$(1).xml
-
-help::
- @printf "${HFMT}" "${DOC_BASE}-${1}.txt" "Render locale '${1}' text"
-
-distclean::
- ${RM} ${DOC_BASE}-${1}.txt
-endef
-# FIXME $(foreach LOCALE,${LANGUAGES},$(eval $(call TXT_template,${LOCALE})))
-########################################################################
-# Always generate the current date.
-params.xsl: params.xsl.in Makefile
- ${SED} -e "s|DATE|$$(LC_ALL=${PRI_LANG} date +'%x %X')|" \
- -e "s|LANG|${PRI_LANG}|" \
- $< >$@.tmp && move-if-change $@.tmp $@
-
-help::
- @printf "${HFMT}" "params.xsl" "Generate dynamic parameters"
-########################################################################
-# The ${DOC_BASE}.pot target produces a new .POT file everytime the
-# original XML file is updated.
-.PHONY: pot
-
-pot:: ${DOC_BASE}.pot
-
-help::
- @printf "${HFMT}" "pot" "Generate .POT file for translation"
-
-${DOC_BASE}.pot:: ${DOC_BASE}-${PRI_LANG}.xml
- xml2po -o $@ $<
-
-help::
- @printf "${HFMT}" "${DOC_BASE}.pot" "Generate .POT file for translation"
-########################################################################
-# Compute the rules to create or update a language-specific .po file
-# any time the ${DOC_BASE}.pot file is updated. We try to avoid losing
-# current .PO translations by calling msgmerge if a .po file already
-# exists.
-define PO_template
-.PHONY: po-${1}
-po-${1}:: ${1}.po
-
-help::
- @printf "${HFMT}" "po-${1}" "Update translations for locale '${1}'"
-
-.PRECIOUS: ${1}.po
-${1}.po:: ${DOC_BASE}.pot
- @if [ ! -f ${1}.po ]; then \
- echo Creating pristine ${1}.po; \
- cp ${DOC_BASE}.pot ${1}.po; \
- else \
- echo Updating existing ${1}.po; \
- ${MSGMERGE} ${MSGMERGEFLAGS} \
- ${1}.po $${DOC_BASE}.pot >${1}.po; \
- fi
-
-help::
- @printf "${HFMT}" "${1}.po" "Update translations for locale '${1}'"
-endef
-
-$(foreach LOCALE,${OTHERS},$(eval $(call PO_template,${LOCALE})))
-########################################################################
-# Compute the rules and targets to generate the translated XML files
-# given an updated .PO file and the source XML file.
-define NEWLANG_template
-.PHONY: xml-${1}
-xml-${1}:: ${DOC_BASE}-${1}.xml
-
-help::
- @printf "${HFMT}" "xml-${1}" "Translate XML for locale '${1}'"
-
-${DOC_BASE}-${1}.xml:: ${DOC_BASE}-${PRI_LANG}.xml ${1}.po
- ${XML2PO} -p ${1}.po ${DOC_BASE}-${PRI_LANG}.xml >${DOC_BASE}-${1}.xml
-
-help::
- @printf "${HFMT}" "${DOC_BASE}-${1}.xml" "Create XML for locale '${1}'"
-
-clean::
- ${RM} ${DOC_BASE}-${1}.xml
-endef
-
-$(foreach LOCALE,${OTHERS},$(eval $(call NEWLANG_template,${LOCALE})))
-
-.PHONY: xml-${PRI_LANG}
-
-xml-${PRI_LANG}:: ${DOC_BASE}-${PRI_LANG}.xml
-
-help::
- @printf "${HFMT}" "${DOC_BASE}-${PRI_LANG}.xml" "Primary XML"
-########################################################################
-clean::
- ${RM} params.xsl
-distclean clobber:: clean
-########################################################################
-.PHONY: mrproper
-mrproper:: distclean
- ${RM} *.po
- ${RM} *.pdf
- ${RM} *.txt
-########################################################################
-# End of Makefile
+# WARNING! WARNING! DANGER, WILL ROBINSON!
########################################################################
+# If you are a press release author, you do NOT need to do anything in
+# this directory and you MUST NOT edit this "Makefile". You will void
+# the warranty ;-)
+########################################################################
+# NOTES TO DOCUMENT AUTHORS AND TRANSLATORS
+# -----------------------------------------
+#
+# Steps to add a press release:
+# 1) Create a new directory under "releases/" such as "releases/foo".
+# 2) Copy the "tools/Sample-makefile" to "releases/foo/Makefile".
+# 3) Fill in the DOC_BASE, PRI_LANG and OTHERS definitions in the
+# "releases/foo/Makefile"
+# 4) Key in your document as "releases/foo/${DOC_BASE}-${PRI_LANG}.xml"
+# 5) Build your document with a simple "$ make" command.
+########################################################################
+SUBDIRS :=$(foreach doc,$(shell ls releases | fgrep -v CVS),releases/${doc})
+TARGETS =all clean distclean clobber pot help po pot pdf showvars mrproper
+TARGET =all
+
+.PHONY: ${RELEASES} ${TARGETS} ${SUBDIRS}
+
+${TARGETS}::
+ ${MAKE} TARGET=$@ ${SUBDIRS}
+
+${SUBDIRS}::
+ ${MAKE} -C $@ ${TARGET}
+
+showvars::
+ @echo "SUBDIRS=${SUBDIRS}"
+ @echo "TARGETS=${TARGETS}"
+ @echo "TARGET=${TARGET}"
--- pt.po DELETED ---
More information about the docs-commits
mailing list