Subject: lib/6812: libcurses documentation build causes files to be created in the source directory
To: None <>
From: None <>
List: netbsd-bugs
Date: 01/14/1999 22:08:26
>Number:         6812
>Category:       lib
>Synopsis:       libcurses documentation build causes files to be created in the source directory
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    lib-bug-people (Library Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 14 19:20:00 1999
>Originator:     Greg A. Woods
Planix, Inc.; Toronto, Ontario; Canada
>Release:        NetBSD-1.3I sup Thu Jan 14 08:09:47 EST 1999


	The libcurses/PSD.doc/Makefile causes files to be created in the
	source directory during normal builds using BSDOBJDIR and DESTDIR.

	Upon examination I found that the libcurses/PSD.doc Makefile
	wasn't using appropriate or correct dependencies either.

	I noticed this first with my 1.3.3 re-build, but as nothing
	related has changed since, this same problem will aplly to


	Do a "make DESTDIR=/some/non-root/directory build" in a virgin
	source tree with settings similar to the following in

		BSDSRCDIR=      /usr/src
		BSDOBJDIR=      /var/obj
		OBJMACHINE=     yes

	To make things painfully obvious do so with /usr/src mounted

	Strictly speaking these settings are irrlevant, as is even I
	believe the DESTDIR setting, but they are typical of situations
	where /usr/src might be mounted read-only.


	It might be more appropriate to get rid of the use of ".so", but
	for the moment the following change fixes the immediate problem.

Index: lib/libcurses/PSD.doc/Makefile
RCS file: /cvs/NetBSD/src/lib/libcurses/PSD.doc/Makefile,v
retrieving revision
diff -u -r1.1.1.1 Makefile
--- lib/libcurses/PSD.doc/Makefile	1998/02/20 00:32:27
+++ lib/libcurses/PSD.doc/Makefile	1999/01/14 23:09:12
@@ -4,13 +4,14 @@
 DIR=	psd/19.curses
 SRCS=	Master
 MACROS=	-me
-EXTRA=	appen.A appen.B appen.C c_macros doc.I doc.II doc.III \
-	doc.IV ex1.c ex2.c fns.doc intro.0 intro.1 intro.2 intro.3 \
-	intro.4 intro.5 intro.6 life.c macros twinkle1.c twinkle2.c \
-	win_st.c
+OTHER=	appen.A appen.B appen.C doc.I doc.II doc.III doc.IV fns.doc \
+	intro.0 intro.1 intro.3 intro.4 intro.5 intro.6 \
+	macros c_macros
+TBLFILES=  intro.2.tbl
+EXTRA=	${OTHER} ${CEXAMPLES:R:S/$/.c/g} ${TBLFILES:R} intro.2.tbl appen.A.tbl \
 .SUFFIXES: .c .gr
@@ -26,13 +27,11 @@
 	${VFONT} ${.IMPSRC} | grep -v "^'wh" > ${.TARGET} ${SRCS} ${SRCS} ${OTEHR} ${CEXAMPLES} ${TBLFILES}
 	${SOELIM} -I${.CURDIR} ${.ALLSRC} | ${ROFF} > ${.TARGET}
-Master: fns.doc intro.5 intro.2.tbl intro.0 intro.1 \
-	intro.3 intro.4 intro.6 macros c_macros
+# Unfortunately our make doesn't handle single-suffix rules.
 intro.2.tbl: intro.2
-	${TBL} ${.ALLSRC} > intro.2.tbl
+	${TBL} ${.ALLSRC} > ${.TARGET}
 .include <>