summaryrefslogtreecommitdiffstats
path: root/usr.bin/file
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2001-08-08 15:53:58 +0000
committerobrien <obrien@FreeBSD.org>2001-08-08 15:53:58 +0000
commit1e95bfdcca4f22baf09b59b493d2948f90b8c282 (patch)
tree236c13945cfa6118abb8103104feddfe89ec51a2 /usr.bin/file
parent5aa7d7faf08296ba00ef2958ffdaef34da19a7dd (diff)
downloadFreeBSD-src-1e95bfdcca4f22baf09b59b493d2948f90b8c282.zip
FreeBSD-src-1e95bfdcca4f22baf09b59b493d2948f90b8c282.tar.gz
Build and use the precompiled magic file. Precompiled magic files have
been supported since version 3.35, however it is just with version 3.36 that file has become verbose about it.
Diffstat (limited to 'usr.bin/file')
-rw-r--r--usr.bin/file/Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.bin/file/Makefile b/usr.bin/file/Makefile
index b7d212e..64e37c9 100644
--- a/usr.bin/file/Makefile
+++ b/usr.bin/file/Makefile
@@ -40,17 +40,20 @@ SRCS= file.c apprentice.c fsmagic.c softmagic.c ascmagic.c \
MAN= file.1 magic.5
-CLEANFILES+= magic
+CLEANFILES+= magic magic.mgc
MAGFILES= ${SRCDIR}/Header\
${SRCDIR}/Localstuff\
${SRCDIR}/Magdir/[a-z]*
-all: file magic
+all: file magic magic.mgc
magic: $(MAGFILES)
cat $(MAGFILES) > $(.TARGET)
+magic.mgc: file magic
+ ./$(PROG) -C -m magic
+
CLEANFILES+= print-hacked.c
print-hacked.c: print.c
sed -e 's|daylight|0/*daylight*/|g' ${.ALLSRC} > ${.TARGET}
@@ -58,5 +61,7 @@ print-hacked.c: print.c
beforeinstall:
$(INSTALL) $(COPY) -o $(BINOWN) -g $(BINGRP) -m $(MAGICMODE) \
magic $(DESTDIR)$(MAGICFILE)
+ $(INSTALL) $(COPY) -o $(BINOWN) -g $(BINGRP) -m $(MAGICMODE) \
+ magic.mgc $(DESTDIR)$(MAGICFILE).mgc
.include <bsd.prog.mk>
OpenPOWER on IntegriCloud