diff options
author | Tommy Reynolds <Tommy.Reynolds@MegaCoder.com> | 2006-02-20 08:44:56 +0000 |
---|---|---|
committer | Tommy Reynolds <Tommy.Reynolds@MegaCoder.com> | 2006-02-20 08:44:56 +0000 |
commit | 5d0bf54aaefd2a2c63b86b981c3e708004fbc35f (patch) | |
tree | cf8b01ad7d7239b248919874f77a4d269f183a06 | |
parent | 59034febbc799ab0d9728c6374d5cd186343ebd4 (diff) | |
download | fedora-doc-utils-5d0bf54aaefd2a2c63b86b981c3e708004fbc35f.tar.gz fedora-doc-utils-5d0bf54aaefd2a2c63b86b981c3e708004fbc35f.tar.xz fedora-doc-utils-5d0bf54aaefd2a2c63b86b981c3e708004fbc35f.zip |
Added "make targets" to see a list of all targets for the current
"Makefile". It looks much better if you sort the output:
make targets | sort
Needs some entries fleshed out.
-rw-r--r-- | Makefile.common | 130 |
1 files changed, 128 insertions, 2 deletions
diff --git a/Makefile.common b/Makefile.common index d1432fe..5630bdc 100644 --- a/Makefile.common +++ b/Makefile.common @@ -157,12 +157,16 @@ $(foreach L,${LANGUAGES},$(eval $(call XMLFILES_template,${L}))) ######################################################################### ######################################################################### +TFMT="%-31s -- %s\n" +######################################################################### + +######################################################################### # PUT NO TARGETS BEFORE THIS ONE, not even in your base Makefile # In a properly-constructed Makefile, this will be the default target TARGETS=all clean distclean fdp-info html html-nochunks pdf po showvars \ tarball rpm rpm-common noarch srpm package-prep package-post \ - src-tarball txt text + src-tarball txt text targets # FIXME: add the .PHONY attribute where the actual target is defined @@ -173,6 +177,28 @@ TARGETS=all clean distclean fdp-info html html-nochunks pdf po showvars \ all:: html html-nochunks tarball # pdf +targets:: + @printf ${TFMT} 'targets' 'Outputs target summaries' + @printf ${TFMT} 'text' 'Same as "txt" target' + @printf ${TFMT} 'txt' 'Renders XML into ASCII text file' + @printf ${TFMT} 'src-tarball' 'FIXME' + @printf ${TFMT} 'package-post' 'FIXME' + @printf ${TFMT} 'package-prep' 'FIXME' + @printf ${TFMT} 'srpm' 'FIXME' + @printf ${TFMT} 'noarch' 'FIXME' + @printf ${TFMT} 'rpm-common' 'FIXME' + @printf ${TFMT} 'rpm' 'Builds RPM packages' + @printf ${TFMT} 'tarball' 'Packages HTML files into tar(1) archive' + @printf ${TFMT} 'clean' 'Removes temporary files' + @printf ${TFMT} 'distclean' 'Removes product files and temporaries' + @printf ${TFMT} 'fdp-info' 'Produces all $${LANG}/fdp-info.xml' + @printf ${TFMT} 'all' 'Builds html, html-nochunks, and tarball' + @printf ${TFMT} 'html' 'Renders XML into chunked HTML' + @printf ${TFMT} 'html-nochunks' 'Renders XML into one big HTML file' + @printf ${TFMT} 'pdf' 'Renders XML into one PDF file' + @printf ${TFMT} 'po' 'Updates .PO files for all $${OTHERS} locales' + @printf ${TFMT} 'showvars' 'Displays convenient make(1) variables' + ${TARGETS}:: ######################################################################### @@ -209,6 +235,10 @@ endif distclean:: ${RM} -r ${DOCBASE}-${1} + +targets:: + @printf ${TFMT} 'html-${1}' 'Renders XML into locale ${1}' + @printf ${TFMT} '${1}/index.html' 'Renders XML into locale ${1}' endef $(foreach L,${LANGUAGES},$(eval $(call HTML_template,${L}))) @@ -239,6 +269,10 @@ distclean:: ${RM} -r stylesheet-images ${RM} fedora.css ${RM} watermark.png + +targets:: + @printf ${TFMT} 'html-nochunks-${1}' 'Renders XML into locale ${1} HTML' + @printf ${TFMT} '${DOCBASE}-${1}.html' 'Renders XML into locale ${1} HTML' endef $(foreach L,${LANGUAGES},$(eval $(call HTMLNOCHUNK_template,${L}))) @@ -259,6 +293,9 @@ ${DOCBASE}-$(1).tar.gz:: ${DOCBASE}-$(1)/index.html distclean:: ${RM} ${DOCBASE}-${1}.tar.gz + +targets:: + @printf ${TFMT} '${DOCBASE}-${1}.tar.gz' 'Tar archive of HTML and images' endef $(foreach L,${LANGUAGES},$(eval $(call HTMLTAR_template,${L}))) @@ -280,6 +317,11 @@ pdf-$(1) ${DOCBASE}-$(1).pdf:: ${XMLFILES-${1}} ${1}/fdp-info.xml distclean:: ${RM} ${DOCBASE}-${1}.pdf + +targets:: + @printf ${TFMT} 'pdf-${1}' 'Renders XML into PDF file for locale ${1}' + @printf ${TFMT} '${DOCBASE}-${1}.pdf' 'Renders XML into PDF file' + endef $(foreach L,${LANGUAGES},$(eval $(call PDF_template,${L}))) @@ -303,6 +345,12 @@ txt-$(1) text-$(1) ${DOCBASE}-$(1).txt:: ${XMLFILES-${1}} ${1}/fdp-info.xml distclean:: ${RM} ${DOCBASE}-${1}.txt + +targets:: + @printf ${TFMT} 'txt-${1}' 'Renders XML into ASCII text for locale ${1}' + @printf ${TFMT} 'text-${1}' 'Renders XML into ASCII text for locale ${1}' + @printf ${TFMT} '${DOCBASE}-${1}.txt' 'Renders XML into ASCII text for locale ${1}' + endef $(foreach L,${LANGUAGES},$(eval $(call TXT_template,${L}))) @@ -323,6 +371,10 @@ po/${DOCBASE}.pot:: ${XMLFILES-${PRI_LANG}} [ -d po ] || (echo ADD po/ TO CVS >&2; exit 1) ${XML2PO} -o $@ $^ +targets:: + @printf ${TFMT} 'po' 'Writes one ${PRI_LANG} PO file for all XML' + @printf ${TFMT} 'po/${DOCBASE}.pot' 'Writes one PO file for all XML' + .PHONY: pot pot:: po/${DOCBASE}.pot @@ -335,6 +387,10 @@ ${1}:: distclean:: ${RM} -r ${1} + +targets:: + @printf ${TFMT} '${1}' 'Creates translated XML working directory' + endef $(foreach L,${OTHERS},$(eval $(call DIR_template,${L}))) @@ -357,18 +413,28 @@ xml-${1}:: ${XMLFILES-${1}} distclean:: ${RM} -r ${1} + +targets:: + @printf ${TFMT} 'xml-${1}' 'Produces translated XML for locale ${1}' + endef .PHONY: xml-${PRI_LANG} xml-${PRI_LANG}:: ${XMLFILES-${PRI_LANG}} +targets:: + @printf ${TFMT} 'xml-${PRI_LANG}' 'Comfirms primary language XML files.' + $(foreach L,${OTHERS},$(eval $(call XMLTARGET_template,${L}))) .PHONY: xml-all xml-all:: $(foreach L,${LANGUAGES},xml-${L}) +targets:: + @printf ${TFMT} 'xml-all' 'Creates all XML locale files' + distclean:: $(foreach L,${OTHERS},${RM} -r ${L}) ######################################################################### @@ -386,6 +452,11 @@ po/${1}.po:: ${XMLFILES-${PRI_LANG}} po/${DOCBASE}.pot .PHONY: po-${1} po-${1}:: po/${1}.po + +targets:: + @printf ${TFMT} 'po-${1}' 'Creates or updates locale ${1} .PO file' + @printf ${TFMT} 'po/${1}.po' 'Creates or updates locale ${1} .PO file' + endef $(foreach L,${OTHERS},$(eval $(call PO_template,${L}))) @@ -416,6 +487,10 @@ DIFFS =-u diff:: xmldiff ${DIFFS} ${OLD} ${NEW} + +targets:: + @printf ${TFMT} 'diff' 'Compares XML files' + # ######################################################################### @@ -436,6 +511,10 @@ $(1)/fdp-info.xml:: $(RPMINFO) clean:: ${RM} ${1}/fdp-info.xml + +targets:: + @printf ${TFMT} '${1}/fdp-info.xml' 'Locale ${1} packaging information' + endef $(foreach L,${LANGUAGES},$(eval $(call fdp-info_template,${L}))) @@ -443,6 +522,10 @@ $(foreach L,${LANGUAGES},$(eval $(call fdp-info_template,${L}))) .PHONY: fdp-info fdp-info:: $(foreach LANG,${LANGUAGES},$(LANG)/fdp-info.xml) + +targets:: + @printf ${TFMT} 'fdp-info' 'Outputs all locale-specific packaging info' + # ######################################################################### @@ -457,6 +540,9 @@ clog:: $(RPMINFO) insert-changelog $(RPMINFO).tmp && \ move-if-change $(RPMINFO).tmp $(RPMINFO) +targets:: + @printf ${TFMT} 'clog' 'Adds changelog entry to rpm-info.xml file' + # ######################################################################### # Make a new colophon entry for an existing rpm-info.xml file. @@ -465,6 +551,8 @@ colophon:: $(RPMINFO) insert-colophon $(RPMINFO).tmp && \ move-if-change $(RPMINFO).tmp $(RPMINFO) +targets:: + @printf ${TFMT} 'colophon' 'Adds colophon entry to rpm-info.xml file' ######################################################################### .PHONY: ${DOCBASE}-${1}-distclean @@ -473,6 +561,10 @@ define DISTCLEAN_template ${DOCBASE}-$(1)-distclean:: ${RM} *-$(1).omf ${RM} *-$(1).desktop + +targets:: + @printf ${TFMT} '${DOCBASE}-${1}-distclean' 'Removes locale ${1} product files' + endef $(foreach L,${LANGUAGES},$(eval $(call DISTCLEAN_template,${L}))) @@ -494,36 +586,58 @@ distclean:: ${RM} fedora-doc-$(DOCBASE)*.spec ${RM} $(DOCBASE)*.src.tar.gz +targets:: + @printf ${TFMT} 'spec' 'Creates RPM spec file from rpm-info.xml' + spec:: ${SPECFILE} +targets:: + @printf ${TFMT} '${SPECFILE}' 'Creates RPM spec file from rpm-info.xml' + ${SPECFILE}:: ${RPMINFO} $(XSLTPROC) --stringparam docbase "${DOCBASE}" \ ${FDPDIR}/docs-common/packaging/spec.xsl ${RPMINFO} \ >$@.tmp && move-if-change $@.tmp $@ +targets:: + @printf ${TFMT} 'gnome-desktop' 'Outputs Gnome desktop description' gnome.desktop:: fedora-doc-${DOCBASE}-gnome.desktop +targets:: + @printf ${TFMT} 'fedora-doc-${DOCBASE}-gnome.desktop' 'Gnome Desktop Files' + fedora-doc-${DOCBASE}-gnome.desktop:: ${RPMINFO} $(XSLTPROC) --stringparam docbase "${DOCBASE}" \ ${FDPDIR}/docs-common/packaging/gnome-desktop.xsl \ ${RPMINFO} >$@.tmp && move-if-change $@.tmp $@ +targets:: + @printf ${TFMT} 'kde.desktop' 'Generates KDE desktop files' + kde.desktop:: fedora-doc-${DOCBASE}-kde.desktop +targets:: + @printf ${TFMT} 'fedora-doc-${DOCBASE}-kde.desktop' 'KDE desktop files' + fedora-doc-${DOCBASE}-kde.desktop:: ${RPMINFO} $(XSLTPROC) --stringparam docbase "${DOCBASE}" \ ${FDPDIR}/docs-common/packaging/kde-desktop.xsl \ ${RPMINFO} >$@.tmp && move-if-change $@.tmp $@ +targets:: + @printf ${TFMT} 'khelp.desktop' 'KDE Help desktop files' + khelp.desktop:: fedora-doc-${DOCBASE}-khelp.desktop +targets:: + @printf ${TFMT} 'fedora-doc-${DOCBASE}-khelp.desktop' 'KDE Help files' + fedora-doc-${DOCBASE}-khelp.desktop:: ${RPMINFO} $(XSLTPROC) --stringparam docbase "${DOCBASE}" \ ${FDPDIR}/docs-common/packaging/khelpcenter-plugin.xsl \ ${RPMINFO} >$@.tmp && move-if-change $@.tmp $@ - define omf_template omf-$(1):: fedora-doc-${DOCBASE}-$(1).omf @@ -533,15 +647,27 @@ fedora-doc-${DOCBASE}-$(1).omf:: ${RPMINFO} ${FDPDIR}/docs-common/packaging/omf.xsl ${RPMINFO} | \ $(XMLFORMAT) $(XMLFOPTS) >fedora-doc-${DOCBASE}-$(1).omf.tmp && \ move-if-change fedora-doc-${DOCBASE}-$(1).omf.tmp fedora-doc-${DOCBASE}-$(1).omf + +targets:: + @printf ${TFMT} 'omf-${1}' 'OMF file for locale ${1}' + @printf ${TFMT} 'fedora-doc-${DOCBASE}-${1}.omf' 'OMF file for locale ${1}' endef +targets:: + @printf ${TFMT} 'fedora-doc-${DOCBASE}-C.omf' 'Locale "EN" not the C locale' + fedora-doc-${DOCBASE}-C.omf:: fedora-doc-${DOCBASE}-en.omf cp fedora-doc-$(DOCBASE)-en.omf $@ $(foreach LANG,${LANGUAGES},$(eval $(call omf_template,${LANG}))) +targets:: + @printf ${TFMT} 'omf' 'Generates the OMF files' + omf:: $(foreach LANG,${LANGUAGES},omf-$(LANG)) fedora-doc-${DOCBASE}-C.omf +targets:: + @printf ${TFMT} 'src-tarball' 'Builds tar(1) archive of sources & desktop files' src-tarball $(DOCBASE)-$(VERSION).src.tar.gz:: ${MAKE} fdp-info |