Adding ../../sys to the include path - is it necessary?

Chris Pressey cpressey at catseye.mine.nu
Sat Jan 1 13:06:46 PST 2005


On Fri, 31 Dec 2004 18:03:42 -0800
Chris Pressey <cpressey at xxxxxxxxxxxxxxx> wrote:

> Hi,
> 
> I've noticed a lot of Makefiles (in src/sbin and src/usr.sbin
> especially) have
> 
> 	CFLAGS+= -I${.CURDIR}/../../sys
> 
> presumably so they pick up the latest kernel headers during a 'make
> buildworld'.
> 
> But this also makes them uncompilable on my system when just issuing a
> simple 'make' in the program's directory - it complains about a
> conflict between the definitions of pid_t in
> 
>  	../../sys/sys/types.h:85 and
> 	/usr/include/stdio.h:54.

Never mind this, it was my fault for having experimental stuff hanging
around in /usr/include/stdio.h.  A full installworld fixed it.

> This makes piecemeal testing awkward...
> 
> But also, doesn't the new buildworld system pick up any new sys
> headers by itself, making it unnecessary to specify this extra include
> directory in each program's Makefile?

This also doesn't seem to be the case, AFAICT from the buildworld log,
so for now I guess these have to stay.  I'd like to find a way so
they're not needed though, so I'll try to learn more about the build
system this year.

-Chris





More information about the Kernel mailing list