Subject: Re: fixing the mismatched headers problem
To: None <tech-userlevel@NetBSD.ORG>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: tech-userlevel
Date: 03/27/1996 12:12:29
> We have a long standing problem where headers (notably curses.h) are
> used in one directory and are installed in another.  [...]

> I'd like to solve this problem before 1.2, so I'm soliciting ideas.

> 	* Add a general "install-headers" support to the bsd.*.mk files
> 	  so that "make install-headers" would [recursively install 'em]

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

In my opinion this is not a significant problem.  In most directories,
the install-headers target will do nothing; the time taken is
essentially that required for make to read the Makefiles and discover
that install-headers is a no-op.  Perhaps even a few directories could
know that nothing under them has headers to install and short-circuit
the recursion.

There is a theoretical danger that something will be built with a new
header and linked with an old library.  Fortunately, all libraries are
built and installed before any programs are.

I cast my vote (heh, as if voting could resolve this) in favor of the
recursive install-headers target.

It occurs to me that it would be possible to have a fully recursive
install-all-headers target that walked the entire source tree
installing includes and also noting which directories have include
files to install.  Then there could be an install-headers target that
uses the generated list to avoid the large proportion of the
directories that don't have anything to install.  (Of course, it may
turn out that the time taken by a fullly recursive install-headers tree
walk isn't large enough to justify the extra complexity.  This is an
idea, nothing more.)

					der Mouse