From owner-freebsd-current Tue Aug 14 9: 3: 5 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 7465137B40C for ; Tue, 14 Aug 2001 09:02:59 -0700 (PDT) (envelope-from obrien@NUXI.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.11.5/8.11.1) id f7EFvGJ75328; Tue, 14 Aug 2001 08:57:16 -0700 (PDT) (envelope-from obrien) Date: Tue, 14 Aug 2001 08:55:56 -0700 From: "David O'Brien" To: Mark Peek , Bruce Evans , Warner Losh , current@FreeBSD.ORG Subject: Re: Cross builds and upgrade path from 4.x are broken in usr.bin/file Message-ID: <20010814085556.E73693@dragon.nuxi.com> Reply-To: current@FreeBSD.ORG Mail-Followup-To: Mark Peek , Bruce Evans , Warner Losh , current@FreeBSD.ORG References: <20010810110151.B7988@sunbay.com> <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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010814095404.A71466@sunbay.com>; from ru@FreeBSD.ORG on Tue, Aug 14, 2001 at 09:54:04AM +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 09:54:04AM +0300, Ruslan Ermilov wrote: > > They produce the same output, but in the general case they do not need > > to. > > What I hear? Hell, then my solution (or something similar) should be > committed, as it at least unbreaks the 4.x -> 5.0 upgrade path, which > I am mostly concerned about (on the same arch). I never said they weren't the same format nor that it wouldn't be fixed. I said I wanted to try some things. NetBSD something simular to the patch below in their usr.bin/file/Makefile -- they build the .mgc files during build time. The patch to src/Makefile.inc is one way to implement the needed hooks. 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. Index: Makefile.inc1 =================================================================== RCS file: /home/ncvs/src/Makefile.inc1,v retrieving revision 1.208 diff -u -r1.208 Makefile.inc1 --- Makefile.inc1 2001/08/04 18:25:38 1.208 +++ Makefile.inc1 2001/08/13 23:42:09 @@ -199,6 +199,7 @@ WMAKEENV= ${CROSSENV} \ DESTDIR=${WORLDTMP} \ INSTALL="sh ${.CURDIR}/tools/install.sh" \ + HOST_CC='env COMPILER_PATH=/usr/libexec:/usr/bin LIBRARY_PATH=/usr/lib /usr/bin/cc' \ PATH=${TMPPATH} WMAKE= ${WMAKEENV} ${MAKE} -f Makefile.inc1 Index: usr.bin/file/Makefile =================================================================== RCS file: /home/ncvs/src/usr.bin/file/Makefile,v retrieving revision 1.21 diff -u -r1.21 Makefile --- usr.bin/file/Makefile 2001/08/08 16:19:30 1.21 +++ usr.bin/file/Makefile 2001/08/14 15:53:21 @@ -45,13 +45,18 @@ magic: ${MAGFILES} cat ${.ALLSRC} > ${.TARGET} -magic.mgc: file magic - ./${PROG} -C -m magic +magic.mgc: mkmagic magic + ./mkmagic magic -magic.mime.mgc: file magic.mime +magic.mime.mgc: mkmagic magic.mime ln -sf ${SRCDIR}/magic.mime magic.mime.PITA - ./${PROG} -C -m magic.mime.PITA + ./mkmagic magic.mime.PITA mv magic.mime.PITA.mgc magic.mime.mgc + +CLEANFILES+= mkmagic +mkmagic: apprentice.c print-hacked.c + ${HOST_CC} -o mkmagic -DHAVE_CONFIG_H -DCOMPILE_ONLY \ + -I${.CURDIR} -I${SRCDIR} ${.ALLSRC} CLEANFILES+= print-hacked.c print-hacked.c: print.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message