On Fri, 17 Aug 2001, David O'Brien wrote:

> On Wed, Aug 15, 2001 at 12:40:19PM +1000, Bruce Evans wrote:
> > On Tue, 14 Aug 2001, Ruslan Ermilov wrote:
> >
> > > On Tue, Aug 14, 2001 at 08:55:56AM -0700, David O'Brien wrote:
> > > > >From a correctness stand point, building the .mgc files at install time
> > > > is the correct thing to do... or maybe we should do both -- doing the
> > > > [re]creation of the .mgc files at install time in the cross-[arch-]build
> > > > case.
> >
> > Not both.
>
> Which do you prefer?  The CC_HOST way, the build-tools way, or the at
> install time way?

build-tools.

> > > +build-tools: mkmagic
> > > +
> > > +mkmagic: apprentice.c print-hacked.c
> > > + ${CC} -DHAVE_CONFIG_H -DCOMPILE_ONLY \
> > > +     -I${.CURDIR} -I${SRCDIR} -o ${.TARGET} ${.ALLSRC}
> >
> > This should use CFLAGS if possible, and should use LDFLAGS, something
> > like:
> >
> >     ${CC} -DCOMPILE_ONLY {CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
>
> The include path in CFLAGS is wrong for this:
>
>     -I/FBSD/5.x/usr.bin/file -I/FBSD/5.x/usr.bin/file/../../contrib/file
>     -I/usr/obj/FBSD/5.x/i386/usr/include
>
> namely pointing into /usr/obj.

The extra directory seems to be a bug elsewhere.  bsd.lib.mk and
bsd.prog.mk add -I${DESTDIR}/usr/include to CFLAGS if DESTDIR is set.
This is the wrong place to add it, but /usr/src/Makefile.inc1 relies
on this for the WMAKEENV (world) stage.  Makefile.inc1 also sets DESTDIR
for the BMAKEENV (bootstrap-tool) and XMAKEENV (cross-tools) stages.
I think this breaks these stages if NOCLEAN is set (if NOCLEAN is not
set, then the extra include dir is cleaned early, and it remains
unpopulated until the WMAKEENV stage).  I think this is not broken for
the TMAKEENV (build-tools) stage unless DESTDIR is set externally
(and NOCLEAN is set).  You saw the extra include dir for the `file'
build-tool because you set DESTDIR externally.

Bruce


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to