Makefile revision 180026
1# $FreeBSD: head/lib/libarchive/test/Makefile 180026 2008-06-26 10:53:05Z des $ 2 3# Where to find the libarchive sources 4LA_SRCDIR=${.CURDIR}/.. 5.PATH: ${LA_SRCDIR} 6 7# Get a list of all libarchive source files 8LA_SRCS!=make -f ${LA_SRCDIR}/Makefile -V SRCS 9 10TESTS= \ 11 test_acl_basic.c \ 12 test_acl_pax.c \ 13 test_archive_api_feature.c \ 14 test_bad_fd.c \ 15 test_compat_gtar.c \ 16 test_compat_tar_hardlink.c \ 17 test_compat_zip.c \ 18 test_empty_write.c \ 19 test_entry.c \ 20 test_entry_strmode.c \ 21 test_link_resolver.c \ 22 test_pax_filename_encoding.c \ 23 test_read_compress_program.c \ 24 test_read_data_large.c \ 25 test_read_extract.c \ 26 test_read_format_ar.c \ 27 test_read_format_cpio_bin.c \ 28 test_read_format_cpio_bin_Z.c \ 29 test_read_format_cpio_bin_bz2.c \ 30 test_read_format_cpio_bin_gz.c \ 31 test_read_format_cpio_odc.c \ 32 test_read_format_cpio_svr4_gzip.c \ 33 test_read_format_cpio_svr4c_Z.c \ 34 test_read_format_empty.c \ 35 test_read_format_gtar_gz.c \ 36 test_read_format_gtar_sparse.c \ 37 test_read_format_iso_gz.c \ 38 test_read_format_isorr_bz2.c \ 39 test_read_format_mtree.c \ 40 test_read_format_pax_bz2.c \ 41 test_read_format_tar.c \ 42 test_read_format_tar_empty_filename.c \ 43 test_read_format_tbz.c \ 44 test_read_format_tgz.c \ 45 test_read_format_tz.c \ 46 test_read_format_zip.c \ 47 test_read_large.c \ 48 test_read_pax_truncated.c \ 49 test_read_position.c \ 50 test_read_truncated.c \ 51 test_tar_filenames.c \ 52 test_tar_large.c \ 53 test_ustar_filenames.c \ 54 test_write_compress_program.c \ 55 test_write_compress.c \ 56 test_write_disk.c \ 57 test_write_disk_hardlink.c \ 58 test_write_disk_perms.c \ 59 test_write_disk_secure.c \ 60 test_write_format_ar.c \ 61 test_write_format_cpio.c \ 62 test_write_format_cpio_odc.c \ 63 test_write_format_cpio_newc.c \ 64 test_write_format_cpio_empty.c \ 65 test_write_format_shar_empty.c \ 66 test_write_format_tar.c \ 67 test_write_format_tar_ustar.c \ 68 test_write_format_tar_empty.c \ 69 test_write_open_memory.c 70 71 72# Build the test program using all libarchive sources + the test sources. 73SRCS= ${LA_SRCS} \ 74 ${TESTS} \ 75 ${.OBJDIR}/list.h \ 76 main.c \ 77 read_open_memory.c 78 79NO_MAN=yes 80 81PROG=libarchive_test 82INTERNALPROG=yes # Don't install this; it's just for testing 83DPADD=${LIBBZ2} ${LIBZ} 84CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\" 85LDADD= -lz -lbz2 86CFLAGS+= -static -g 87CFLAGS+= -I${LA_SRCDIR} 88 89# Uncomment to link against dmalloc 90#LDADD+= -L/usr/local/lib -ldmalloc 91#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC 92WARNS=6 93 94# Build libarchive_test and run it. 95check test: libarchive_test 96 ./libarchive_test -v -r ${.CURDIR} 97 98# list.h is just a list of all tests, as indicated by DEFINE_TEST macro lines 99${.OBJDIR}/list.h: ${TESTS} Makefile 100 (cd ${.CURDIR}; cat ${TESTS}) | grep DEFINE_TEST > list.h 101 102CLEANFILES += *.out *.o *.core *~ list.h 103 104cleantest: 105 -chmod -R +w /tmp/libarchive_test.* 106 rm -rf /tmp/libarchive_test.* 107 108.include <bsd.prog.mk> 109