From owner-freebsd-doc Mon May 17 11:41:30 1999 Delivered-To: freebsd-doc@freebsd.org Received: from nothing-going-on.demon.co.uk (nothing-going-on.demon.co.uk [193.237.89.66]) by hub.freebsd.org (Postfix) with ESMTP id 52C5D14CC9; Mon, 17 May 1999 11:40:57 -0700 (PDT) (envelope-from nik@nothing-going-on.demon.co.uk) Received: (from nik@localhost) by nothing-going-on.demon.co.uk (8.9.2/8.9.2) id TAA02736; Mon, 17 May 1999 19:39:50 +0100 (BST) (envelope-from nik) Date: Mon, 17 May 1999 19:39:50 +0100 From: Nik Clayton To: Wolfram Schneider Cc: nclayton@lehman.com, Satoshi - Ports Wraith - Asami , doc@FreeBSD.ORG Subject: Re: Can't build handbook Message-ID: <19990517193950.A2496@catkin.nothing-going-on.org> References: <19990508141141.A20366@holly.dyndns.org> <19990508231333.45191@panke.de.freebsd.org> <19990510111306.I14492@lehman.com> <199905110749.AAA28713@silvia.hip.berkeley.edu> <19990513130423.49638@panke.de.freebsd.org> <19990513124039.N14492@lehman.com> <19990515190712.02032@panke.de.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: <19990515190712.02032@panke.de.freebsd.org>; from Wolfram Schneider on Sat, May 15, 1999 at 07:07:12PM +0200 Organization: Nik at home, where there's nothing going on Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Sat, May 15, 1999 at 07:07:12PM +0200, Wolfram Schneider wrote: > > 2. Stick in some code that checks for an empty DOC_PREFIX, and advises > > the user on how to fix it. Or better yet, looks in DOC_PREFIX > > first the make sure the appropriate files are there, and warns the > > user if they aren't. > > > > I posted code that does this earlier on in this thread. > > > > I think option 2 is the best way to go. We can keep /usr/doc as the > > default, and it will work if the user has been storing a checked out > > copy in /usr/doc. If they haven't then the DOC_PREFIX test will discover > > that, abort the build, and print instructions about what they should do. > > I prefer option 2). Here's a trivial patch which does this. Anyone want to add any more smarts to it before I commit it? N Index: docproj.docbook.mk =================================================================== RCS file: /home/ncvs/doc/share/mk/docproj.docbook.mk,v retrieving revision 1.3 diff -u -r1.3 docproj.docbook.mk --- docproj.docbook.mk 1999/05/05 20:16:46 1.3 +++ docproj.docbook.mk 1999/05/17 18:37:26 @@ -63,8 +63,6 @@ # # You shouldn't need to change definitions below here -DOC_PREFIX?= /usr/doc - VOLUME?= ${.CURDIR:T} DOC?= ${.CURDIR:T} DISTRIBUTION?= doc @@ -81,6 +79,27 @@ JADEOPTS= ${JADEFLAGS} -c ${FREEBSDCATALOG} -c ${DSSSLCATALOG} -c ${DOCBOOKCATALOG} -c ${JADECATALOG} ${EXTRA_CATALOGS:S/^/-c /g} KNOWN_FORMATS= html html-split html-split.tar txt rtf ps pdf tex dvi tar doc + +# ------------------------------------------------------------------------ +# If DOC_PREFIX is not set then try and generate a sensible value for it. +# +# If they have used an unedited /usr/share/examples/cvsup/doc-supfile to +# download these files then /usr/doc probably exists. If it does, then +# use that. If it doesn't exist then tell the user they must specify +# DOC_PREFIX by hand. +# +.BEGIN: +.if !defined(DOC_PREFIX) || empty(DOC_PREFIX) +.if exists(/usr/doc) +DOC_PREFIX=/usr/doc +.else + @echo "You must define the DOC_PREFIX variable. This should contain" + @echo "the path to the top of your checked out doc/ repository. For" + @echo "example, \"make DOC_PREFIX=/usr/doc\", if that is where the" + @echo "documentation has been checked out to." + @exit 1 +.endif +.endif # ------------------------------------------------------------------------ # -- There's some milk in the fridge about to go off. . . and there it goes. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message