An increasing amount of documents use the -V flag to Jade via

JADEFLAGS to set variables such as %generate-article-toc%.  However,
JADEFLAGS is also passed to nsgmls, which doesn't, and shouldn't,
understand -V.  The Makefiles which do this are correct, because the
name--JADEFLAGS--implies that it will only be passed to Jade, not to
nsgmls, too.  Furthermore, simply not passing JADEFLAGS to nsgmls is
not okay, since nsgmls *does* need the -i flags used to
include/exclude certain parts of the document.

Remedy this by breaking up JADEFLAGS into itself and SGMLFLAGS.  The
latter will be passed to all SGML processors such as nsgmls and Jade.
The former will only be passed to Jade.  The -V flags should stay in
JADEFLAGS, and the -i flags should be moved to SGMLFLAGS.

This fixes `make lint` for documents which use -V via JADEFLAGS.

Reviewed by:	bmah
This commit is contained in:
Dima Dorfman 2001-08-16 05:19:51 +00:00
parent c2eac56e0a
commit b72265ea42
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=10372
2 changed files with 11 additions and 6 deletions

View file

@ -1,5 +1,5 @@
#
# $FreeBSD: doc/en_US.ISO8859-1/books/handbook/Makefile,v 1.42 2001/08/10 00:30:43 murray Exp $
# $FreeBSD: doc/en_US.ISO8859-1/books/handbook/Makefile,v 1.43 2001/08/14 07:37:03 rpratt Exp $
#
# Build the FreeBSD Handbook.
#
@ -129,7 +129,7 @@ SYMLINKS= ${DESTDIR} index.html handbook.html
# Turn on all the chapters.
CHAPTERS?= ${SRCS:M*chapter.sgml}
JADEFLAGS+= ${CHAPTERS:S/\/chapter.sgml//:S/^/-i chap./}
SGMLFLAGS+= ${CHAPTERS:S/\/chapter.sgml//:S/^/-i chap./}
# XXX The Handbook build currently overflows some internal, hardcoded
# limits in pdftex. Until we split the Handbook up, build the PDF

View file

@ -1,5 +1,5 @@
#
# $FreeBSD: doc/share/mk/doc.docbook.mk,v 1.41 2001/07/21 03:44:27 murray Exp $
# $FreeBSD: doc/share/mk/doc.docbook.mk,v 1.42 2001/07/28 03:00:03 murray Exp $
#
# This include file <doc.docbook.mk> handles building and installing of
# DocBook documentation in the FreeBSD Documentation Project.
@ -30,10 +30,15 @@
#
# Variables used by both users and documents:
#
# JADEFLAGS Additional options to pass to Jade. Typically
# SGMLFLAGS Additional options to pass to various SGML
# processors (e.g., jade, nsgmls). Typically
# used to define "IGNORE" entities to "INCLUDE"
# with "-i<entity-name>"
#
# JADEFLAGS Additional options to pass to Jade. Typically
# used to set additional variables, such as
# "%generate-article-toc%".
#
# TIDYFLAGS Additional flags to pass to Tidy. Typically
# used to set "-raw" flag to handle 8bit characters.
#
@ -93,7 +98,7 @@ DSSSLCATALOG= ${PREFIX}/share/sgml/docbook/dsssl/modular/catalog
IMAGES_LIB?=
JADEOPTS= ${JADEFLAGS} -c ${LANGUAGECATALOG} -c ${FREEBSDCATALOG} -c ${DSSSLCATALOG} -c ${DOCBOOKCATALOG} -c ${JADECATALOG} ${EXTRA_CATALOGS:S/^/-c /g}
JADEOPTS= ${JADEFLAGS} ${SGMLFLAGS} -c ${LANGUAGECATALOG} -c ${FREEBSDCATALOG} -c ${DSSSLCATALOG} -c ${DOCBOOKCATALOG} -c ${JADECATALOG} ${EXTRA_CATALOGS:S/^/-c /g}
KNOWN_FORMATS= html html.tar html-split html-split.tar txt rtf ps pdf tex dvi tar pdb
@ -336,7 +341,7 @@ ${DOC}.tar: ${SRCS}
#
lint validate:
${NSGMLS} ${JADEFLAGS} -s -c ${LANGUAGECATALOG} -c ${FREEBSDCATALOG} -c ${DSSSLCATALOG} -c ${DOCBOOKCATALOG} -c ${JADECATALOG} ${EXTRA_CATALOGS:S/^/-c /g} ${MASTERDOC}
${NSGMLS} ${SGMLFLAGS} -s -c ${LANGUAGECATALOG} -c ${FREEBSDCATALOG} -c ${DSSSLCATALOG} -c ${DOCBOOKCATALOG} -c ${JADECATALOG} ${EXTRA_CATALOGS:S/^/-c /g} ${MASTERDOC}
# ------------------------------------------------------------------------
#