On Fri, 21 Sep 2001, Ruslan Ermilov wrote:
> This is because BMAKEENV has DESTDIR=${WORLDTMP}, and
> bsd.{prog,lib}.mk have the magic of adding the
> -I${DESTDIR}/usr/include to CFLAGS if DESTDIR is set.
>
> I'm currently testing the following patch with the
> -CURRENT build on a -STABLE box.
>
> Index: bsd.prog.mk
> ===================================================================
> RCS file: /home/ncvs/src/share/mk/bsd.prog.mk,v
> retrieving revision 1.100
> diff -u -r1.100 bsd.prog.mk
> --- bsd.prog.mk 2001/06/14 06:08:02 1.100
> +++ bsd.prog.mk 2001/09/21 07:23:14
> @@ -11,7 +11,7 @@
> .SUFFIXES: .out .o .c .cc .cpp .cxx .C .m .y .l .s .S
>
> CFLAGS+=${COPTS} ${DEBUG_FLAGS}
> -.if defined(DESTDIR)
> +.if defined(DESTDIR) && !defined(BOOTSTRAPPING)
> CFLAGS+= -I${DESTDIR}/usr/include
> CXXINCLUDES+= -I${DESTDIR}/usr/include/g++
> .endif
> Index: bsd.lib.mk
> ===================================================================
> RCS file: /home/ncvs/src/share/mk/bsd.lib.mk,v
> retrieving revision 1.97
> diff -u -r1.97 bsd.lib.mk
> --- bsd.lib.mk 2001/05/19 23:24:17 1.97
> +++ bsd.lib.mk 2001/09/21 07:23:15
> @@ -37,7 +37,7 @@
> .endif
> .endif
>
> -.if defined(DESTDIR)
> +.if defined(DESTDIR) && !defined(BOOTSTRAPPING)
> CFLAGS+= -I${DESTDIR}/usr/include
> CXXINCLUDES+= -I${DESTDIR}/usr/include/g++
> .endif
This CFLAGS adjustment should be moved to src/Makefile.inc1 someday.
Using the includes in DESTDIR can only be right if you have just
installed them there, but if you did that you can adjust CFLAGS too.
Bruce
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message