xref: /netbsd-src/tests/usr.bin/tar/Makefile (revision 382e5ca01200ab9afcadd2ae09f6969cb8775301)
1*382e5ca0Skre# $NetBSD: Makefile,v 1.5 2024/06/10 07:31:51 kre Exp $
2ad61858aSchristos
3ad61858aSchristosNOMAN=
4ad61858aSchristos
5ad61858aSchristos.include <bsd.own.mk>
6ad61858aSchristosLIBARCHIVE=${NETBSDSRCDIR}/external/bsd/libarchive/dist
7ad61858aSchristos
8ad61858aSchristosTESTSDIR=	${TESTSBASE}/usr.bin/tar
9ad61858aSchristos
10ad61858aSchristosBINDIR=                 ${TESTSDIR}
11ad61858aSchristosPROGS+=	h_tar
12ad61858aSchristosTESTS_SH+=	t_tar
13ad61858aSchristos
14ad61858aSchristosCPPFLAGS+=-I${LIBARCHIVE}/test_utils -I${LIBARCHIVE}/tar -I.
15ad61858aSchristosCPPFLAGS+=-I${LIBARCHIVE}/tar/test -I${LIBARCHIVE}/../include
16ad61858aSchristosCPPFLAGS+=-I${LIBARCHIVE}/libarchive
17ad61858aSchristos
18ad61858aSchristos.PATH: ${LIBARCHIVE}/tar/test ${LIBARCHIVE}/test_utils
19ad61858aSchristos
20d6c17dbbSchristosDPADD+=	${LIBARCHIVE} ${LIBEXPAT} ${LIBBZ2} ${LIBLZMA} ${LIBZ} \
21d6c17dbbSchristos	${LIBCRYPTO} ${LIBPTHREAD}
22d6c17dbbSchristosLDADD+=	-larchive -lexpat -lbz2 -llzma -lz -lcrypto -lpthread
23ad61858aSchristos
24ad61858aSchristosSRCS.h_tar= \
25ad61858aSchristostest_main.c \
26ad61858aSchristostest_utils.c \
27ad61858aSchristostest_0.c \
28ad61858aSchristostest_basic.c \
29ad61858aSchristostest_copy.c \
30ad61858aSchristostest_empty_mtree.c \
31ad61858aSchristostest_extract_tar_Z.c \
32ad61858aSchristostest_extract_tar_bz2.c \
33ad61858aSchristostest_extract_tar_grz.c \
34ad61858aSchristostest_extract_tar_gz.c \
35ad61858aSchristostest_extract_tar_lrz.c \
36ad61858aSchristostest_extract_tar_lz.c \
37ad61858aSchristostest_extract_tar_lz4.c \
38ad61858aSchristostest_extract_tar_lzma.c \
39ad61858aSchristostest_extract_tar_lzo.c \
40ad61858aSchristostest_extract_tar_xz.c \
41ad61858aSchristostest_extract_tar_zstd.c \
42ad61858aSchristostest_format_newc.c \
43ad61858aSchristostest_help.c \
44ad61858aSchristostest_leading_slash.c \
45ad61858aSchristostest_missing_file.c \
46ad61858aSchristostest_option_C_mtree.c \
47ad61858aSchristostest_option_C_upper.c \
48ad61858aSchristostest_option_H_upper.c \
49ad61858aSchristostest_option_L_upper.c \
50ad61858aSchristostest_option_O_upper.c \
51ad61858aSchristostest_option_T_upper.c \
52ad61858aSchristostest_option_U_upper.c \
53ad61858aSchristostest_option_X_upper.c \
54ad61858aSchristostest_option_a.c \
55ad61858aSchristostest_option_acls.c \
56ad61858aSchristostest_option_b.c \
57ad61858aSchristostest_option_b64encode.c \
58ad61858aSchristostest_option_exclude.c \
59ad61858aSchristostest_option_exclude_vcs.c \
60ad61858aSchristostest_option_fflags.c \
61ad61858aSchristostest_option_gid_gname.c \
62ad61858aSchristostest_option_grzip.c \
63ad61858aSchristostest_option_j.c \
64ad61858aSchristostest_option_k.c \
65ad61858aSchristostest_option_keep_newer_files.c \
66ad61858aSchristostest_option_lrzip.c \
67ad61858aSchristostest_option_lz4.c \
68ad61858aSchristostest_option_lzma.c \
69ad61858aSchristostest_option_lzop.c \
70ad61858aSchristostest_option_n.c \
71ad61858aSchristostest_option_newer_than.c \
72ad61858aSchristostest_option_nodump.c \
73ad61858aSchristostest_option_older_than.c \
74ad61858aSchristostest_option_passphrase.c \
75ad61858aSchristostest_option_q.c \
76ad61858aSchristostest_option_r.c \
77ad61858aSchristostest_option_s.c \
78ad61858aSchristostest_option_uid_uname.c \
79ad61858aSchristostest_option_uuencode.c \
80ad61858aSchristostest_option_xattrs.c \
81ad61858aSchristostest_option_xz.c \
82ad61858aSchristostest_option_z.c \
83ad61858aSchristostest_option_zstd.c \
84ad61858aSchristostest_patterns.c \
85ad61858aSchristostest_print_longpath.c \
86ad61858aSchristostest_stdio.c \
87ad61858aSchristostest_strip_components.c \
88ad61858aSchristostest_symlink_dir.c \
89ad61858aSchristostest_version.c \
90ad61858aSchristostest_windows.c
91ad61858aSchristos
92ad61858aSchristosFILESDIR=       ${TESTSDIR}
93ad61858aSchristosFILES=\
94ad61858aSchristostest_extract.tar.Z.uu \
95ad61858aSchristostest_extract.tar.bz2.uu \
96ad61858aSchristostest_extract.tar.grz.uu \
97ad61858aSchristostest_extract.tar.gz.uu \
98ad61858aSchristostest_extract.tar.lrz.uu \
99ad61858aSchristostest_extract.tar.lz.uu \
100ad61858aSchristostest_extract.tar.lz4.uu \
101ad61858aSchristostest_extract.tar.lzma.uu \
102ad61858aSchristostest_extract.tar.lzo.uu \
103ad61858aSchristostest_extract.tar.xz.uu \
104ad61858aSchristostest_extract.tar.zst.uu \
105ad61858aSchristostest_leading_slash.tar.uu \
106ad61858aSchristostest_option_keep_newer_files.tar.Z.uu \
107ad61858aSchristostest_option_passphrase.zip.uu \
108ad61858aSchristostest_option_s.tar.Z.uu \
109ad61858aSchristostest_patterns_2.tar.uu \
110ad61858aSchristostest_patterns_3.tar.uu \
111ad61858aSchristostest_patterns_4.tar.uu \
112ad61858aSchristostest_print_longpath.tar.Z.uu
113ad61858aSchristos
114ad61858aSchristos.include <bsd.test.mk>
115ad61858aSchristos
11663fc2f47Schristostest_main.o test_main.d: list.h
117ad61858aSchristos
118ad61858aSchristosCLEANFILES+=list.h
119ad61858aSchristos
120ad61858aSchristoslist.h: ${SRCS.h_tar} Makefile
121ad61858aSchristos	${TOOL_GREP} -h '^DEFINE_TEST(' ${.ALLSRC} > ${.TARGET}
122*382e5ca0Skre
123*382e5ca0SkreCOPTS.test_main.c+=	${CC_WNO_STRINGOP_OVERFLOW}
124*382e5ca0SkreCOPTS.test_option_b.c+=	${CC_WNO_STRINGOP_OVERFLOW}
125