summaryrefslogtreecommitdiffstats
path: root/Makefile.common
diff options
context:
space:
mode:
authorTommy Reynolds <Tommy.Reynolds@MegaCoder.com>2005-06-29 02:16:46 +0000
committerTommy Reynolds <Tommy.Reynolds@MegaCoder.com>2005-06-29 02:16:46 +0000
commit6a040c56b423e74a965f90417410ff28608a1a35 (patch)
treede9c55fc22c5082c2b0e06945dd7c1bd61dc70b7 /Makefile.common
parent6df39f9d36085b31e72e414bea8f31ac7afbc6bf (diff)
downloadfedora-doc-utils-6a040c56b423e74a965f90417410ff28608a1a35.tar.gz
fedora-doc-utils-6a040c56b423e74a965f90417410ff28608a1a35.tar.xz
fedora-doc-utils-6a040c56b423e74a965f90417410ff28608a1a35.zip
Move _ALL_ default targets and rules into "Makefile.common" as
double-colon targets, so they can be appended-to by a document without needing to rewrite "Makefile.common".
Diffstat (limited to 'Makefile.common')
-rw-r--r--Makefile.common51
1 files changed, 50 insertions, 1 deletions
diff --git a/Makefile.common b/Makefile.common
index 979e3b2..f3e6b16 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -1,2 +1,51 @@
-tarball ${DOCNAME}.tar.gz: html
+#########################################################################
+# Makefile.common
+#
+# This file, to be included from every document's local Makefile, provides
+# the basic targets used by the Fedora Docs Project:
+# all -- Default target, builds HTML document only
+# ${DOCNAME}/index.html -- Builds HTML version of document
+# html -- See "${DOCNAME}/index.html"
+# ${DOCNAME}.tar.gz -- Packages HTML document into a tar archive
+# tarball -- See "${DOCNAME}.tar.gz"
+# clean -- Deletes all generated files and directories
+# distclean -- See "clean"
+# ${DOCNAME}.pdf -- Builds PDF version of document
+# pdf -- See "${DOCNAME}.pdf"
+#########################################################################
+# PDF generation is still fragile and probably won't work on your document
+#########################################################################
+# Note: all targets within this Makefile.common must be defined as
+# double-colon (::) targets so that additional steps can be added by
+# providing additional rules, also marked with double-colons, in the
+# document Makefile.
+#########################################################################
+# PUT NO TARGETS BEFORE THIS ONE, not even in your base Makefile
+# In a properly-constructed Makefile, this will be the default target
+
+all:: ${DOCNAME}/index.html
+
+# The "tarball" or "${DOCNAME}.tar.gz" target will bind the HTML formatted
+# document into a compressed tar archive.
+
+tarball ${DOCNAME}.tar.gz:: html
tar -zcf ${DOCNAME}.tar.gz ${DOCNAME}
+
+# The "pdf" or "${DOCNAME}.pdf" target produces an Adobe Portable Document
+# Format (PDF) file as output.
+
+pdf ${DOCNAME}.pdf:: ${XMLFILE} ${XMLEXTRAFILES}
+ xmlto pdf -x $(XSLPDF) $(XMLFILE)
+
+# The "html" or "${DOCNAME}.
+html ${DOCNAME}/index.html:: ${XMLFILE} ${XMLEXTRAFILES}
+ xmlto html -x $(XSLHTML) -o $(DOCNAME) $(XMLFILE)
+ mkdir -p $(DOCNAME)/stylesheet-images
+ cp ../docs-common/stylesheet-images/*.png $(DOCNAME)/stylesheet-images
+ cp ../docs-common/css/fedora.css $(DOCNAME)
+
+# The "clean" or "distclean" target will remove all generated and temporary
+# files.
+
+distclean clean:
+ ${RM} -r ${DOCNAME}.pdf $(DOCNAME) ${DOCNAME}.tar.gz