1 CONTRIBDIR
= ${.CURDIR
}/..
/..
/contrib
/file
2 .PATH
: ${CONTRIBDIR}/src
4 LIBMAGICDIR
= ${.CURDIR
}/..
/..
/lib
/libmagic
/libmagic
7 VER
!= grep
-w VERSION
${LIBMAGICDIR}/config.h | awk
-F
\" '{print $$2}'
8 MAGIC
= /usr
/share
/misc
/magic
13 CFLAGS
+= -DHAVE_CONFIG_H
-DMAGIC
=\"${MAGIC}\"
14 CFLAGS
+= -I
${LIBMAGICDIR}
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
>