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