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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message