Date: Tue, 14 Aug 2001 08:55:56 -0700 From: "David O'Brien" <obrien@FreeBSD.ORG> To: Mark Peek <mark@whistle.com>, Bruce Evans <bde@zeta.org.au>, Warner Losh <imp@harmony.village.org>, 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> In-Reply-To: <20010814095404.A71466@sunbay.com>; from ru@FreeBSD.ORG on Tue, Aug 14, 2001 at 09:54:04AM %2B0300 References: <20010810110151.B7988@sunbay.com> <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>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010814085556.E73693>