From owner-freebsd-current Tue Aug 14 19: 9:26 2001 Delivered-To: freebsd-current@freebsd.org Received: from dragon.nuxi.com (dsl092-013-169.sfo1.dsl.speakeasy.net [66.92.13.169]) by hub.freebsd.org (Postfix) with ESMTP id 3184B37B403; Tue, 14 Aug 2001 19:09:23 -0700 (PDT) (envelope-from obrien@NUXI.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.11.5/8.11.1) id f7F29LF28064; Tue, 14 Aug 2001 19:09:21 -0700 (PDT) (envelope-from obrien) Date: Tue, 14 Aug 2001 19:09:21 -0700 From: "David O'Brien" To: Ruslan Ermilov Cc: current@FreeBSD.ORG, Mark Peek , Bruce Evans , Warner Losh Subject: Re: Cross builds and upgrade path from 4.x are broken in usr.bin/file Message-ID: <20010814190921.A25060@dragon.nuxi.com> Reply-To: current@FreeBSD.ORG References: <20010810235643.Y23367-100000@besplex.bde.org> <20010810173751.B60193@sunbay.com> <20010810191407.A73485@sunbay.com> <20010810202300.A80439@sunbay.com> <20010813133015.A12153@dragon.nuxi.com> <20010814095404.A71466@sunbay.com> <20010814085556.E73693@dragon.nuxi.com> <20010814203045.A60765@sunbay.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010814203045.A60765@sunbay.com>; from ru@FreeBSD.ORG on Tue, Aug 14, 2001 at 08:30:45PM +0300 X-Operating-System: FreeBSD 5.0-CURRENT Organization: The NUXI BSD group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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