]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - usr.bin/cpio/test/Makefile
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.git] / usr.bin / cpio / test / Makefile
1 # $FreeBSD$
2
3 # Where to find the cpio sources (for the internal unit tests)
4 CPIO_SRCDIR=${.CURDIR}/..
5 .PATH: ${CPIO_SRCDIR}
6
7 # Some cpio sources are pulled in for white-box tests
8 CPIO_SRCS= cmdline.c err.c pathmatch.c
9
10 TESTS=  \
11         test_0.c                                \
12         test_basic.c                            \
13         test_format_newc.c                      \
14         test_gcpio_compat.c                     \
15         test_option_a.c                         \
16         test_option_B.c                         \
17         test_option_c.c                         \
18         test_option_d.c                         \
19         test_option_f.c                         \
20         test_option_help.c                      \
21         test_option_L.c                         \
22         test_option_ell.c                       \
23         test_option_m.c                         \
24         test_option_t.c                         \
25         test_option_u.c                         \
26         test_option_version.c                   \
27         test_option_y.c                         \
28         test_option_z.c                         \
29         test_owner_parse.c                      \
30         test_passthrough_dotdot.c               \
31         test_passthrough_reverse.c              \
32         test_pathmatch.c
33
34 # Build the test program
35 SRCS= list.h                                    \
36         ${CPIO_SRCS}                            \
37         ${TESTS}                                \
38         main.c
39
40 CLEANFILES+= list.h bsdcpio_test
41
42 NO_MAN=yes
43
44 PROG=bsdcpio_test
45 DPADD=${LIBARCHIVE} ${LIBBZ2} ${LIBZ}
46 CFLAGS+=        -DPLATFORM_CONFIG_H=\"config_freebsd.h\"
47 CFLAGS+=        -I..
48 LDADD= -larchive -lz -lbz2
49 CFLAGS+= -static -g -O2 -Wall
50 CFLAGS+= -I${.OBJDIR}
51 CFLAGS+= -I${CPIO_SRCDIR}
52
53 # Uncomment to link against dmalloc
54 #LDADD+= -L/usr/local/lib -ldmalloc
55 #CFLAGS+= -I/usr/local/include -DUSE_DMALLOC
56 WARNS=6
57
58 check test:     bsdcpio_test
59         ${.OBJDIR}/bsdcpio_test -p ${.OBJDIR}/../bsdcpio -r ${.CURDIR}
60
61 ${.OBJDIR}/list.h list.h: ${TESTS} Makefile
62         (cd ${.CURDIR}; cat ${TESTS}) | grep DEFINE_TEST > list.h
63
64 clean:
65         rm -f ${CLEANFILES}
66         rm -f *~
67         -chmod -R +w /tmp/bsdcpio_test.*
68         rm -rf /tmp/bsdcpio_test.*
69
70 .include <bsd.prog.mk>