Subject: Re: TCFS include files, termcap query
To: VaX#n8 <vax@carolina.rr.com>
From: Jaromir Dolecek <jdolecek@NetBSD.org>
List: tech-userlevel
Date: 07/15/2004 10:45:17
VaX#n8 wrote:
> I'm integrating TCFS with NetBSD and I think I'm going to put each userland
> TCFS program in its own directory, to comport with NetBSD's dominant
> organization in /usr/src/*bin.  They also have some common functions in a
> library, no problem I guess it can go in /usr/src/lib/libtcfs.  But they also
> have some common include files, and it's not clear to me where these should
> go.  These include files used by the userland have some degree of overlap
> with the kernel include files /usr/src/sys/fs/tcfs/*.h but are not identical.
> Where should they be placed?  I'm tempted to put them in /usr/src/lib/libtcfs.

Canonical way is to import the source into suitable directory
under dist/ (e.g. dist/tcfs/ in your case), and then use reachover
builds for individual programs. See e.g. dhcp or bind on how
this is done.

Generally no include files (not even the kernel ones) should be
installed into /usr/include, unless they are intended as an interface
to be used by 3rd party applications. Includes should
be used direct off the src/dist/ and src/sys/ directories, by setting
the compilation -I directives accordingly. See e.g.
src/sbin/mount_msdos/Makefile or src/sbin/mount_smbfs/Makefile
for examples of using the sys headers direct.

Generally applications use build-only static libraries (see e.g.
src/usr.sbin/bind/lib or src/usr.sbin/dhcp/common). System (shared)
library is only added for generic functionality.

Jaromir
-- 
Jaromir Dolecek <jdolecek@NetBSD.org>            http://www.NetBSD.cz/
-=- We should be mindful of the potential goal, but as the Buddhist -=-
-=- masters say, ``You may notice during meditation that you        -=-
-=- sometimes levitate or glow.   Do not let this distract you.''   -=-