Changeset View
Changeset View
Standalone View
Standalone View
usr.bin/file/Makefile
Show All 14 Lines | |||||
# 2. The origin of this software must not be misrepresented, either by | # 2. The origin of this software must not be misrepresented, either by | ||||
# explicit claim or by omission. Since few users ever read sources, | # explicit claim or by omission. Since few users ever read sources, | ||||
# credits must appear in the documentation. | # credits must appear in the documentation. | ||||
# 3. Altered versions must be plainly marked as such, and must not be | # 3. Altered versions must be plainly marked as such, and must not be | ||||
# misrepresented as being the original software. Since few users | # misrepresented as being the original software. Since few users | ||||
# ever read sources, credits must appear in the documentation. | # ever read sources, credits must appear in the documentation. | ||||
# 4. This notice may not be removed or altered. | # 4. This notice may not be removed or altered. | ||||
.include <src.opts.mk> | |||||
SRCDIR= ${SRCTOP}/contrib/file | SRCDIR= ${SRCTOP}/contrib/file | ||||
.PATH: ${SRCDIR}/src | .PATH: ${SRCDIR}/src | ||||
.PATH: ${SRCDIR}/doc | .PATH: ${SRCDIR}/doc | ||||
PROG= file | PROG= file | ||||
MAGICPATH?= /usr/share/misc | MAGICPATH?= /usr/share/misc | ||||
CFLAGS+= -DMAGIC='"${MAGICPATH}/magic"' -DHAVE_CONFIG_H | CFLAGS+= -DMAGIC='"${MAGICPATH}/magic"' -DHAVE_CONFIG_H -DHAVE_CAPSICUM | ||||
CFLAGS+= -I${SRCTOP}/lib/libmagic | CFLAGS+= -I${SRCTOP}/lib/libmagic | ||||
LIBADD= magic | LIBADD= magic | ||||
FILEVER!= awk '$$1 == "\#define" && $$2 == "VERSION" { print $$3; exit }' \ | FILEVER!= awk '$$1 == "\#define" && $$2 == "VERSION" { print $$3; exit }' \ | ||||
${SRCTOP}/lib/libmagic/config.h | ${SRCTOP}/lib/libmagic/config.h | ||||
CLEANFILES+= ${MAN} | CLEANFILES+= ${MAN} | ||||
.if ${MK_CASPER} != "no" | |||||
LIBADD+= casper | |||||
LIBADD+= cap_fileargs | |||||
CFLAGS+= -DWITH_CASPER | |||||
.endif | |||||
.include <bsd.prog.mk> | .include <bsd.prog.mk> | ||||
.for mp in ${MAN} | .for mp in ${MAN} | ||||
${mp}: ${mp:C/[0-9]/man/} | ${mp}: ${mp:C/[0-9]/man/} | ||||
sed -e 's/__FSECTION__/5/g' -e 's/__CSECTION__/1/g' \ | sed -e 's/__FSECTION__/5/g' -e 's/__CSECTION__/1/g' \ | ||||
-e 's/__VERSION__/${FILEVER}/g' \ | -e 's/__VERSION__/${FILEVER}/g' \ | ||||
-e 's,__MAGIC__,${MAGICPATH}/magic,g' ${.ALLSRC} > ${.TARGET} | -e 's,__MAGIC__,${MAGICPATH}/magic,g' ${.ALLSRC} > ${.TARGET} | ||||
.endfor | .endfor |