Subject: fixing the mismatched headers problem
To: None <tech-userlevel@NetBSD.ORG, netbsd-bugs@NetBSD.ORG>
From: J.T. Conklin <jtc@cygnus.com>
List: netbsd-bugs
Date: 03/26/1996 18:15:53
We have a long standing problem where headers (notably curses.h) are
used in one directory and are installed in another.  Needless to say,
this causes problems when the header(s) and source(s) are changed in
some incompatible way.

I'd like to solve this problem before 1.2, so I'm soliciting ideas.
Two approaches I've thought of are:

	* Add a "install-headers" target to the top level Makefile.
	  This target would contain a list of commands that would
	  go through various libraries and install the headers.
	  Perhaps something like this:

		install-headers:
		        cd ${.CURDIR}/include &&       ${MAKE} install
			cd ${.CURDIR}/lib/libcurses && ${MAKE} beforeinstall
			etc.

	  A drawback of this approach is that the list of headers to install
          is centralized in one place.

	* Add a general "install-headers" support to the bsd.*.mk files
	  so that "make install-headers" would descend the source dirs
	  and install headers in each header that has a install-header
          target. 

	  A drawback of this approach is that builds will take longer due
          to the additional source tree traversal.


I'm open to other suggestions.  Whatever approach is taken, I think it
should be able to be extended so that a "shadow" install tree is built
and the rest of the source tree use that for builds.  This addition
should bring us a little bit closer the goal of cross compiliation
support.

Thanks, 

	--jtc