Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Aug 2001 19:09:21 -0700
From:      "David O'Brien" <dev-null@NUXI.com>
To:        Ruslan Ermilov <ru@FreeBSD.ORG>
Cc:        current@FreeBSD.ORG, Mark Peek <mark@whistle.com>, Bruce Evans <bde@zeta.org.au>, Warner Losh <imp@harmony.village.org>
Subject:   Re: Cross builds and upgrade path from 4.x are broken in usr.bin/file
Message-ID:  <20010814190921.A25060@dragon.nuxi.com>
In-Reply-To: <20010814203045.A60765@sunbay.com>; from ru@FreeBSD.ORG on Tue, Aug 14, 2001 at 08:30:45PM %2B0300
References:  <20010810235643.Y23367-100000@besplex.bde.org> <20010810173751.B60193@sunbay.com> <p05100300b799a7ab0ef4@[207.76.207.129]> <20010810191407.A73485@sunbay.com> <p05100305b799bb5daf9c@[207.76.207.129]> <20010810202300.A80439@sunbay.com> <20010813133015.A12153@dragon.nuxi.com> <20010814095404.A71466@sunbay.com> <20010814085556.E73693@dragon.nuxi.com> <20010814203045.A60765@sunbay.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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  (obrien@FreeBSD.org)

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010814190921.A25060>