1# $FreeBSD$ 2 3LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive 4 5ATF_TESTS_SH+= functional_test 6 7BINDIR= ${TESTSDIR} 8 9PROGS+= bsdcpio_test 10 11CFLAGS+= -DPLATFORM_CONFIG_H=\"${SRCTOP}/lib/libarchive/config_freebsd.h\" 12CFLAGS+= -I${SRCTOP}/lib/libarchive -I${.OBJDIR} 13 14CFLAGS+= -I${.OBJDIR} 15CFLAGS+= -I${LIBARCHIVEDIR}/cpio -I${LIBARCHIVEDIR}/libarchive_fe 16CFLAGS+= -I${LIBARCHIVEDIR}/test_utils 17 18# Uncomment to link against dmalloc 19#LDADD+= -L/usr/local/lib -ldmalloc 20#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC 21 22.PATH: ${LIBARCHIVEDIR}/cpio 23CPIO_SRCS= cmdline.c 24 25.PATH: ${LIBARCHIVEDIR}/libarchive_fe 26CPIO_SRCS+= err.c 27 28.PATH: ${LIBARCHIVEDIR}/cpio/test 29TESTS_SRCS= \ 30 test_0.c \ 31 test_basic.c \ 32 test_cmdline.c \ 33 test_extract_cpio_Z.c \ 34 test_extract_cpio_bz2.c \ 35 test_extract_cpio_grz.c \ 36 test_extract_cpio_gz.c \ 37 test_extract_cpio_lrz.c \ 38 test_extract_cpio_lz.c \ 39 test_extract_cpio_lzma.c \ 40 test_extract_cpio_lzo.c \ 41 test_extract_cpio_xz.c \ 42 test_format_newc.c \ 43 test_gcpio_compat.c \ 44 test_option_0.c \ 45 test_option_B_upper.c \ 46 test_option_C_upper.c \ 47 test_option_J_upper.c \ 48 test_option_L_upper.c \ 49 test_option_Z_upper.c \ 50 test_option_a.c \ 51 test_option_b64encode.c \ 52 test_option_c.c \ 53 test_option_d.c \ 54 test_option_f.c \ 55 test_option_grzip.c \ 56 test_option_help.c \ 57 test_option_l.c \ 58 test_option_lrzip.c \ 59 test_option_lzma.c \ 60 test_option_lzop.c \ 61 test_option_m.c \ 62 test_option_t.c \ 63 test_option_u.c \ 64 test_option_uuencode.c \ 65 test_option_version.c \ 66 test_option_xz.c \ 67 test_option_y.c \ 68 test_option_z.c \ 69 test_owner_parse.c \ 70 test_passthrough_dotdot.c \ 71 test_passthrough_reverse.c 72 73SRCS.bsdcpio_test= list.h \ 74 ${CPIO_SRCS} \ 75 ${TESTS_SRCS} \ 76 main.c 77 78DPSRCS.bsdcpio_test= \ 79 list.h 80 81.PATH: ${LIBARCHIVEDIR}/test_utils 82SRCS.bsdcpio_test+= test_utils.c 83 84LIBADD.bsdcpio_test= archive 85 86list.h: ${TESTS_SRCS} Makefile 87 @(cd ${LIBARCHIVEDIR}/tar/test && \ 88 grep -h DEFINE_TEST ${.ALLSRC:N*Makefile}) > ${.TARGET}.tmp 89 @mv ${.TARGET}.tmp ${.TARGET} 90 91CLEANFILES+= list.h list.h.tmp 92 93FILES+= test_extract.cpio.Z.uu 94FILES+= test_extract.cpio.bz2.uu 95FILES+= test_extract.cpio.grz.uu 96FILES+= test_extract.cpio.gz.uu 97FILES+= test_extract.cpio.lrz.uu 98FILES+= test_extract.cpio.lz.uu 99FILES+= test_extract.cpio.lzma.uu 100FILES+= test_extract.cpio.lzo.uu 101FILES+= test_extract.cpio.xz.uu 102FILES+= test_gcpio_compat_ref.bin.uu 103FILES+= test_gcpio_compat_ref.crc.uu 104FILES+= test_gcpio_compat_ref.newc.uu 105FILES+= test_gcpio_compat_ref.ustar.uu 106FILES+= test_gcpio_compat_ref_nosym.bin.uu 107FILES+= test_gcpio_compat_ref_nosym.crc.uu 108FILES+= test_gcpio_compat_ref_nosym.newc.uu 109FILES+= test_gcpio_compat_ref_nosym.ustar.uu 110FILES+= test_option_f.cpio.uu 111FILES+= test_option_m.cpio.uu 112FILES+= test_option_t.cpio.uu 113FILES+= test_option_t.stdout.uu 114FILES+= test_option_tv.stdout.uu 115 116.include <bsd.test.mk> 117