docs-common Makefile.common,1.2,1.3

Tommy Reynolds (jtr) fedora-docs-commits at redhat.com
Wed Jun 29 02:16:49 UTC 2005


Author: jtr

Update of /cvs/docs/docs-common
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv24282/docs-common

Modified Files:
	Makefile.common 
Log Message:
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".



Index: Makefile.common
===================================================================
RCS file: /cvs/docs/docs-common/Makefile.common,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Makefile.common	28 Jun 2005 21:25:17 -0000	1.2
+++ Makefile.common	29 Jun 2005 02:16:46 -0000	1.3
@@ -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




More information about the Fedora-docs-commits mailing list