]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - usr.bin/tar/test/Makefile
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.git] / usr.bin / tar / test / Makefile
1 # $FreeBSD$
2
3 # Where to find the tar sources (for the internal unit tests)
4 TAR_SRCDIR=${.CURDIR}/..
5 .PATH: ${TAR_SRCDIR}
6
7 # Some tar sources are pulled in for white-box tests
8 TAR_SRCS=                                       \
9         ../getdate.c
10
11 TESTS=  \
12         test_0.c                                \
13         test_basic.c                            \
14         test_copy.c                             \
15         test_getdate.c                          \
16         test_help.c                             \
17         test_option_T.c                         \
18         test_option_q.c                         \
19         test_option_s.c                         \
20         test_patterns.c                         \
21         test_stdio.c                            \
22         test_strip_components.c                 \
23         test_symlink_dir.c                      \
24         test_version.c
25
26 # Build the test program
27 SRCS= ${TAR_SRCS}                               \
28         ${TESTS}                                \
29         list.h                                  \
30         main.c
31
32 CLEANFILES+= list.h
33
34 NO_MAN=yes
35
36 PROG=bsdtar_test
37 DPADD=${LIBARCHIVE} ${LIBBZ2} ${LIBZ}
38 CFLAGS+=        -DPLATFORM_CONFIG_H=\"config_freebsd.h\"
39 CFLAGS+=        -I..
40 LDADD= -larchive -lz -lbz2
41 CFLAGS+= -static -g -O2 -Wall
42 CFLAGS+= -I${.OBJDIR}
43 CFLAGS+= -I${TAR_SRCDIR}
44
45 # Uncomment to link against dmalloc
46 #LDADD+= -L/usr/local/lib -ldmalloc
47 #CFLAGS+= -I/usr/local/include -DUSE_DMALLOC
48 WARNS=6
49
50 check test:     bsdtar_test
51         ./bsdtar_test -p ${.OBJDIR}/../bsdtar -r ${.CURDIR}
52
53 list.h: ${TESTS} Makefile
54         (cd ${.CURDIR}; cat ${TESTS}) | grep DEFINE_TEST > list.h
55
56 clean:
57         rm -f *.out
58         rm -f *.o
59         rm -f *.core
60         rm -f *~
61         rm -f list.h
62         rm -f archive.h ../archive.h
63         -chmod -R +w /tmp/bsdtar_test.*
64         rm -rf /tmp/bsdtar_test.*
65
66 .include <bsd.prog.mk>