Makefile revision 183009
1# $FreeBSD: head/usr.bin/tar/test/Makefile 183009 2008-09-14 02:16:04Z kientzle $ 2 3# Where to find the tar sources (for the internal unit tests) 4TAR_SRCDIR=${.CURDIR}/.. 5.PATH: ${TAR_SRCDIR} 6 7# Some tar sources are pulled in for white-box tests 8TAR_SRCS= \ 9 ../getdate.y 10 11TESTS= \ 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_symlink_dir.c \ 22 test_version.c 23 24# Build the test program 25SRCS= ${TAR_SRCS} \ 26 ${TESTS} \ 27 list.h \ 28 main.c 29 30CLEANFILES+= list.h 31 32NO_MAN=yes 33 34PROG=bsdtar_test 35DPADD=${LIBARCHIVE} ${LIBBZ2} ${LIBZ} 36CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\" 37CFLAGS+= -I.. 38LDADD= -larchive -lz -lbz2 39CFLAGS+= -static -g -O2 -Wall 40CFLAGS+= -I${.OBJDIR} 41CFLAGS+= -I${TAR_SRCDIR} 42 43# Uncomment to link against dmalloc 44#LDADD+= -L/usr/local/lib -ldmalloc 45#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC 46WARNS=6 47 48check test: bsdtar_test 49 ./bsdtar_test -p ${.OBJDIR}/../bsdtar -r ${.CURDIR} 50 51list.h: ${TESTS} Makefile 52 (cd ${.CURDIR}; cat ${TESTS}) | grep DEFINE_TEST > list.h 53 54clean: 55 rm -f *.out 56 rm -f *.o 57 rm -f *.core 58 rm -f *~ 59 rm -f list.h 60 rm -f archive.h ../archive.h 61 -chmod -R +w /tmp/bsdtar_test.* 62 rm -rf /tmp/bsdtar_test.* 63 64.include <bsd.prog.mk> 65