Subject: Curses! Foiled again!
To: None <current-users@NetBSD.ORG>
From: Greg Earle <earle@isolar.Tujunga.CA.US>
List: current-users
Date: 02/26/1996 03:41:08
Just for fun, I tried to do a "make build" on a P120 using DESTDIR.
Everything started cruising along spiffily (and damn fast, to my delight)
until it tripped over a missing <curses.h> while doing "make depend" and later
"make" in /usr/src/lib/libterm:

[...]
===> libterm
mkdep -a -DCM_N -DCM_GT -DCM_B -DCM_D -nostdinc -idirafter /usr/src/.build/usr/i
nclude /usr/src/lib/libterm/termcap.c /usr/src/lib/libterm/tgoto.c /usr/src/lib/
libterm/tputs.c
/usr/src/lib/libterm/termcap.c:51: curses.h: No such file or directory
/usr/src/lib/libterm/tgoto.c:45: curses.h: No such file or directory
/usr/src/lib/libterm/tputs.c:46: curses.h: No such file or directory
[...]
===> libterm
cc -O -DCM_N -DCM_GT -DCM_B -DCM_D -nostdinc -idirafter /usr/src/.build/usr/incl
ude -c /usr/src/lib/libterm/termcap.c
/usr/src/lib/libterm/termcap.c:51: curses.h: No such file or directory
*** Error code 1

This was alluded to back in September I believe (by jtc):

------- Begin Included Message

> When building the lib directory, I'm finding that the file:
>       libterm/tputs.c
> 
> is dependant on the include file:
>       curses.h (in libcurses)
> 
> Unfortunatly this include file is only installed (or updated) as part
> of the install process of the lib directory which occures _after_
> tputs.c is compiled.

We know it's a problem.  It's been on the back burner because it libtermcap
goes away once ncurses is integrated (soon).

--------- End of Included Message

Well, it's now over 5 months later (still no ncurses apparently); this leads
me to believe that I'm the only one who's done a "make build" with DESTDIR
set of late, because every other "make build" is presumably hitting lib/libterm
with the extant "/usr/include/curses.h" still intact, and picked it up from
there.  (Good thing the -current <curses.h> is the same as the 1.1 version?)

Seeing as how the DESTDIR support looks *really* spiffy (I got to hand it to
whomever went down through all those Makefiles and made sure DESTDIR was in
them and used), and how the first stages of "make build" run a few commands
(mostly "pax") to populate ${DESTDIR}/usr/include with stuff, would it be
inappropriate to add Yet Another Command to pick up lib/libcurses/curses.h
and gently deposit it in ${DESTDIR}/usr/include?

(While I'm at it, why is "make distrib-dirs" only done if $DESTDIR isn't set?
 If I create "/usr/src/.build" and point $DESTDIR at it and say "make build",
 there's nothing in that directory to install the initial includes into, so
 "make distrib-dirs" has to be run anyway.  Or Am I Missing Something[tm]?)

	- Greg