Support the new "-i" (output MIME type strings) option by installing
the MIME files (both regular and precompiled).
This commit is contained in:
parent
8c662313ce
commit
9732caee1b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=81292
@ -40,13 +40,13 @@ SRCS= file.c apprentice.c fsmagic.c softmagic.c ascmagic.c \
|
||||
|
||||
MAN= file.1 magic.5
|
||||
|
||||
CLEANFILES+= magic magic.mgc
|
||||
CLEANFILES+= magic magic.mgc magic.mime.mgc magic.mime.PITA
|
||||
|
||||
MAGFILES= ${SRCDIR}/Header\
|
||||
${SRCDIR}/Localstuff\
|
||||
${SRCDIR}/Magdir/[a-z]*
|
||||
|
||||
all: file magic magic.mgc
|
||||
all: file magic magic.mgc magic.mime.mgc
|
||||
|
||||
magic: $(MAGFILES)
|
||||
cat $(MAGFILES) > $(.TARGET)
|
||||
@ -54,6 +54,11 @@ magic: $(MAGFILES)
|
||||
magic.mgc: file magic
|
||||
./$(PROG) -C -m magic
|
||||
|
||||
magic.mime.mgc: file magic.mime
|
||||
ln -sf $(SRCDIR)/magic.mime magic.mime.PITA
|
||||
./$(PROG) -C -m magic.mime.PITA
|
||||
mv magic.mime.PITA.mgc magic.mime.mgc
|
||||
|
||||
CLEANFILES+= print-hacked.c
|
||||
print-hacked.c: print.c
|
||||
sed -e 's|daylight|0/*daylight*/|g' ${.ALLSRC} > ${.TARGET}
|
||||
@ -63,5 +68,9 @@ beforeinstall:
|
||||
magic $(DESTDIR)$(MAGICFILE)
|
||||
$(INSTALL) $(COPY) -o $(BINOWN) -g $(BINGRP) -m $(MAGICMODE) \
|
||||
magic.mgc $(DESTDIR)$(MAGICFILE).mgc
|
||||
$(INSTALL) $(COPY) -o $(BINOWN) -g $(BINGRP) -m $(MAGICMODE) \
|
||||
$(SRCDIR)/magic.mime $(DESTDIR)$(MAGICFILE).mime
|
||||
$(INSTALL) $(COPY) -o $(BINOWN) -g $(BINGRP) -m $(MAGICMODE) \
|
||||
magic.mime.mgc $(DESTDIR)$(MAGICFILE).mime.mgc
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
Loading…
Reference in New Issue
Block a user