1# $FreeBSD$ 2.include <src.opts.mk> 3 4LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive 5 6PROG= bsdtar 7BSDTAR_VERSION_STRING= 3.1.2 8 9.PATH: ${LIBARCHIVEDIR}/tar 10SRCS= bsdtar.c \ 11 cmdline.c \ 12 creation_set.c \ 13 read.c \ 14 subst.c \ 15 util.c \ 16 write.c 17 18.PATH: ${LIBARCHIVEDIR}/libarchive_fe 19SRCS+= err.c \ 20 line_reader.c 21 22LIBADD= archive 23 24.if ${MK_ICONV} != "no" 25CFLAGS+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1 -DICONV_CONST=const 26.endif 27 28CFLAGS+= -DBSDTAR_VERSION_STRING=\"${BSDTAR_VERSION_STRING}\" 29CFLAGS+= -DPLATFORM_CONFIG_H=\"${.CURDIR}/../../lib/libarchive/config_freebsd.h\" 30CFLAGS+= -I${LIBARCHIVEDIR}/tar -I${LIBARCHIVEDIR}/libarchive 31CFLAGS+= -I${LIBARCHIVEDIR}/libarchive_fe 32SYMLINKS= bsdtar ${BINDIR}/tar 33MLINKS= bsdtar.1 tar.1 34 35.PHONY: check test clean-test 36check test: $(PROG) bsdtar.1.gz 37 cd ${.CURDIR}/test && make obj && make test 38 39clean-test: 40 cd ${.CURDIR}/test && make clean 41 42.include <bsd.prog.mk> 43