summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 b7d212e7d722..64e37c91442b 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>