On Wed, Aug 15, 2001 at 12:40:19PM +1000, Bruce Evans wrote:
> > > +mkmagic: apprentice.c print-hacked.c
> > > + ${HOST_CC} -o mkmagic -DHAVE_CONFIG_H -DCOMPILE_ONLY \
> > > +         -I${.CURDIR} -I${SRCDIR} ${.ALLSRC}
> > >
> > Whoa, cool!
> >
> > That's what I wanted from the very beginning (-DCOMPILE_ONLY knob).
> > It then fits just nicely into the `build-tools' concept.  And we
> > don't need this ugly HOST_CC hack for Makefile.inc1, as ${CC} is
> > set correctly during the `build-tools' stage.  Let's don't reinvent
> > the wheel, and please try the attached patch instead.
> I agree (except the build-tools concept is a hack to work around
> build-tools binaries not being buildable and installable in the usual
> way (with 1 binary per Makefile)).
It seems pretty easy to add src/tools/build-tools/, and move all the
build-tools there.  What do you say?

> See sh/Makefile for other tweaks (depend on .o instead of .c ...).  Other
> probems with this (generally shared with all build-tools binaries):
> - CFLAGS for the main binary may be inappropriate for the tools
> - missing dependencies on headers.
Dependency of a build-tool on .o instead of .c is bad if:

1)  build-tools are built in the same ${.OBJDIR} as the main ${PROG}
    (this is always true)
2)  objects for a build-tool are created for the host arch
3)  objects for a ${PROG} are created for a different arch
4)  ${PROG} and build-tool share one or more object files

This is not the case for bin/sh, but it's true for usr.bin/file.

Ruslan Ermilov          Oracle Developer/DBA,
[EMAIL PROTECTED]           Sunbay Software AG,
[EMAIL PROTECTED]          FreeBSD committer,
+380.652.512.251        Simferopol, Ukraine

http://www.FreeBSD.org  The Power To Serve
http://www.oracle.com   Enabling The Information Age

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

Reply via email to