On Tue, Aug 14, 2001 at 08:30:45PM +0300, Ruslan Ermilov wrote:
> Just to clarify. Nothing should be built in ${.OBJDIR} at install time,
> as it may be read-only.
Correct.
> The build in ${DESTDIR} is allowed, we, for
> example, execute makewhatis(1) at the end of `installworld'. But this
> "build" is implicit, i.e., it's not done by make dependencies.
What is wrong with doing the .mgc creation during make install? The
behavior of ``file -C'' is to write the .mgc in the same directory as the
source file. That behavior does not make me happy, and is the source of
the use of "magic.mime.PITA".
> And
> also note that only bootstrap-tools and utilities copied to the
> ${TMPPATH} as the first step of `installworld' are allowed during
> `installworld'.
>
> > +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.
I personally often find `build-tools' a hack, and would really prefer to
build things that can be at program compile time.
> Let's don't reinvent the wheel, and please try the attached patch
> instead.
I don't see why HOST_CC is such a hack. I think it is more clear what is
going on than adding mkmagic to build-tools.
> RCS file: /home/ncvs/src/usr.bin/file/Makefile,v
...
> +build-tools: mkmagic
> +
> +mkmagic: apprentice.c print-hacked.c
> + ${CC} -DHAVE_CONFIG_H -DCOMPILE_ONLY \
> + -I${.CURDIR} -I${SRCDIR} -o ${.TARGET} ${.ALLSRC}
Why shouldn't mkmagic be added to CLEANFILES?
--
-- David ([EMAIL PROTECTED])
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message