blob: 959404fbe8ea5567c3d2e88604792a47d0c313c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
#########################################################################
# 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"
# html-nochunks -- See "${DOCNAME}.html"; single HTML file
# ${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)
html-nochunks $(DOCNAME).html:: ${XMLFILE} ${XMLEXTRAFILES}
xmlto html-nochunks -x $(XSLHTMLNOCHUNKS) $(XMLFILE)
# The "clean" or "distclean" target will remove all generated and temporary
# files.
distclean clean:
${RM} -r ${DOCNAME}.pdf $(DOCNAME) ${DOCNAME}.tar.gz ${DOCNAME}.html
|