PageRenderTime 20ms CodeModel.GetById 11ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

/usr.bin/tar/test/Makefile

https://bitbucket.org/freebsd/freebsd-head/
Makefile | 79 lines | 63 code | 11 blank | 5 comment | 0 complexity | 355c292bd92323722ccec210e106a18d MD5 | raw file
 1# $FreeBSD$
 2
 3LIBARCHIVEDIR=	${.CURDIR}/../../../contrib/libarchive
 4
 5.PATH: ${LIBARCHIVEDIR}/tar/test
 6TESTS=	\
 7	test_0.c				\
 8	test_basic.c				\
 9	test_copy.c				\
10	test_empty_mtree.c			\
11	test_format_newc.c			\
12	test_help.c				\
13	test_option_C_upper.c			\
14	test_option_H_upper.c			\
15	test_option_L_upper.c			\
16	test_option_O_upper.c			\
17	test_option_T_upper.c			\
18	test_option_U_upper.c			\
19	test_option_X_upper.c			\
20	test_option_b.c				\
21	test_option_exclude.c			\
22	test_option_gid_gname.c			\
23	test_option_k.c				\
24	test_option_keep_newer_files.c		\
25	test_option_n.c				\
26	test_option_nodump.c			\
27	test_option_newer_than.c		\
28	test_option_q.c				\
29	test_option_r.c				\
30	test_option_s.c				\
31	test_option_uid_uname.c			\
32	test_patterns.c				\
33	test_print_longpath.c			\
34	test_stdio.c				\
35	test_strip_components.c			\
36	test_symlink_dir.c			\
37	test_version.c
38
39# Build the test program
40SRCS=	${TAR_SRCS}				\
41	${TESTS}				\
42	list.h					\
43	main.c
44
45CLEANFILES+= list.h
46
47NO_MAN=yes
48
49PROG=bsdtar_test
50DPADD=${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBLZMA}
51CFLAGS+=	-DPLATFORM_CONFIG_H=\"${.CURDIR}/../../../lib/libarchive/config_freebsd.h\"
52LDADD= -larchive -lz -lbz2 -llzma
53CFLAGS+= -static -g -O2 -Wall
54CFLAGS+= -I${.CURDIR}/../../../lib/libarchive -I${.OBJDIR}
55CFLAGS+= -I${LIBARCHIVEDIR}/tar
56
57# Uncomment to link against dmalloc
58#LDADD+= -L/usr/local/lib -ldmalloc
59#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC
60
61check test:	bsdtar_test
62	./bsdtar_test -p ${.OBJDIR}/../bsdtar -r ${LIBARCHIVEDIR}/tar/test
63
64list.h: ${TESTS} Makefile
65	(cd ${LIBARCHIVEDIR}/tar/test; cat ${TESTS}) | \
66	grep DEFINE_TEST > ${.OBJDIR}/list.h
67
68clean:
69	rm -f ${CLEANFILES}
70	rm -f *.out
71	rm -f *.o
72	rm -f *.core
73	rm -f *~
74	rm -f list.h
75	rm -f archive.h ../archive.h
76	-chmod -R +w /tmp/bsdtar_test.*
77	rm -rf /tmp/bsdtar_test.*
78
79.include <bsd.prog.mk>