Date: Thu, 5 Jan 2012 12:57:15 +0000 (UTC) From: Martin Matuska <mm@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r229596 - in stable/8: lib/libarchive lib/libarchive/libarchive_fe lib/libarchive/test usr.bin/cpio usr.bin/cpio/test usr.bin/tar usr.bin/tar/test Message-ID: <201201051257.q05CvFwU036504@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mm Date: Thu Jan 5 12:57:14 2012 New Revision: 229596 URL: http://svn.freebsd.org/changeset/base/229596 Log: MFC r228797: Use contrib sources for building libarchive, tar and cpio. Make "make test" fully operational. Deleted: stable/8/lib/libarchive/COPYING stable/8/lib/libarchive/README stable/8/lib/libarchive/archive.h stable/8/lib/libarchive/archive_check_magic.c stable/8/lib/libarchive/archive_crc32.h stable/8/lib/libarchive/archive_endian.h stable/8/lib/libarchive/archive_entry.3 stable/8/lib/libarchive/archive_entry.c stable/8/lib/libarchive/archive_entry.h stable/8/lib/libarchive/archive_entry_copy_stat.c stable/8/lib/libarchive/archive_entry_link_resolver.c stable/8/lib/libarchive/archive_entry_private.h stable/8/lib/libarchive/archive_entry_stat.c stable/8/lib/libarchive/archive_entry_strmode.c stable/8/lib/libarchive/archive_entry_xattr.c stable/8/lib/libarchive/archive_hash.h stable/8/lib/libarchive/archive_platform.h stable/8/lib/libarchive/archive_private.h stable/8/lib/libarchive/archive_read.3 stable/8/lib/libarchive/archive_read.c stable/8/lib/libarchive/archive_read_data_into_fd.c stable/8/lib/libarchive/archive_read_disk.3 stable/8/lib/libarchive/archive_read_disk.c stable/8/lib/libarchive/archive_read_disk_entry_from_file.c stable/8/lib/libarchive/archive_read_disk_private.h stable/8/lib/libarchive/archive_read_disk_set_standard_lookup.c stable/8/lib/libarchive/archive_read_extract.c stable/8/lib/libarchive/archive_read_open_fd.c stable/8/lib/libarchive/archive_read_open_file.c stable/8/lib/libarchive/archive_read_open_filename.c stable/8/lib/libarchive/archive_read_open_memory.c stable/8/lib/libarchive/archive_read_private.h stable/8/lib/libarchive/archive_read_support_compression_all.c stable/8/lib/libarchive/archive_read_support_compression_bzip2.c stable/8/lib/libarchive/archive_read_support_compression_compress.c stable/8/lib/libarchive/archive_read_support_compression_gzip.c stable/8/lib/libarchive/archive_read_support_compression_none.c stable/8/lib/libarchive/archive_read_support_compression_program.c stable/8/lib/libarchive/archive_read_support_compression_rpm.c stable/8/lib/libarchive/archive_read_support_compression_uu.c stable/8/lib/libarchive/archive_read_support_compression_xz.c stable/8/lib/libarchive/archive_read_support_format_all.c stable/8/lib/libarchive/archive_read_support_format_ar.c stable/8/lib/libarchive/archive_read_support_format_cpio.c stable/8/lib/libarchive/archive_read_support_format_empty.c stable/8/lib/libarchive/archive_read_support_format_iso9660.c stable/8/lib/libarchive/archive_read_support_format_mtree.c stable/8/lib/libarchive/archive_read_support_format_raw.c stable/8/lib/libarchive/archive_read_support_format_tar.c stable/8/lib/libarchive/archive_read_support_format_xar.c stable/8/lib/libarchive/archive_read_support_format_zip.c stable/8/lib/libarchive/archive_string.c stable/8/lib/libarchive/archive_string.h stable/8/lib/libarchive/archive_string_sprintf.c stable/8/lib/libarchive/archive_util.3 stable/8/lib/libarchive/archive_util.c stable/8/lib/libarchive/archive_virtual.c stable/8/lib/libarchive/archive_write.3 stable/8/lib/libarchive/archive_write.c stable/8/lib/libarchive/archive_write_disk.3 stable/8/lib/libarchive/archive_write_disk.c stable/8/lib/libarchive/archive_write_disk_private.h stable/8/lib/libarchive/archive_write_disk_set_standard_lookup.c stable/8/lib/libarchive/archive_write_open_fd.c stable/8/lib/libarchive/archive_write_open_file.c stable/8/lib/libarchive/archive_write_open_filename.c stable/8/lib/libarchive/archive_write_open_memory.c stable/8/lib/libarchive/archive_write_private.h stable/8/lib/libarchive/archive_write_set_compression_bzip2.c stable/8/lib/libarchive/archive_write_set_compression_compress.c stable/8/lib/libarchive/archive_write_set_compression_gzip.c stable/8/lib/libarchive/archive_write_set_compression_none.c stable/8/lib/libarchive/archive_write_set_compression_program.c stable/8/lib/libarchive/archive_write_set_compression_xz.c stable/8/lib/libarchive/archive_write_set_format.c stable/8/lib/libarchive/archive_write_set_format_ar.c stable/8/lib/libarchive/archive_write_set_format_by_name.c stable/8/lib/libarchive/archive_write_set_format_cpio.c stable/8/lib/libarchive/archive_write_set_format_cpio_newc.c stable/8/lib/libarchive/archive_write_set_format_mtree.c stable/8/lib/libarchive/archive_write_set_format_pax.c stable/8/lib/libarchive/archive_write_set_format_shar.c stable/8/lib/libarchive/archive_write_set_format_ustar.c stable/8/lib/libarchive/archive_write_set_format_zip.c stable/8/lib/libarchive/cpio.5 stable/8/lib/libarchive/filter_fork.c stable/8/lib/libarchive/filter_fork.h stable/8/lib/libarchive/libarchive-formats.5 stable/8/lib/libarchive/libarchive.3 stable/8/lib/libarchive/libarchive_fe/ stable/8/lib/libarchive/libarchive_internals.3 stable/8/lib/libarchive/tar.5 stable/8/lib/libarchive/test/.cvsignore stable/8/lib/libarchive/test/README stable/8/lib/libarchive/test/main.c stable/8/lib/libarchive/test/read_open_memory.c stable/8/lib/libarchive/test/test.h stable/8/lib/libarchive/test/test_acl_basic.c stable/8/lib/libarchive/test/test_acl_freebsd.c stable/8/lib/libarchive/test/test_acl_pax.c stable/8/lib/libarchive/test/test_archive_api_feature.c stable/8/lib/libarchive/test/test_bad_fd.c stable/8/lib/libarchive/test/test_compat_bzip2.c stable/8/lib/libarchive/test/test_compat_bzip2_1.tbz.uu stable/8/lib/libarchive/test/test_compat_bzip2_2.tbz.uu stable/8/lib/libarchive/test/test_compat_cpio.c stable/8/lib/libarchive/test/test_compat_cpio_1.cpio.uu stable/8/lib/libarchive/test/test_compat_gtar.c stable/8/lib/libarchive/test/test_compat_gtar_1.tar.uu stable/8/lib/libarchive/test/test_compat_gzip.c stable/8/lib/libarchive/test/test_compat_gzip_1.tgz.uu stable/8/lib/libarchive/test/test_compat_gzip_2.tgz.uu stable/8/lib/libarchive/test/test_compat_lzma.c stable/8/lib/libarchive/test/test_compat_lzma_1.tlz.uu stable/8/lib/libarchive/test/test_compat_lzma_2.tlz.uu stable/8/lib/libarchive/test/test_compat_lzma_3.tlz.uu stable/8/lib/libarchive/test/test_compat_solaris_tar_acl.c stable/8/lib/libarchive/test/test_compat_solaris_tar_acl.tar.uu stable/8/lib/libarchive/test/test_compat_tar_hardlink.c stable/8/lib/libarchive/test/test_compat_tar_hardlink_1.tar.uu stable/8/lib/libarchive/test/test_compat_xz.c stable/8/lib/libarchive/test/test_compat_xz_1.txz.uu stable/8/lib/libarchive/test/test_compat_zip.c stable/8/lib/libarchive/test/test_compat_zip_1.zip.uu stable/8/lib/libarchive/test/test_compat_zip_2.zip.uu stable/8/lib/libarchive/test/test_empty_write.c stable/8/lib/libarchive/test/test_entry.c stable/8/lib/libarchive/test/test_entry_strmode.c stable/8/lib/libarchive/test/test_extattr_freebsd.c stable/8/lib/libarchive/test/test_fuzz.c stable/8/lib/libarchive/test/test_fuzz_1.iso.Z.uu stable/8/lib/libarchive/test/test_link_resolver.c stable/8/lib/libarchive/test/test_open_failure.c stable/8/lib/libarchive/test/test_open_fd.c stable/8/lib/libarchive/test/test_open_file.c stable/8/lib/libarchive/test/test_open_filename.c stable/8/lib/libarchive/test/test_pax_filename_encoding.c stable/8/lib/libarchive/test/test_pax_filename_encoding.tar.uu stable/8/lib/libarchive/test/test_read_compress_program.c stable/8/lib/libarchive/test/test_read_data_large.c stable/8/lib/libarchive/test/test_read_disk.c stable/8/lib/libarchive/test/test_read_disk_entry_from_file.c stable/8/lib/libarchive/test/test_read_extract.c stable/8/lib/libarchive/test/test_read_file_nonexistent.c stable/8/lib/libarchive/test/test_read_format_ar.ar.uu stable/8/lib/libarchive/test/test_read_format_ar.c stable/8/lib/libarchive/test/test_read_format_cpio_bin.c stable/8/lib/libarchive/test/test_read_format_cpio_bin_Z.c stable/8/lib/libarchive/test/test_read_format_cpio_bin_be.c stable/8/lib/libarchive/test/test_read_format_cpio_bin_be.cpio.uu stable/8/lib/libarchive/test/test_read_format_cpio_bin_bz2.c stable/8/lib/libarchive/test/test_read_format_cpio_bin_gz.c stable/8/lib/libarchive/test/test_read_format_cpio_bin_lzma.c stable/8/lib/libarchive/test/test_read_format_cpio_bin_xz.c stable/8/lib/libarchive/test/test_read_format_cpio_odc.c stable/8/lib/libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.c stable/8/lib/libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.rpm.uu stable/8/lib/libarchive/test/test_read_format_cpio_svr4_gzip.c stable/8/lib/libarchive/test/test_read_format_cpio_svr4_gzip_rpm.c stable/8/lib/libarchive/test/test_read_format_cpio_svr4_gzip_rpm.rpm.uu stable/8/lib/libarchive/test/test_read_format_cpio_svr4c_Z.c stable/8/lib/libarchive/test/test_read_format_empty.c stable/8/lib/libarchive/test/test_read_format_gtar_gz.c stable/8/lib/libarchive/test/test_read_format_gtar_lzma.c stable/8/lib/libarchive/test/test_read_format_gtar_sparse.c stable/8/lib/libarchive/test/test_read_format_gtar_sparse_1_13.tar.uu stable/8/lib/libarchive/test/test_read_format_gtar_sparse_1_17.tar.uu stable/8/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix00.tar.uu stable/8/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix01.tar.uu stable/8/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix10.tar.uu stable/8/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix10_modified.tar.uu stable/8/lib/libarchive/test/test_read_format_iso.iso.Z.uu stable/8/lib/libarchive/test/test_read_format_iso_2.iso.Z.uu stable/8/lib/libarchive/test/test_read_format_iso_Z.c stable/8/lib/libarchive/test/test_read_format_iso_joliet.iso.Z.uu stable/8/lib/libarchive/test/test_read_format_iso_joliet_long.iso.Z.uu stable/8/lib/libarchive/test/test_read_format_iso_joliet_rockridge.iso.Z.uu stable/8/lib/libarchive/test/test_read_format_iso_multi_extent.c stable/8/lib/libarchive/test/test_read_format_iso_multi_extent.iso.Z.uu stable/8/lib/libarchive/test/test_read_format_iso_rockridge.iso.Z.uu stable/8/lib/libarchive/test/test_read_format_iso_rockridge_ce.iso.Z.uu stable/8/lib/libarchive/test/test_read_format_iso_rockridge_new.iso.Z.uu stable/8/lib/libarchive/test/test_read_format_iso_rockridge_rr_moved.iso.Z.uu stable/8/lib/libarchive/test/test_read_format_iso_zisofs.iso.Z.uu stable/8/lib/libarchive/test/test_read_format_isojoliet_bz2.c stable/8/lib/libarchive/test/test_read_format_isojoliet_long.c stable/8/lib/libarchive/test/test_read_format_isojoliet_rr.c stable/8/lib/libarchive/test/test_read_format_isorr_bz2.c stable/8/lib/libarchive/test/test_read_format_isorr_ce.c stable/8/lib/libarchive/test/test_read_format_isorr_new_bz2.c stable/8/lib/libarchive/test/test_read_format_isorr_rr_moved.c stable/8/lib/libarchive/test/test_read_format_isozisofs_bz2.c stable/8/lib/libarchive/test/test_read_format_mtree.c stable/8/lib/libarchive/test/test_read_format_mtree.mtree.uu stable/8/lib/libarchive/test/test_read_format_pax_bz2.c stable/8/lib/libarchive/test/test_read_format_raw.c stable/8/lib/libarchive/test/test_read_format_raw.data.Z.uu stable/8/lib/libarchive/test/test_read_format_raw.data.uu stable/8/lib/libarchive/test/test_read_format_tar.c stable/8/lib/libarchive/test/test_read_format_tar_empty_filename.c stable/8/lib/libarchive/test/test_read_format_tar_empty_filename.tar.uu stable/8/lib/libarchive/test/test_read_format_tbz.c stable/8/lib/libarchive/test/test_read_format_tgz.c stable/8/lib/libarchive/test/test_read_format_tlz.c stable/8/lib/libarchive/test/test_read_format_txz.c stable/8/lib/libarchive/test/test_read_format_tz.c stable/8/lib/libarchive/test/test_read_format_xar.c stable/8/lib/libarchive/test/test_read_format_zip.c stable/8/lib/libarchive/test/test_read_format_zip.zip.uu stable/8/lib/libarchive/test/test_read_large.c stable/8/lib/libarchive/test/test_read_pax_truncated.c stable/8/lib/libarchive/test/test_read_position.c stable/8/lib/libarchive/test/test_read_truncated.c stable/8/lib/libarchive/test/test_read_uu.c stable/8/lib/libarchive/test/test_tar_filenames.c stable/8/lib/libarchive/test/test_tar_large.c stable/8/lib/libarchive/test/test_ustar_filenames.c stable/8/lib/libarchive/test/test_write_compress.c stable/8/lib/libarchive/test/test_write_compress_bzip2.c stable/8/lib/libarchive/test/test_write_compress_gzip.c stable/8/lib/libarchive/test/test_write_compress_lzma.c stable/8/lib/libarchive/test/test_write_compress_program.c stable/8/lib/libarchive/test/test_write_compress_xz.c stable/8/lib/libarchive/test/test_write_disk.c stable/8/lib/libarchive/test/test_write_disk_failures.c stable/8/lib/libarchive/test/test_write_disk_hardlink.c stable/8/lib/libarchive/test/test_write_disk_perms.c stable/8/lib/libarchive/test/test_write_disk_secure.c stable/8/lib/libarchive/test/test_write_disk_sparse.c stable/8/lib/libarchive/test/test_write_disk_symlink.c stable/8/lib/libarchive/test/test_write_disk_times.c stable/8/lib/libarchive/test/test_write_format_ar.c stable/8/lib/libarchive/test/test_write_format_cpio.c stable/8/lib/libarchive/test/test_write_format_cpio_empty.c stable/8/lib/libarchive/test/test_write_format_cpio_newc.c stable/8/lib/libarchive/test/test_write_format_cpio_odc.c stable/8/lib/libarchive/test/test_write_format_mtree.c stable/8/lib/libarchive/test/test_write_format_pax.c stable/8/lib/libarchive/test/test_write_format_shar_empty.c stable/8/lib/libarchive/test/test_write_format_tar.c stable/8/lib/libarchive/test/test_write_format_tar_empty.c stable/8/lib/libarchive/test/test_write_format_tar_ustar.c stable/8/lib/libarchive/test/test_write_format_zip.c stable/8/lib/libarchive/test/test_write_format_zip_empty.c stable/8/lib/libarchive/test/test_write_format_zip_no_compression.c stable/8/lib/libarchive/test/test_write_open_memory.c stable/8/usr.bin/cpio/bsdcpio.1 stable/8/usr.bin/cpio/cmdline.c stable/8/usr.bin/cpio/cpio.c stable/8/usr.bin/cpio/cpio.h stable/8/usr.bin/cpio/cpio_platform.h stable/8/usr.bin/cpio/test/main.c stable/8/usr.bin/cpio/test/test.h stable/8/usr.bin/cpio/test/test_0.c stable/8/usr.bin/cpio/test/test_basic.c stable/8/usr.bin/cpio/test/test_cmdline.c stable/8/usr.bin/cpio/test/test_format_newc.c stable/8/usr.bin/cpio/test/test_gcpio_compat.c stable/8/usr.bin/cpio/test/test_gcpio_compat_ref.bin.uu stable/8/usr.bin/cpio/test/test_gcpio_compat_ref.crc.uu stable/8/usr.bin/cpio/test/test_gcpio_compat_ref.newc.uu stable/8/usr.bin/cpio/test/test_gcpio_compat_ref.ustar.uu stable/8/usr.bin/cpio/test/test_gcpio_compat_ref_nosym.bin.uu stable/8/usr.bin/cpio/test/test_gcpio_compat_ref_nosym.crc.uu stable/8/usr.bin/cpio/test/test_gcpio_compat_ref_nosym.newc.uu stable/8/usr.bin/cpio/test/test_gcpio_compat_ref_nosym.ustar.uu stable/8/usr.bin/cpio/test/test_option_B_upper.c stable/8/usr.bin/cpio/test/test_option_C_upper.c stable/8/usr.bin/cpio/test/test_option_J_upper.c stable/8/usr.bin/cpio/test/test_option_L_upper.c stable/8/usr.bin/cpio/test/test_option_Z_upper.c stable/8/usr.bin/cpio/test/test_option_a.c stable/8/usr.bin/cpio/test/test_option_c.c stable/8/usr.bin/cpio/test/test_option_d.c stable/8/usr.bin/cpio/test/test_option_f.c stable/8/usr.bin/cpio/test/test_option_f.cpio.uu stable/8/usr.bin/cpio/test/test_option_help.c stable/8/usr.bin/cpio/test/test_option_l.c stable/8/usr.bin/cpio/test/test_option_lzma.c stable/8/usr.bin/cpio/test/test_option_m.c stable/8/usr.bin/cpio/test/test_option_m.cpio.uu stable/8/usr.bin/cpio/test/test_option_t.c stable/8/usr.bin/cpio/test/test_option_t.cpio.uu stable/8/usr.bin/cpio/test/test_option_t.stdout.uu stable/8/usr.bin/cpio/test/test_option_tv.stdout.uu stable/8/usr.bin/cpio/test/test_option_u.c stable/8/usr.bin/cpio/test/test_option_version.c stable/8/usr.bin/cpio/test/test_option_y.c stable/8/usr.bin/cpio/test/test_option_z.c stable/8/usr.bin/cpio/test/test_owner_parse.c stable/8/usr.bin/cpio/test/test_passthrough_dotdot.c stable/8/usr.bin/cpio/test/test_passthrough_reverse.c stable/8/usr.bin/cpio/test/test_pathmatch.c stable/8/usr.bin/tar/COPYING stable/8/usr.bin/tar/bsdtar.1 stable/8/usr.bin/tar/bsdtar.c stable/8/usr.bin/tar/bsdtar.h stable/8/usr.bin/tar/bsdtar_platform.h stable/8/usr.bin/tar/cmdline.c stable/8/usr.bin/tar/getdate.c stable/8/usr.bin/tar/read.c stable/8/usr.bin/tar/subst.c stable/8/usr.bin/tar/test/main.c stable/8/usr.bin/tar/test/test.h stable/8/usr.bin/tar/test/test_0.c stable/8/usr.bin/tar/test/test_basic.c stable/8/usr.bin/tar/test/test_copy.c stable/8/usr.bin/tar/test/test_empty_mtree.c stable/8/usr.bin/tar/test/test_getdate.c stable/8/usr.bin/tar/test/test_help.c stable/8/usr.bin/tar/test/test_option_T_upper.c stable/8/usr.bin/tar/test/test_option_q.c stable/8/usr.bin/tar/test/test_option_r.c stable/8/usr.bin/tar/test/test_option_s.c stable/8/usr.bin/tar/test/test_patterns.c stable/8/usr.bin/tar/test/test_patterns_2.tar.uu stable/8/usr.bin/tar/test/test_patterns_3.tar.uu stable/8/usr.bin/tar/test/test_patterns_4.tar.uu stable/8/usr.bin/tar/test/test_stdio.c stable/8/usr.bin/tar/test/test_strip_components.c stable/8/usr.bin/tar/test/test_symlink_dir.c stable/8/usr.bin/tar/test/test_version.c stable/8/usr.bin/tar/tree.c stable/8/usr.bin/tar/tree.h stable/8/usr.bin/tar/util.c stable/8/usr.bin/tar/write.c Modified: stable/8/lib/libarchive/Makefile stable/8/lib/libarchive/test/Makefile stable/8/usr.bin/cpio/Makefile stable/8/usr.bin/cpio/test/Makefile stable/8/usr.bin/tar/Makefile stable/8/usr.bin/tar/test/Makefile Directory Properties: stable/8/lib/libarchive/ (props changed) stable/8/usr.bin/cpio/ (props changed) stable/8/usr.bin/tar/ (props changed) Modified: stable/8/lib/libarchive/Makefile ============================================================================== --- stable/8/lib/libarchive/Makefile Thu Jan 5 12:52:05 2012 (r229595) +++ stable/8/lib/libarchive/Makefile Thu Jan 5 12:57:14 2012 (r229596) @@ -1,6 +1,8 @@ # $FreeBSD$ .include <bsd.own.mk> +LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive + LIB= archive DPADD= ${LIBZ} LDADD= -lz @@ -20,7 +22,7 @@ LDADD+= -lbsdxml # It has no real relation to the libarchive version number. SHLIB_MAJOR= 5 -CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\" +CFLAGS+= -DPLATFORM_CONFIG_H=\"${.CURDIR}/config_freebsd.h\" CFLAGS+= -I${.OBJDIR} .if ${MK_OPENSSL} != "no" @@ -32,7 +34,7 @@ DPADD+= ${LIBMD} LDADD+= -lmd .endif -WARNS?= 6 +.PATH: ${LIBARCHIVEDIR}/libarchive # Headers to be installed in /usr/include INCS= archive.h archive_entry.h @@ -275,8 +277,11 @@ MLINKS+= archive_write_disk.3 archive_wr MLINKS+= archive_write_disk.3 archive_write_disk_set_user_lookup.3 MLINKS+= libarchive.3 archive.3 -.PHONY: check test +.PHONY: check test clean-test check test: - cd ${.CURDIR}/test && make test + cd ${.CURDIR}/test && make obj && make test + +clean-test: + cd ${.CURDIR}/test && make clean .include <bsd.lib.mk> Modified: stable/8/lib/libarchive/test/Makefile ============================================================================== --- stable/8/lib/libarchive/test/Makefile Thu Jan 5 12:52:05 2012 (r229595) +++ stable/8/lib/libarchive/test/Makefile Thu Jan 5 12:57:14 2012 (r229596) @@ -1,8 +1,23 @@ # $FreeBSD$ -# Where to find the libarchive sources -LA_SRCDIR=${.CURDIR}/.. +LIBARCHIVEDIR= ${.CURDIR}/../../../contrib/libarchive +NO_MAN=yes + +PROG=libarchive_test +INTERNALPROG=yes # Don't install this; it's just for testing +DPADD=${LIBBZ2} ${LIBZ} ${LIBMD} ${LIBCRYPTO} ${LIBBSDXML} +LDADD= -L ${.OBJDIR}/.. -larchive +LDADD+= -lz -lbz2 -llzma -lmd -lcrypto -lbsdxml +CFLAGS+= -g +CFLAGS+= -I${.CURDIR}/.. -I${LIBARCHIVEDIR} -I${.OBJDIR} +CFLAGS+= -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1 + +# Uncomment to link against dmalloc +#LDADD+= -L/usr/local/lib -ldmalloc +#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC + +.PATH: ${LIBARCHIVEDIR}/libarchive/test TESTS= \ test_acl_basic.c \ test_acl_freebsd.c \ @@ -120,28 +135,14 @@ SRCS= \ main.c \ read_open_memory.c -NO_MAN=yes - -PROG=libarchive_test -INTERNALPROG=yes # Don't install this; it's just for testing -DPADD=${LIBBZ2} ${LIBZ} ${LIBMD} ${LIBCRYPTO} ${LIBBSDXML} -LDADD= -L ${.OBJDIR}/.. -larchive -LDADD+= -lz -lbz2 -llzma -lmd -lcrypto -lbsdxml -CFLAGS+= -g -CFLAGS+= -I${LA_SRCDIR} -I. -CFLAGS+= -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1 - -# Uncomment to link against dmalloc -#LDADD+= -L/usr/local/lib -ldmalloc -#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC - # Build libarchive_test and run it. check test: libarchive_test - ./libarchive_test -r ${.CURDIR} + ./libarchive_test -r ${LIBARCHIVEDIR}/libarchive/test # list.h is just a list of all tests, as indicated by DEFINE_TEST macro lines list.h: ${TESTS} Makefile - (cd ${.CURDIR}; cat test_*.c) | grep DEFINE_TEST > list.h + (cd ${LIBARCHIVEDIR}/libarchive/test; cat test_*.c) | \ + grep DEFINE_TEST > ${.OBJDIR}/list.h CLEANFILES += *.out *.o *.core *~ list.h .dirstamp .depend CLEANDIRS += .deps .libs Modified: stable/8/usr.bin/cpio/Makefile ============================================================================== --- stable/8/usr.bin/cpio/Makefile Thu Jan 5 12:52:05 2012 (r229595) +++ stable/8/usr.bin/cpio/Makefile Thu Jan 5 12:57:14 2012 (r229596) @@ -2,19 +2,22 @@ .include <bsd.own.mk> +LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive + PROG= bsdcpio BSDCPIO_VERSION_STRING=2.8.5 +.PATH: ${LIBARCHIVEDIR}/cpio SRCS= cpio.c cmdline.c -.PATH: ${.CURDIR}/../../lib/libarchive/libarchive_fe +.PATH: ${LIBARCHIVEDIR}/libarchive_fe SRCS+= err.c line_reader.c matching.c pathmatch.c WARNS?= 6 DPADD= ${LIBARCHIVE} ${LIBZ} ${LIBBZ2} CFLAGS+= -DBSDCPIO_VERSION_STRING=\"${BSDCPIO_VERSION_STRING}\" -CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\" -CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../../lib/libarchive/libarchive_fe +CFLAGS+= -DPLATFORM_CONFIG_H=\"${.CURDIR}/config_freebsd.h\" +CFLAGS+= -I${LIBARCHIVEDIR}/cpio -I${LIBARCHIVEDIR}/libarchive_fe .ifdef RELEASE_CRUNCH # FreeBSD's installer uses cpio in crunched binaries that are @@ -34,9 +37,12 @@ LDADD+= -lmd SYMLINKS=bsdcpio ${BINDIR}/cpio MLINKS= bsdcpio.1 cpio.1 -.PHONY: check test +.PHONY: check test clean-test check test: $(PROG) bsdcpio.1.gz - cd ${.CURDIR}/test && make clean test + cd ${.CURDIR}/test && make obj && make test + +clean-test: + cd ${.CURDIR}/test && make clean .include <bsd.prog.mk> Modified: stable/8/usr.bin/cpio/test/Makefile ============================================================================== --- stable/8/usr.bin/cpio/test/Makefile Thu Jan 5 12:52:05 2012 (r229595) +++ stable/8/usr.bin/cpio/test/Makefile Thu Jan 5 12:57:14 2012 (r229596) @@ -1,14 +1,14 @@ # $FreeBSD$ -# Where to find the cpio sources (for the internal unit tests) -CPIO_SRCDIR=${.CURDIR}/.. +LIBARCHIVEDIR= ${.CURDIR}/../../../contrib/libarchive -.PATH: ${CPIO_SRCDIR} +.PATH: ${LIBARCHIVEDIR}/cpio CPIO_SRCS= cmdline.c -.PATH: ${.CURDIR}/../../../lib/libarchive/libarchive_fe +.PATH: ${LIBARCHIVEDIR}/libarchive_fe CPIO_SRCS+= err.c pathmatch.c +.PATH: ${LIBARCHIVEDIR}/cpio/test TESTS= \ test_0.c \ test_basic.c \ @@ -49,14 +49,13 @@ NO_MAN=yes PROG=bsdcpio_test DPADD=${LIBARCHIVE} ${LIBBZ2} ${LIBZ} -CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\" -CFLAGS+= -I.. +CFLAGS+= -DPLATFORM_CONFIG_H=\"${.CURDIR}/../config_freebsd.h\" +CFLAGS+= -I${.CURDIR}/.. LDADD= -larchive -lz -lbz2 #CFLAGS+= -static -g -O2 -Wall CFLAGS+= -g -O2 -Wall CFLAGS+= -I${.OBJDIR} -CFLAGS+= -I${CPIO_SRCDIR} -CFLAGS+= -I${.CURDIR}/../../../lib/libarchive/libarchive_fe +CFLAGS+= -I${LIBARCHIVEDIR}/cpio -I${LIBARCHIVEDIR}/libarchive_fe # Uncomment to link against dmalloc #LDADD+= -L/usr/local/lib -ldmalloc @@ -64,15 +63,17 @@ CFLAGS+= -I${.CURDIR}/../../../lib/libar WARNS=6 check test: bsdcpio_test - ${.OBJDIR}/bsdcpio_test -p ${.OBJDIR}/../bsdcpio -r ${.CURDIR} + ${.OBJDIR}/bsdcpio_test -p ${.OBJDIR}/../bsdcpio \ + -r ${LIBARCHIVEDIR}/cpio/test ${.OBJDIR}/list.h list.h: ${TESTS} Makefile - (cd ${.CURDIR}; cat ${TESTS}) | grep DEFINE_TEST > list.h + (cd ${LIBARCHIVEDIR}/cpio/test; cat ${TESTS}) | \ + grep DEFINE_TEST > ${.OBJDIR}/list.h clean: rm -f ${CLEANFILES} rm -f *~ -chmod -R +w /tmp/bsdcpio_test.* - rm -rf /tmp/bsdcpio_test.* + rm -rf /tmp/bsdcpio_test .include <bsd.prog.mk> Modified: stable/8/usr.bin/tar/Makefile ============================================================================== --- stable/8/usr.bin/tar/Makefile Thu Jan 5 12:52:05 2012 (r229595) +++ stable/8/usr.bin/tar/Makefile Thu Jan 5 12:57:14 2012 (r229596) @@ -1,8 +1,12 @@ # $FreeBSD$ .include <bsd.own.mk> +LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive + PROG= bsdtar BSDTAR_VERSION_STRING=2.8.5 + +.PATH: ${LIBARCHIVEDIR}/tar SRCS= bsdtar.c \ cmdline.c \ getdate.c \ @@ -12,7 +16,7 @@ SRCS= bsdtar.c \ util.c \ write.c -.PATH: ${.CURDIR}/../../lib/libarchive/libarchive_fe +.PATH: ${LIBARCHIVEDIR}/libarchive_fe SRCS+= err.c \ line_reader.c \ matching.c \ @@ -30,15 +34,18 @@ LDADD+= -lmd .endif CFLAGS+= -DBSDTAR_VERSION_STRING=\"${BSDTAR_VERSION_STRING}\" -CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\" -CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../../lib/libarchive -CFLAGS+= -I${.CURDIR}/../../lib/libarchive/libarchive_fe +CFLAGS+= -DPLATFORM_CONFIG_H=\"${.CURDIR}/config_freebsd.h\" +CFLAGS+= -I${LIBARCHIVEDIR}/tar -I${LIBARCHIVEDIR}/libarchive +CFLAGS+= -I${LIBARCHIVEDIR}/libarchive_fe SYMLINKS= bsdtar ${BINDIR}/tar MLINKS= bsdtar.1 tar.1 DEBUG_FLAGS=-g -.PHONY: check test +.PHONY: check test clean-test check test: $(PROG) bsdtar.1.gz - cd ${.CURDIR}/test && make test + cd ${.CURDIR}/test && make obj && make test + +clean-test: + cd ${.CURDIR}/test && make clean .include <bsd.prog.mk> Modified: stable/8/usr.bin/tar/test/Makefile ============================================================================== --- stable/8/usr.bin/tar/test/Makefile Thu Jan 5 12:52:05 2012 (r229595) +++ stable/8/usr.bin/tar/test/Makefile Thu Jan 5 12:57:14 2012 (r229596) @@ -1,13 +1,13 @@ # $FreeBSD$ -# Where to find the tar sources (for the internal unit tests) -TAR_SRCDIR=${.CURDIR}/.. -.PATH: ${TAR_SRCDIR} +LIBARCHIVEDIR= ${.CURDIR}/../../../contrib/libarchive +.PATH: ${LIBARCHIVEDIR}/tar # Some tar sources are pulled in for white-box tests -TAR_SRCS= \ +TAR_SRCS= \ getdate.c +.PATH: ${LIBARCHIVEDIR}/tar/test TESTS= \ test_0.c \ test_basic.c \ @@ -26,7 +26,7 @@ TESTS= \ test_version.c # Build the test program -SRCS= ${TAR_SRCS} \ +SRCS= ${TAR_SRCS} \ ${TESTS} \ list.h \ main.c @@ -37,24 +37,25 @@ NO_MAN=yes PROG=bsdtar_test DPADD=${LIBARCHIVE} ${LIBBZ2} ${LIBZ} -CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\" -CFLAGS+= -I.. +CFLAGS+= -DPLATFORM_CONFIG_H=\"${.CURDIR}/../config_freebsd.h\" LDADD= -larchive -lz -lbz2 CFLAGS+= -static -g -O2 -Wall -CFLAGS+= -I${.OBJDIR} -CFLAGS+= -I${TAR_SRCDIR} +CFLAGS+= -I${.CURDIR}/.. -I${.OBJDIR} +CFLAGS+= -I${LIBARCHIVEDIR}/tar # Uncomment to link against dmalloc #LDADD+= -L/usr/local/lib -ldmalloc #CFLAGS+= -I/usr/local/include -DUSE_DMALLOC check test: bsdtar_test - ./bsdtar_test -p ${.OBJDIR}/../bsdtar -r ${.CURDIR} + ./bsdtar_test -p ${.OBJDIR}/../bsdtar -r ${LIBARCHIVEDIR}/tar/test list.h: ${TESTS} Makefile - (cd ${.CURDIR}; cat ${TESTS}) | grep DEFINE_TEST > list.h + (cd ${LIBARCHIVEDIR}/tar/test; cat ${TESTS}) | \ + grep DEFINE_TEST > ${.OBJDIR}/list.h clean: + rm -f ${CLEANFILES} rm -f *.out rm -f *.o rm -f *.core
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201051257.q05CvFwU036504>