3 LIBARCHIVEDIR= ${.CURDIR}/../../../contrib/libarchive
5 .PATH: ${LIBARCHIVEDIR}/tar
6 # Some tar sources are pulled in for white-box tests
10 .PATH: ${LIBARCHIVEDIR}/tar/test
18 test_option_C_upper.c \
19 test_option_H_upper.c \
20 test_option_L_upper.c \
21 test_option_O_upper.c \
22 test_option_T_upper.c \
23 test_option_U_upper.c \
24 test_option_X_upper.c \
26 test_option_exclude.c \
27 test_option_gid_gname.c \
29 test_option_keep_newer_files.c \
31 test_option_newer_than.c \
35 test_option_uid_uname.c \
37 test_print_longpath.c \
39 test_strip_components.c \
43 # Build the test program
54 DPADD=${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBLZMA}
55 CFLAGS+= -DPLATFORM_CONFIG_H=\"${.CURDIR}/../../../lib/libarchive/config_freebsd.h\"
56 LDADD= -larchive -lz -lbz2 -llzma
57 CFLAGS+= -static -g -O2 -Wall
58 CFLAGS+= -I${.CURDIR}/../../../lib/libarchive -I${.OBJDIR}
59 CFLAGS+= -I${LIBARCHIVEDIR}/tar
61 # Uncomment to link against dmalloc
62 #LDADD+= -L/usr/local/lib -ldmalloc
63 #CFLAGS+= -I/usr/local/include -DUSE_DMALLOC
65 check test: bsdtar_test
66 ./bsdtar_test -p ${.OBJDIR}/../bsdtar -r ${LIBARCHIVEDIR}/tar/test
68 list.h: ${TESTS} Makefile
69 (cd ${LIBARCHIVEDIR}/tar/test; cat ${TESTS}) | \
70 grep DEFINE_TEST > ${.OBJDIR}/list.h
79 rm -f archive.h ../archive.h
80 -chmod -R +w /tmp/bsdtar_test.*
81 rm -rf /tmp/bsdtar_test.*
83 .include <bsd.prog.mk>