Makefile revision 179321
14Srgrimes# $FreeBSD: head/lib/libarchive/test/Makefile 179321 2008-05-26 17:00:24Z kientzle $ 24Srgrimes 34Srgrimes# Where to find the libarchive sources 44SrgrimesLA_SRCDIR=${.CURDIR}/.. 54Srgrimes.PATH: ${LA_SRCDIR} 64Srgrimes 74Srgrimes# Get a list of all libarchive source files 84SrgrimesLA_SRCS!=make -f ${LA_SRCDIR}/Makefile -V SRCS 94Srgrimes 104SrgrimesTESTS= \ 114Srgrimes test_acl_basic.c \ 124Srgrimes test_acl_pax.c \ 134Srgrimes test_archive_api_feature.c \ 144Srgrimes test_bad_fd.c \ 154Srgrimes test_compat_gtar.c \ 164Srgrimes test_compat_tar_hardlink.c \ 174Srgrimes test_compat_zip.c \ 184Srgrimes test_empty_write.c \ 194Srgrimes test_entry.c \ 204Srgrimes test_entry_strmode.c \ 214Srgrimes test_link_resolver.c \ 224Srgrimes test_pax_filename_encoding.c \ 234Srgrimes test_read_compress_program.c \ 244Srgrimes test_read_data_large.c \ 254Srgrimes test_read_extract.c \ 264Srgrimes test_read_format_ar.c \ 274Srgrimes test_read_format_cpio_bin.c \ 284Srgrimes test_read_format_cpio_bin_Z.c \ 294Srgrimes test_read_format_cpio_bin_bz2.c \ 304Srgrimes test_read_format_cpio_bin_gz.c \ 314Srgrimes test_read_format_cpio_odc.c \ 324Srgrimes test_read_format_cpio_svr4_gzip.c \ 334Srgrimes test_read_format_cpio_svr4c_Z.c \ 344Srgrimes test_read_format_empty.c \ 354Srgrimes test_read_format_gtar_gz.c \ 364Srgrimes test_read_format_gtar_sparse.c \ 374Srgrimes test_read_format_iso_gz.c \ 38620Srgrimes test_read_format_isorr_bz2.c \ 3950477Speter test_read_format_mtree.c \ 404Srgrimes test_read_format_pax_bz2.c \ 414Srgrimes test_read_format_tar.c \ 4287649Sguido test_read_format_tar_empty_filename.c \ 4387649Sguido test_read_format_tbz.c \ 442056Swollman test_read_format_tgz.c \ 451549Srgrimes test_read_format_tz.c \ 465764Sbde test_read_format_zip.c \ 4756525Sbde test_read_large.c \ 4885448Sjlemon test_read_pax_truncated.c \ 4912675Sjulian test_read_position.c \ 5085373Sjlemon test_read_truncated.c \ 5185373Sjlemon test_tar_filenames.c \ 5269929Sobrien test_tar_large.c \ 5385373Sjlemon test_ustar_filenames.c \ 5418951Sjulian test_write_compress_program.c \ 5512701Sphk test_write_compress.c \ 562056Swollman test_write_disk.c \ 5734924Sbde test_write_disk_hardlink.c \ 5885373Sjlemon test_write_disk_perms.c \ 594Srgrimes test_write_disk_secure.c \ 6087620Sguido test_write_format_ar.c \ 6187620Sguido test_write_format_cpio.c \ 6212701Sphk test_write_format_cpio_odc.c \ 634Srgrimes test_write_format_cpio_newc.c \ 6412675Sjulian test_write_format_cpio_empty.c \ 6512675Sjulian test_write_format_shar_empty.c \ 6612675Sjulian test_write_format_tar.c \ 6712675Sjulian test_write_format_tar_ustar.c \ 6812675Sjulian test_write_format_tar_empty.c \ 6929368Speter test_write_open_memory.c 7072521Sjlemon 7112675Sjulian 7238485Sbde# Build the test program using all libarchive sources + the test sources. 7347625SphkSRCS= ${LA_SRCS} \ 7447625Sphk ${TESTS} \ 7547625Sphk ${.OBJDIR}/list.h \ 7647625Sphk main.c \ 7747625Sphk read_open_memory.c 7847625Sphk 7947625SphkNO_MAN=yes 8047625Sphk 8147625SphkPROG=libarchive_test 8247625SphkINTERNALPROG=yes # Don't install this; it's just for testing 8347625SphkDPADD=${LIBBZ2} ${LIBZ} 8447625SphkCFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\" 8547625SphkLDADD= -lz -lbz2 8672521SjlemonCFLAGS+= -static -g 8772521SjlemonCFLAGS+= -I${LA_SRCDIR} 8838485Sbde 8912675Sjulian# Uncomment to link against dmalloc 9085373SjlemonLDADD+= -L/usr/local/lib -ldmalloc 9185373SjlemonCFLAGS+= -I/usr/local/include -DUSE_DMALLOC 9285373SjlemonWARNS=6 9385373Sjlemon 9485373Sjlemon# Build libarchive_test and run it. 9585373Sjlemoncheck test: libarchive_test 9685373Sjlemon ./libarchive_test -v -r ${.CURDIR} 9785373Sjlemon 9885373Sjlemon# list.h is just a list of all tests, as indicated by DEFINE_TEST macro lines 9985373Sjlemon${.OBJDIR}/list.h: ${TESTS} Makefile 10085373Sjlemon (cd ${.CURDIR}; cat ${TESTS}) | grep DEFINE_TEST > list.h 10185373Sjlemon 10285373SjlemonCLEANFILES += *.out *.o *.core *~ list.h 10385373Sjlemon 10485373Sjlemoncleantest: 10585373Sjlemon -chmod -R +w /tmp/libarchive_test.* 10685373Sjlemon rm -rf /tmp/libarchive_test.* 10749049Syokota 10841612Seivind.include <bsd.prog.mk> 10949049Syokota