1# $NetBSD: Makefile,v 1.5 2024/06/10 07:31:51 kre Exp $ 2 3NOMAN= 4 5.include <bsd.own.mk> 6LIBARCHIVE=${NETBSDSRCDIR}/external/bsd/libarchive/dist 7 8TESTSDIR= ${TESTSBASE}/usr.bin/tar 9 10BINDIR= ${TESTSDIR} 11PROGS+= h_tar 12TESTS_SH+= t_tar 13 14CPPFLAGS+=-I${LIBARCHIVE}/test_utils -I${LIBARCHIVE}/tar -I. 15CPPFLAGS+=-I${LIBARCHIVE}/tar/test -I${LIBARCHIVE}/../include 16CPPFLAGS+=-I${LIBARCHIVE}/libarchive 17 18.PATH: ${LIBARCHIVE}/tar/test ${LIBARCHIVE}/test_utils 19 20DPADD+= ${LIBARCHIVE} ${LIBEXPAT} ${LIBBZ2} ${LIBLZMA} ${LIBZ} \ 21 ${LIBCRYPTO} ${LIBPTHREAD} 22LDADD+= -larchive -lexpat -lbz2 -llzma -lz -lcrypto -lpthread 23 24SRCS.h_tar= \ 25test_main.c \ 26test_utils.c \ 27test_0.c \ 28test_basic.c \ 29test_copy.c \ 30test_empty_mtree.c \ 31test_extract_tar_Z.c \ 32test_extract_tar_bz2.c \ 33test_extract_tar_grz.c \ 34test_extract_tar_gz.c \ 35test_extract_tar_lrz.c \ 36test_extract_tar_lz.c \ 37test_extract_tar_lz4.c \ 38test_extract_tar_lzma.c \ 39test_extract_tar_lzo.c \ 40test_extract_tar_xz.c \ 41test_extract_tar_zstd.c \ 42test_format_newc.c \ 43test_help.c \ 44test_leading_slash.c \ 45test_missing_file.c \ 46test_option_C_mtree.c \ 47test_option_C_upper.c \ 48test_option_H_upper.c \ 49test_option_L_upper.c \ 50test_option_O_upper.c \ 51test_option_T_upper.c \ 52test_option_U_upper.c \ 53test_option_X_upper.c \ 54test_option_a.c \ 55test_option_acls.c \ 56test_option_b.c \ 57test_option_b64encode.c \ 58test_option_exclude.c \ 59test_option_exclude_vcs.c \ 60test_option_fflags.c \ 61test_option_gid_gname.c \ 62test_option_grzip.c \ 63test_option_j.c \ 64test_option_k.c \ 65test_option_keep_newer_files.c \ 66test_option_lrzip.c \ 67test_option_lz4.c \ 68test_option_lzma.c \ 69test_option_lzop.c \ 70test_option_n.c \ 71test_option_newer_than.c \ 72test_option_nodump.c \ 73test_option_older_than.c \ 74test_option_passphrase.c \ 75test_option_q.c \ 76test_option_r.c \ 77test_option_s.c \ 78test_option_uid_uname.c \ 79test_option_uuencode.c \ 80test_option_xattrs.c \ 81test_option_xz.c \ 82test_option_z.c \ 83test_option_zstd.c \ 84test_patterns.c \ 85test_print_longpath.c \ 86test_stdio.c \ 87test_strip_components.c \ 88test_symlink_dir.c \ 89test_version.c \ 90test_windows.c 91 92FILESDIR= ${TESTSDIR} 93FILES=\ 94test_extract.tar.Z.uu \ 95test_extract.tar.bz2.uu \ 96test_extract.tar.grz.uu \ 97test_extract.tar.gz.uu \ 98test_extract.tar.lrz.uu \ 99test_extract.tar.lz.uu \ 100test_extract.tar.lz4.uu \ 101test_extract.tar.lzma.uu \ 102test_extract.tar.lzo.uu \ 103test_extract.tar.xz.uu \ 104test_extract.tar.zst.uu \ 105test_leading_slash.tar.uu \ 106test_option_keep_newer_files.tar.Z.uu \ 107test_option_passphrase.zip.uu \ 108test_option_s.tar.Z.uu \ 109test_patterns_2.tar.uu \ 110test_patterns_3.tar.uu \ 111test_patterns_4.tar.uu \ 112test_print_longpath.tar.Z.uu 113 114.include <bsd.test.mk> 115 116test_main.o test_main.d: list.h 117 118CLEANFILES+=list.h 119 120list.h: ${SRCS.h_tar} Makefile 121 ${TOOL_GREP} -h '^DEFINE_TEST(' ${.ALLSRC} > ${.TARGET} 122 123COPTS.test_main.c+= ${CC_WNO_STRINGOP_OVERFLOW} 124COPTS.test_option_b.c+= ${CC_WNO_STRINGOP_OVERFLOW} 125