summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNik Clayton <nik@FreeBSD.org>2000-07-23 16:27:58 +0000
committerNik Clayton <nik@FreeBSD.org>2000-07-23 16:27:58 +0000
commit460016ce355db2e518c110478e74ab5ce4064f87 (patch)
treebc4e47e1b5825fb40d6080e3d2293f1888ca3b7b
parent6878fbaeb88b1f732fce4b08fb273b1b6d97eff2 (diff)
Fix the handling of unsupported formats (like "html-split") in doc.html.mk.
Output a non-fatal warning for these. For unknown formats output a fatal error.
Notes
svn path=/head/; revision=7701
-rw-r--r--share/mk/doc.html.mk59
-rw-r--r--share/mk/doc.project.mk7
2 files changed, 53 insertions, 13 deletions
diff --git a/share/mk/doc.html.mk b/share/mk/doc.html.mk
index 67b2239741..0f6ef69d2e 100644
--- a/share/mk/doc.html.mk
+++ b/share/mk/doc.html.mk
@@ -1,5 +1,5 @@
#
-# $FreeBSD: doc/share/mk/doc.html.mk,v 1.1 2000/06/26 09:04:24 nik Exp $
+# $FreeBSD: doc/share/mk/doc.html.mk,v 1.2 2000/07/19 01:46:48 jhb Exp $
#
# This include file <doc.html.mk> handles building and installing of
# HTML documentation in the FreeBSD Documentation Project.
@@ -43,7 +43,7 @@
MASTERDOC?= ${.CURDIR}/${DOC}.sgml
-KNOWN_FORMATS= html txt ps pdf tex dvi tar pdb
+KNOWN_FORMATS= html txt tar pdb
HTMLCATALOG= ${PREFIX}/share/sgml/html/catalog
@@ -58,20 +58,16 @@ CLEANFILES+= ${DOC}.html
.elif ${_cf} == "txt"
_docs+= ${DOC}.txt
CLEANFILES+= ${DOC}.html ${DOC}.txt
-.elif ${_cf} == "dvi"
-_docs+= ${DOC}.dvi
-CLEANFILES+= ${DOC}.aux ${DOC}.dvi ${DOC}.log ${DOC}.tex
-.elif ${_cf} == "ps"
-_docs+= ${DOC}.ps
-CLEANFILES+= ${DOC}.aux ${DOC}.dvi ${DOC}.log ${DOC}.tex ${DOC}.ps
-.elif ${_cf} == "pdf"
-_docs+= ${DOC}.pdf
-CLEANFILES+= ${DOC}.aux ${DOC}.dvi ${DOC}.log ${DOC}.tex ${DOC}.pdf
.elif ${_cf} == "tar"
_docs+= ${DOC}.tar
.elif ${_cf} == "pdb"
_docs+= ${DOC}.pdb ${.CURDIR:T}.pdb
+CLEANFILES+= ${DOC}.pdb ${.CURDIR:T}.pdb
+.else
+# Create a 'bogus' doc for any other format we don't support. This is so
+# that we can fake up a target for it later on, and this target can print
+# the warning message about the unsupported format.
+_docs+= ${DOC}.${_curformat}
.endif
.endfor
@@ -117,6 +113,16 @@ ${.CURDIR:T}.pdb: ${DOC}.pdb
${DOC}.tar: ${SRCS}
tar cf ${.TARGET} ${.ALLSRC}
+#
+# Build targets for any formats we've missed that we don't handle.
+#
+.for _curformat in ${ALL_FORMATS}
+.if !target(${DOC}.${_curformat})
+${DOC}.${_curformat}:
+ @echo \"${_curformat}\" is not a valid output format for this document.
+.endif
+.endfor
+
# ------------------------------------------------------------------------
#
# Validation targets
@@ -170,6 +176,19 @@ ${DOC}.${_cf}.${_curcompress}: ${DOC}.${_cf} _PROG_COMPRESS_${_curcompress}
.endfor
.endfor
+#
+# Build targets for any formats we've missed that we don't handle.
+#
+.for _curformat in ${ALL_FORMATS}
+.for _curcompress in ${KNOWN_COMPRESS}
+.if !target(${DOC}.${_curformat}.${_curcompress})
+${DOC}.${_curformat}.${_curcompress}:
+ @echo \"${_curformat}.${_curcompress}\" is not a valid output format for this document.
+.endif
+.endfor
+.endfor
+
+
# ------------------------------------------------------------------------
#
# Install targets
@@ -186,7 +205,7 @@ ${DOC}.${_cf}.${_curcompress}: ${DOC}.${_cf} _PROG_COMPRESS_${_curcompress}
#
.if !defined(INSTALL_ONLY_COMPRESSED) || empty(INSTALL_ONLY_COMPRESSED)
-_curinst+= ${FORMATS:S/html-split//:S/^/install-/g}
+_curinst+= ${FORMATS:S/^/install-/g}
.endif
realinstall: ${_curinst}
@@ -206,6 +225,22 @@ install-${_cf}.${_compressext}: ${DOC}.${_cf}.${_compressext}
.endif
.endfor
+#
+# Build install- targets for any formats we've missed that we don't handle.
+#
+
+.for _curformat in ${ALL_FORMATS}
+.if !target(install-${_curformat})
+install-${_curformat}:
+ @echo \"${_curformat}\" is not a valid output format for this document.
+
+.for _compressext in ${KNOWN_COMPRESS}
+install-${_curformat}.${_compressext}:
+ @echo \"${_curformat}.${_compressext}\" is not a valid output format for this document.
+.endfor
+.endif
+.endfor
+
# ------------------------------------------------------------------------
#
# Package building
diff --git a/share/mk/doc.project.mk b/share/mk/doc.project.mk
index a7ad7ae858..d99d55935e 100644
--- a/share/mk/doc.project.mk
+++ b/share/mk/doc.project.mk
@@ -1,5 +1,5 @@
#
-# $FreeBSD: doc/share/mk/doc.project.mk,v 1.3 2000/07/14 08:42:49 nbm Exp $
+# $FreeBSD: doc/share/mk/doc.project.mk,v 1.4 2000/07/16 16:29:18 nik Exp $
#
# This include file <doc.project.mk> is the FreeBSD Documentation Project
# co-ordination make file.
@@ -58,6 +58,11 @@
DOCFORMAT?= docbook
MAINTAINER?= doc@FreeBSD.org
+# Master list of known target formats. The doc.<format>.mk files implement
+# the code to convert from their source format to one or more of these target
+# formats
+ALL_FORMATS= html html.tar html-split html-split.tar txt rtf ps pdf tex dvi tar pdb
+
# User-modifiable
PREFIX?= /usr/local
PRI_LANG?= en_US.ISO_8859-1