]> CyberLeo.Net >> Repos - FreeBSD/releng/7.2.git/blob - usr.bin/tar/test/Makefile
Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.
[FreeBSD/releng/7.2.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.y
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_patterns.c                         \
20         test_stdio.c                            \
21         test_strip_components.c                 \
22         test_symlink_dir.c                      \
23         test_version.c
24
25 # Build the test program
26 SRCS= ${TAR_SRCS}                               \
27         ${TESTS}                                \
28         list.h                                  \
29         main.c
30
31 CLEANFILES+= list.h
32
33 NO_MAN=yes
34
35 PROG=bsdtar_test
36 DPADD=${LIBARCHIVE} ${LIBBZ2} ${LIBZ}
37 CFLAGS+=        -DPLATFORM_CONFIG_H=\"config_freebsd.h\"
38 CFLAGS+=        -I..
39 LDADD= -larchive -lz -lbz2
40 CFLAGS+= -static -g -O2 -Wall
41 CFLAGS+= -I${.OBJDIR}
42 CFLAGS+= -I${TAR_SRCDIR}
43
44 # Uncomment to link against dmalloc
45 #LDADD+= -L/usr/local/lib -ldmalloc
46 #CFLAGS+= -I/usr/local/include -DUSE_DMALLOC
47 WARNS=6
48
49 check test:     bsdtar_test
50         ./bsdtar_test -p ${.OBJDIR}/../bsdtar -r ${.CURDIR}
51
52 list.h: ${TESTS} Makefile
53         (cd ${.CURDIR}; cat ${TESTS}) | grep DEFINE_TEST > list.h
54
55 clean:
56         rm -f *.out
57         rm -f *.o
58         rm -f *.core
59         rm -f *~
60         rm -f list.h
61         rm -f archive.h ../archive.h
62         -chmod -R +w /tmp/bsdtar_test.*
63         rm -rf /tmp/bsdtar_test.*
64
65 .include <bsd.prog.mk>