ckdist(1): Sync with FreeBSD.
[dragonfly.git] / usr.bin / file / Makefile
blob02f018987bb6d6976a2a90aa12a6ff862ad36f77
1 CONTRIBDIR= ${.CURDIR}/../../contrib/file
2 .PATH: ${CONTRIBDIR}/src
4 LIBMAGICDIR= ${.CURDIR}/../../lib/libmagic/libmagic
5 CS= 1
6 FS= 5
7 VER!= grep -w VERSION ${LIBMAGICDIR}/config.h | awk -F\" '{print $$2}'
8 MAGIC= /usr/share/misc/magic
10 PROG= file
11 MAN= file.1 magic.5
13 CFLAGS+= -DHAVE_CONFIG_H -DMAGIC=\"${MAGIC}\"
14 CFLAGS+= -I${LIBMAGICDIR}
16 LDADD+= -lmagic -lz
17 DPADD+= ${LIBMAGIC} ${LIBZ}
19 file.1: ${CONTRIBDIR}/doc/file.man
20 sed -e s@__CSECTION__@${CS}@g \
21 -e s@__FSECTION__@${FS}@g \
22 -e s@__VERSION__@${VER}@g \
23 -e s@__MAGIC__@${MAGIC}@g ${.ALLSRC} > ${.TARGET}
25 magic.5: ${CONTRIBDIR}/doc/magic.man
26 sed -e s@__CSECTION__@${CS}@g \
27 -e s@__FSECTION__@${FS}@g \
28 -e s@__VERSION__@${VER}@g \
29 -e s@__MAGIC__@${MAGIC}@g ${.ALLSRC} > ${.TARGET}
31 CLEANFILES+= file.1 magic.5
32 .include <bsd.prog.mk>