1## Process this file with automake to produce Makefile.in 2 3AUTOMAKE_OPTIONS= foreign subdir-objects 4ACLOCAL_AMFLAGS = -I build/autoconf 5 6# 7# What to build and install 8# 9lib_LTLIBRARIES= libarchive.la 10noinst_LTLIBRARIES= libarchive_fe.la 11bin_PROGRAMS= $(bsdtar_programs) $(bsdcpio_programs) 12man_MANS= $(libarchive_man_MANS) $(bsdtar_man_MANS) $(bsdcpio_man_MANS) 13BUILT_SOURCES= libarchive/test/list.h tar/test/list.h cpio/test/list.h 14 15# 16# What to test: We always test libarchive, test bsdtar and bsdcpio only 17# if we built them. 18# 19check_PROGRAMS= libarchive_test $(bsdtar_test_programs) $(bsdcpio_test_programs) 20TESTS= libarchive_test $(bsdtar_test_programs) $(bsdcpio_test_programs) 21TESTS_ENVIRONMENT= $(libarchive_TESTS_ENVIRONMENT) $(bsdtar_TESTS_ENVIRONMENT) $(bsdcpio_TESTS_ENVIRONMENT) 22# Always build and test both bsdtar and bsdcpio as part of 'distcheck' 23DISTCHECK_CONFIGURE_FLAGS = --enable-bsdtar --enable-bsdcpio 24# Uncommenting this line can help diagnose some errors. This is ordinarily 25# enabled in the libarchive development branch but is disabled 26# for libarchive production releases. 27#AM_CFLAGS=-Wall -Werror 28PLATFORMCPPFLAGS = @PLATFORMCPPFLAGS@ 29AM_CPPFLAGS=$(PLATFORMCPPFLAGS) 30 31# 32# What to include in the distribution 33# 34EXTRA_DIST= \ 35 CMakeLists.txt \ 36 build/autogen.sh \ 37 build/bump-version.sh \ 38 build/clean.sh \ 39 build/cmake \ 40 build/version \ 41 build/windows \ 42 contrib \ 43 doc \ 44 examples \ 45 $(libarchive_EXTRA_DIST) \ 46 $(libarchive_test_EXTRA_DIST) \ 47 $(bsdtar_EXTRA_DIST) \ 48 $(bsdtar_test_EXTRA_DIST) \ 49 $(bsdcpio_EXTRA_DIST) \ 50 $(bsdcpio_test_EXTRA_DIST) 51 52# a) Clean out some unneeded files and directories 53# b) Collect all documentation and format it for distribution. 54dist-hook: 55 rm -rf `find $(distdir) -name CVS -type d` 56 rm -rf `find $(distdir) -name .svn -type d` 57 rm -f `find $(distdir) -name '*~'` 58 rm -f `find $(distdir) -name '*.out'` 59 rm -f `find $(distdir) -name '*.core'` 60 -rm -f $(distdir)/*/Makefile $(distdir)/*/*/Makefile 61 cd $(distdir)/doc && /bin/sh update.sh 62 63# Verify cmake builds as part of the acceptance 64distcheck-hook: 65 mkdir $(distdir)/_build/cmtest 66 cd $(distdir)/_build/cmtest && cmake ../.. && make && make test 67 rm -rf $(distdir)/_build/cmtest 68 69# 70# Extra rules for cleanup 71# 72DISTCLEANFILES= \ 73 libarchive/test/list.h \ 74 tar/test/list.h \ 75 cpio/test/list.h 76 77distclean-local: 78 -rm -rf .ref 79 -rm -rf autom4te.cache/ 80 -rm -f *~ 81 -[ -f libarchive/Makefile ] && cd libarchive && make clean 82 -[ -f libarchive/test/Makefile ] && cd libarchive/test && make clean 83 -[ -f tar/Makefile ] && cd tar && make clean 84 -[ -f tar/test/Makefile ] && cd tar/test && make clean 85 -[ -f cpio/Makefile ] && cd cpio && make clean 86 -[ -f cpio/test/Makefile ] && cd cpio/test && make clean 87 88# 89# Libarchive headers, source, etc. 90# 91# 92 93include_HEADERS= libarchive/archive.h libarchive/archive_entry.h 94 95libarchive_la_SOURCES= \ 96 libarchive/archive_check_magic.c \ 97 libarchive/archive_crc32.h \ 98 libarchive/archive_endian.h \ 99 libarchive/archive_entry.c \ 100 libarchive/archive_entry.h \ 101 libarchive/archive_entry_copy_stat.c \ 102 libarchive/archive_entry_link_resolver.c \ 103 libarchive/archive_entry_private.h \ 104 libarchive/archive_entry_stat.c \ 105 libarchive/archive_entry_strmode.c \ 106 libarchive/archive_entry_xattr.c \ 107 libarchive/archive_hash.h \ 108 libarchive/archive_platform.h \ 109 libarchive/archive_private.h \ 110 libarchive/archive_read.c \ 111 libarchive/archive_read_data_into_fd.c \ 112 libarchive/archive_read_disk.c \ 113 libarchive/archive_read_disk_entry_from_file.c \ 114 libarchive/archive_read_disk_private.h \ 115 libarchive/archive_read_disk_set_standard_lookup.c \ 116 libarchive/archive_read_extract.c \ 117 libarchive/archive_read_open_fd.c \ 118 libarchive/archive_read_open_file.c \ 119 libarchive/archive_read_open_filename.c \ 120 libarchive/archive_read_open_memory.c \ 121 libarchive/archive_read_private.h \ 122 libarchive/archive_read_support_compression_all.c \ 123 libarchive/archive_read_support_compression_bzip2.c \ 124 libarchive/archive_read_support_compression_compress.c \ 125 libarchive/archive_read_support_compression_gzip.c \ 126 libarchive/archive_read_support_compression_none.c \ 127 libarchive/archive_read_support_compression_program.c \ 128 libarchive/archive_read_support_compression_rpm.c \ 129 libarchive/archive_read_support_compression_uu.c \ 130 libarchive/archive_read_support_compression_xz.c \ 131 libarchive/archive_read_support_format_all.c \ 132 libarchive/archive_read_support_format_ar.c \ 133 libarchive/archive_read_support_format_cpio.c \ 134 libarchive/archive_read_support_format_empty.c \ 135 libarchive/archive_read_support_format_iso9660.c \ 136 libarchive/archive_read_support_format_mtree.c \ 137 libarchive/archive_read_support_format_raw.c \ 138 libarchive/archive_read_support_format_tar.c \ 139 libarchive/archive_read_support_format_xar.c \ 140 libarchive/archive_read_support_format_zip.c \ 141 libarchive/archive_string.c \ 142 libarchive/archive_string.h \ 143 libarchive/archive_string_sprintf.c \ 144 libarchive/archive_util.c \ 145 libarchive/archive_virtual.c \ 146 libarchive/archive_write.c \ 147 libarchive/archive_write_disk.c \ 148 libarchive/archive_write_disk_private.h \ 149 libarchive/archive_write_disk_set_standard_lookup.c \ 150 libarchive/archive_write_open_fd.c \ 151 libarchive/archive_write_open_file.c \ 152 libarchive/archive_write_open_filename.c \ 153 libarchive/archive_write_open_memory.c \ 154 libarchive/archive_write_private.h \ 155 libarchive/archive_write_set_compression_bzip2.c \ 156 libarchive/archive_write_set_compression_compress.c \ 157 libarchive/archive_write_set_compression_gzip.c \ 158 libarchive/archive_write_set_compression_none.c \ 159 libarchive/archive_write_set_compression_program.c \ 160 libarchive/archive_write_set_compression_xz.c \ 161 libarchive/archive_write_set_format.c \ 162 libarchive/archive_write_set_format_ar.c \ 163 libarchive/archive_write_set_format_by_name.c \ 164 libarchive/archive_write_set_format_cpio.c \ 165 libarchive/archive_write_set_format_cpio_newc.c \ 166 libarchive/archive_write_set_format_mtree.c \ 167 libarchive/archive_write_set_format_pax.c \ 168 libarchive/archive_write_set_format_shar.c \ 169 libarchive/archive_write_set_format_ustar.c \ 170 libarchive/archive_write_set_format_zip.c \ 171 libarchive/config_freebsd.h \ 172 libarchive/filter_fork.c \ 173 libarchive/filter_fork.h 174 175if INC_WINDOWS_FILES 176libarchive_la_SOURCES+= \ 177 libarchive/archive_entry_copy_bhfi.c \ 178 libarchive/archive_windows.h \ 179 libarchive/archive_windows.c \ 180 libarchive/filter_fork_windows.c 181endif 182 183# -no-undefined marks that libarchive doesn't rely on symbols 184# defined in the application. This is mandatory for cygwin. 185libarchive_la_LDFLAGS= -no-undefined -version-info $(ARCHIVE_LIBTOOL_VERSION) 186 187# Manpages to install 188libarchive_man_MANS= \ 189 libarchive/archive_entry.3 \ 190 libarchive/archive_read.3 \ 191 libarchive/archive_read_disk.3 \ 192 libarchive/archive_util.3 \ 193 libarchive/archive_write.3 \ 194 libarchive/archive_write_disk.3 \ 195 libarchive/cpio.5 \ 196 libarchive/libarchive.3 \ 197 libarchive/libarchive_internals.3 \ 198 libarchive/libarchive-formats.5 \ 199 libarchive/mtree.5 \ 200 libarchive/tar.5 201 202# Additional libarchive files to include in the distribution 203libarchive_EXTRA_DIST= \ 204 libarchive/test/list.h \ 205 libarchive/archive_windows.c \ 206 libarchive/archive_windows.h \ 207 libarchive/filter_fork_windows.c \ 208 libarchive/CMakeLists.txt \ 209 $(libarchive_man_MANS) 210 211# pkgconfig 212pkgconfigdir = $(libdir)/pkgconfig 213pkgconfig_DATA = build/pkgconfig/libarchive.pc 214 215# 216# 217# libarchive_test program 218# 219# 220libarchive_test_SOURCES= \ 221 $(libarchive_la_SOURCES) \ 222 libarchive/test/main.c \ 223 libarchive/test/read_open_memory.c \ 224 libarchive/test/test.h \ 225 libarchive/test/test_acl_basic.c \ 226 libarchive/test/test_acl_freebsd.c \ 227 libarchive/test/test_acl_pax.c \ 228 libarchive/test/test_archive_api_feature.c \ 229 libarchive/test/test_bad_fd.c \ 230 libarchive/test/test_compat_bzip2.c \ 231 libarchive/test/test_compat_cpio.c \ 232 libarchive/test/test_compat_gtar.c \ 233 libarchive/test/test_compat_gzip.c \ 234 libarchive/test/test_compat_lzma.c \ 235 libarchive/test/test_compat_solaris_tar_acl.c \ 236 libarchive/test/test_compat_tar_hardlink.c \ 237 libarchive/test/test_compat_xz.c \ 238 libarchive/test/test_compat_zip.c \ 239 libarchive/test/test_empty_write.c \ 240 libarchive/test/test_entry.c \ 241 libarchive/test/test_extattr_freebsd.c \ 242 libarchive/test/test_fuzz.c \ 243 libarchive/test/test_entry_strmode.c \ 244 libarchive/test/test_link_resolver.c \ 245 libarchive/test/test_open_fd.c \ 246 libarchive/test/test_open_file.c \ 247 libarchive/test/test_open_filename.c \ 248 libarchive/test/test_pax_filename_encoding.c \ 249 libarchive/test/test_read_compress_program.c \ 250 libarchive/test/test_read_data_large.c \ 251 libarchive/test/test_read_disk.c \ 252 libarchive/test/test_read_disk_entry_from_file.c \ 253 libarchive/test/test_read_extract.c \ 254 libarchive/test/test_read_file_nonexistent.c \ 255 libarchive/test/test_read_format_ar.c \ 256 libarchive/test/test_read_format_cpio_bin.c \ 257 libarchive/test/test_read_format_cpio_bin_Z.c \ 258 libarchive/test/test_read_format_cpio_bin_be.c \ 259 libarchive/test/test_read_format_cpio_bin_bz2.c \ 260 libarchive/test/test_read_format_cpio_bin_gz.c \ 261 libarchive/test/test_read_format_cpio_bin_lzma.c \ 262 libarchive/test/test_read_format_cpio_bin_xz.c \ 263 libarchive/test/test_read_format_cpio_odc.c \ 264 libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.c \ 265 libarchive/test/test_read_format_cpio_svr4_gzip.c \ 266 libarchive/test/test_read_format_cpio_svr4_gzip_rpm.c \ 267 libarchive/test/test_read_format_cpio_svr4c_Z.c \ 268 libarchive/test/test_read_format_empty.c \ 269 libarchive/test/test_read_format_gtar_gz.c \ 270 libarchive/test/test_read_format_gtar_lzma.c \ 271 libarchive/test/test_read_format_gtar_sparse.c \ 272 libarchive/test/test_read_format_iso_gz.c \ 273 libarchive/test/test_read_format_iso_multi_extent.c \ 274 libarchive/test/test_read_format_isojoliet_bz2.c \ 275 libarchive/test/test_read_format_isojoliet_long.c \ 276 libarchive/test/test_read_format_isojoliet_rr.c \ 277 libarchive/test/test_read_format_isorr_bz2.c \ 278 libarchive/test/test_read_format_isorr_ce.c \ 279 libarchive/test/test_read_format_isorr_new_bz2.c \ 280 libarchive/test/test_read_format_isorr_rr_moved.c \ 281 libarchive/test/test_read_format_isozisofs_bz2.c \ 282 libarchive/test/test_read_format_mtree.c \ 283 libarchive/test/test_read_format_pax_bz2.c \ 284 libarchive/test/test_read_format_raw.c \ 285 libarchive/test/test_read_format_tar.c \ 286 libarchive/test/test_read_format_tar_empty_filename.c \ 287 libarchive/test/test_read_format_tbz.c \ 288 libarchive/test/test_read_format_tgz.c \ 289 libarchive/test/test_read_format_tlz.c \ 290 libarchive/test/test_read_format_txz.c \ 291 libarchive/test/test_read_format_tz.c \ 292 libarchive/test/test_read_format_xar.c \ 293 libarchive/test/test_read_format_zip.c \ 294 libarchive/test/test_read_large.c \ 295 libarchive/test/test_read_pax_truncated.c \ 296 libarchive/test/test_read_position.c \ 297 libarchive/test/test_read_truncated.c \ 298 libarchive/test/test_read_uu.c \ 299 libarchive/test/test_tar_filenames.c \ 300 libarchive/test/test_tar_large.c \ 301 libarchive/test/test_ustar_filenames.c \ 302 libarchive/test/test_write_compress.c \ 303 libarchive/test/test_write_compress_bzip2.c \ 304 libarchive/test/test_write_compress_gzip.c \ 305 libarchive/test/test_write_compress_lzma.c \ 306 libarchive/test/test_write_compress_program.c \ 307 libarchive/test/test_write_compress_xz.c \ 308 libarchive/test/test_write_disk.c \ 309 libarchive/test/test_write_disk_failures.c \ 310 libarchive/test/test_write_disk_hardlink.c \ 311 libarchive/test/test_write_disk_perms.c \ 312 libarchive/test/test_write_disk_secure.c \ 313 libarchive/test/test_write_disk_sparse.c \ 314 libarchive/test/test_write_disk_symlink.c \ 315 libarchive/test/test_write_disk_times.c \ 316 libarchive/test/test_write_format_ar.c \ 317 libarchive/test/test_write_format_cpio.c \ 318 libarchive/test/test_write_format_cpio_empty.c \ 319 libarchive/test/test_write_format_cpio_odc.c \ 320 libarchive/test/test_write_format_cpio_newc.c \ 321 libarchive/test/test_write_format_mtree.c \ 322 libarchive/test/test_write_format_pax.c \ 323 libarchive/test/test_write_format_shar_empty.c \ 324 libarchive/test/test_write_format_tar.c \ 325 libarchive/test/test_write_format_tar_empty.c \ 326 libarchive/test/test_write_format_tar_ustar.c \ 327 libarchive/test/test_write_format_zip.c \ 328 libarchive/test/test_write_format_zip_empty.c \ 329 libarchive/test/test_write_format_zip_no_compression.c \ 330 libarchive/test/test_write_open_memory.c 331 332libarchive_test_CPPFLAGS= -I$(top_srcdir)/libarchive -I$(top_builddir)/libarchive/test -DLIBARCHIVE_STATIC $(PLATFORMCPPFLAGS) 333 334# The "list.h" file just lists all of the tests defined in all of the sources. 335# Building it automatically provides a sanity-check on libarchive_test_SOURCES 336# above. 337libarchive/test/list.h: Makefile 338 cat $(top_srcdir)/libarchive/test/test_*.c | grep DEFINE_TEST > libarchive/test/list.h 339 340libarchive_TESTS_ENVIRONMENT= LIBARCHIVE_TEST_FILES=`cd $(top_srcdir);/bin/pwd`/libarchive/test 341 342libarchive_test_EXTRA_DIST=\ 343 libarchive/test/test_compat_bzip2_1.tbz.uu \ 344 libarchive/test/test_compat_bzip2_2.tbz.uu \ 345 libarchive/test/test_compat_cpio_1.cpio.uu \ 346 libarchive/test/test_compat_gtar_1.tar.uu \ 347 libarchive/test/test_compat_gzip_1.tgz.uu \ 348 libarchive/test/test_compat_gzip_2.tgz.uu \ 349 libarchive/test/test_compat_lzma_1.tlz.uu \ 350 libarchive/test/test_compat_lzma_2.tlz.uu \ 351 libarchive/test/test_compat_lzma_3.tlz.uu \ 352 libarchive/test/test_compat_solaris_tar_acl.tar.uu \ 353 libarchive/test/test_compat_tar_hardlink_1.tar.uu \ 354 libarchive/test/test_compat_xz_1.txz.uu \ 355 libarchive/test/test_compat_zip_1.zip.uu \ 356 libarchive/test/test_fuzz_1.iso.Z.uu \ 357 libarchive/test/test_pax_filename_encoding.tar.uu \ 358 libarchive/test/test_read_format_ar.ar.uu \ 359 libarchive/test/test_read_format_cpio_bin_be.cpio.uu \ 360 libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.rpm.uu \ 361 libarchive/test/test_read_format_cpio_svr4_gzip_rpm.rpm.uu \ 362 libarchive/test/test_read_format_gtar_sparse_1_13.tar.uu \ 363 libarchive/test/test_read_format_gtar_sparse_1_17.tar.uu \ 364 libarchive/test/test_read_format_gtar_sparse_1_17_posix00.tar.uu \ 365 libarchive/test/test_read_format_gtar_sparse_1_17_posix01.tar.uu \ 366 libarchive/test/test_read_format_gtar_sparse_1_17_posix10.tar.uu \ 367 libarchive/test/test_read_format_gtar_sparse_1_17_posix10_modified.tar.uu \ 368 libarchive/test/test_read_format_iso.iso.Z.uu \ 369 libarchive/test/test_read_format_iso_joliet.iso.Z.uu \ 370 libarchive/test/test_read_format_iso_joliet_long.iso.Z.uu \ 371 libarchive/test/test_read_format_iso_joliet_rockridge.iso.Z.uu \ 372 libarchive/test/test_read_format_iso_multi_extent.iso.Z.uu \ 373 libarchive/test/test_read_format_iso_rockridge.iso.Z.uu \ 374 libarchive/test/test_read_format_iso_rockridge_ce.iso.Z.uu \ 375 libarchive/test/test_read_format_iso_rockridge_new.iso.Z.uu \ 376 libarchive/test/test_read_format_iso_rockridge_rr_moved.iso.Z.uu\ 377 libarchive/test/test_read_format_iso_zisofs.iso.Z.uu \ 378 libarchive/test/test_read_format_mtree.mtree.uu \ 379 libarchive/test/test_read_format_raw.data.Z.uu \ 380 libarchive/test/test_read_format_raw.data.uu \ 381 libarchive/test/test_read_format_tar_empty_filename.tar.uu \ 382 libarchive/test/test_read_format_zip.zip.uu \ 383 libarchive/test/CMakeLists.txt \ 384 libarchive/test/README 385 386# 387# Common code for libarchive frontends (cpio, tar) 388# 389libarchive_fe_la_SOURCES= \ 390 libarchive_fe/err.c \ 391 libarchive_fe/err.h \ 392 libarchive_fe/lafe_platform.h \ 393 libarchive_fe/line_reader.c \ 394 libarchive_fe/line_reader.h \ 395 libarchive_fe/matching.c \ 396 libarchive_fe/matching.h \ 397 libarchive_fe/pathmatch.c \ 398 libarchive_fe/pathmatch.h 399 400# 401# 402# bsdtar source, docs, etc. 403# 404# 405 406bsdtar_SOURCES= \ 407 tar/bsdtar.c \ 408 tar/bsdtar.h \ 409 tar/bsdtar_platform.h \ 410 tar/cmdline.c \ 411 tar/getdate.c \ 412 tar/read.c \ 413 tar/subst.c \ 414 tar/tree.c \ 415 tar/tree.h \ 416 tar/util.c \ 417 tar/write.c 418 419if INC_WINDOWS_FILES 420bsdtar_SOURCES+= \ 421 tar/bsdtar_windows.h \ 422 tar/bsdtar_windows.c 423endif 424 425bsdtar_DEPENDENCIES= libarchive.la libarchive_fe.la 426 427if STATIC_BSDTAR 428bsdtar_ldstatic= -static 429bsdtar_ccstatic= -DLIBARCHIVE_STATIC 430else 431bsdtar_ldstatic= 432bsdtar_ccstatic= 433endif 434 435bsdtar_LDADD= libarchive.la libarchive_fe.la 436bsdtar_CPPFLAGS= -I$(top_srcdir)/libarchive -I$(top_srcdir)/libarchive_fe $(bsdtar_ccstatic) $(PLATFORMCPPFLAGS) 437bsdtar_LDFLAGS= $(bsdtar_ldstatic) 438 439bsdtar_EXTRA_DIST= \ 440 tar/bsdtar.1 \ 441 tar/bsdtar_windows.h \ 442 tar/bsdtar_windows.c \ 443 tar/CMakeLists.txt \ 444 tar/config_freebsd.h \ 445 tar/test/list.h 446 447 448if BUILD_BSDTAR 449bsdtar_man_MANS= tar/bsdtar.1 450bsdtar_programs= bsdtar 451else 452bsdtar_man_MANS= 453bsdtar_programs= 454endif 455 456# 457# bsdtar_test 458# 459 460bsdtar_test_SOURCES= \ 461 tar/getdate.c \ 462 tar/test/main.c \ 463 tar/test/test.h \ 464 tar/test/test_0.c \ 465 tar/test/test_basic.c \ 466 tar/test/test_copy.c \ 467 tar/test/test_empty_mtree.c \ 468 tar/test/test_getdate.c \ 469 tar/test/test_help.c \ 470 tar/test/test_option_T_upper.c \ 471 tar/test/test_option_q.c \ 472 tar/test/test_option_r.c \ 473 tar/test/test_option_s.c \ 474 tar/test/test_patterns.c \ 475 tar/test/test_stdio.c \ 476 tar/test/test_strip_components.c \ 477 tar/test/test_symlink_dir.c \ 478 tar/test/test_version.c \ 479 tar/test/test_windows.c 480 481# For now, bsdtar_test uses Windows shims from tar/bsdtar_windows.* 482if INC_WINDOWS_FILES 483bsdtar_test_SOURCES+= \ 484 tar/bsdtar_windows.h \ 485 tar/bsdtar_windows.c 486endif 487 488bsdtar_test_CPPFLAGS=\ 489 -I$(top_srcdir)/libarchive -I$(top_srcdir)/libarchive_fe \ 490 -I$(top_srcdir)/tar -I$(top_builddir)/tar/test \ 491 $(PLATFORMCPPFLAGS) 492 493tar/test/list.h: Makefile 494 cat $(top_srcdir)/tar/test/test_*.c | grep DEFINE_TEST > tar/test/list.h 495 496if BUILD_BSDTAR 497bsdtar_test_programs= bsdtar_test 498bsdtar_TESTS_ENVIRONMENT= BSDTAR=`cd $(top_builddir);/bin/pwd`/bsdtar$(EXEEXT) BSDTAR_TEST_FILES=`cd $(top_srcdir);/bin/pwd`/tar/test 499else 500bsdtar_test_programs= 501bsdtar_TESTS_ENVIRONMENT= 502endif 503 504bsdtar_test_EXTRA_DIST= \ 505 tar/test/test_patterns_2.tar.uu \ 506 tar/test/test_patterns_3.tar.uu \ 507 tar/test/test_patterns_4.tar.uu \ 508 tar/test/CMakeLists.txt 509 510 511# 512# 513# bsdcpio source, docs, etc. 514# 515# 516 517bsdcpio_SOURCES= \ 518 cpio/cmdline.c \ 519 cpio/cpio.c \ 520 cpio/cpio.h \ 521 cpio/cpio_platform.h 522 523if INC_WINDOWS_FILES 524bsdcpio_SOURCES+= \ 525 cpio/cpio_windows.h \ 526 cpio/cpio_windows.c 527endif 528 529bsdcpio_DEPENDENCIES = libarchive.la libarchive_fe.la 530 531 532if STATIC_BSDCPIO 533bsdcpio_ldstatic= -static 534bsdcpio_ccstatic= -DLIBARCHIVE_STATIC 535else 536bsdcpio_ldstatic= 537bsdcpio_ccstatic= 538endif 539 540bsdcpio_LDADD= libarchive_fe.la libarchive.la 541bsdcpio_CPPFLAGS= -I$(top_srcdir)/libarchive -I$(top_srcdir)/libarchive_fe $(bsdcpio_ccstatic) $(PLATFORMCPPFLAGS) 542bsdcpio_LDFLAGS= $(bsdcpio_ldstatic) 543 544bsdcpio_EXTRA_DIST= \ 545 cpio/test/list.h \ 546 cpio/bsdcpio.1 \ 547 cpio/cpio_windows.h \ 548 cpio/cpio_windows.c \ 549 cpio/CMakeLists.txt \ 550 cpio/config_freebsd.h 551 552 553if BUILD_BSDCPIO 554# Manpages to install 555bsdcpio_man_MANS= cpio/bsdcpio.1 556bsdcpio_programs= bsdcpio 557else 558bsdcpio_man_MANS= 559bsdcpio_programs= 560endif 561 562# 563# bsdcpio_test 564# 565 566bsdcpio_test_SOURCES= \ 567 cpio/cmdline.c \ 568 cpio/test/main.c \ 569 cpio/test/test.h \ 570 cpio/test/test_0.c \ 571 cpio/test/test_basic.c \ 572 cpio/test/test_cmdline.c \ 573 cpio/test/test_format_newc.c \ 574 cpio/test/test_gcpio_compat.c \ 575 cpio/test/test_option_B_upper.c \ 576 cpio/test/test_option_C_upper.c \ 577 cpio/test/test_option_J_upper.c \ 578 cpio/test/test_option_L_upper.c \ 579 cpio/test/test_option_Z_upper.c \ 580 cpio/test/test_option_a.c \ 581 cpio/test/test_option_c.c \ 582 cpio/test/test_option_d.c \ 583 cpio/test/test_option_f.c \ 584 cpio/test/test_option_help.c \ 585 cpio/test/test_option_l.c \ 586 cpio/test/test_option_lzma.c \ 587 cpio/test/test_option_m.c \ 588 cpio/test/test_option_t.c \ 589 cpio/test/test_option_u.c \ 590 cpio/test/test_option_version.c \ 591 cpio/test/test_option_y.c \ 592 cpio/test/test_option_z.c \ 593 cpio/test/test_owner_parse.c \ 594 cpio/test/test_passthrough_dotdot.c \ 595 cpio/test/test_passthrough_reverse.c \ 596 cpio/test/test_pathmatch.c 597 598bsdcpio_test_CPPFLAGS= \ 599 -I$(top_srcdir)/libarchive -I$(top_srcdir)/libarchive_fe \ 600 -I$(top_srcdir)/cpio -I$(top_builddir)/cpio/test \ 601 $(PLATFORMCPPFLAGS) 602bsdcpio_test_LDADD=libarchive_fe.la 603 604cpio/test/list.h: Makefile 605 cat $(top_srcdir)/cpio/test/test_*.c | grep DEFINE_TEST > cpio/test/list.h 606 607if BUILD_BSDCPIO 608bsdcpio_test_programs= bsdcpio_test 609bsdcpio_TESTS_ENVIRONMENT= BSDCPIO=`cd $(top_builddir);/bin/pwd`/bsdcpio$(EXEEXT) BSDCPIO_TEST_FILES=`cd $(top_srcdir);/bin/pwd`/cpio/test 610else 611bsdcpio_test_programs= 612bsdcpio_TESTS_ENVIRONMENT= 613endif 614 615bsdcpio_test_EXTRA_DIST= \ 616 cpio/test/test_gcpio_compat_ref.bin.uu \ 617 cpio/test/test_gcpio_compat_ref.crc.uu \ 618 cpio/test/test_gcpio_compat_ref.newc.uu \ 619 cpio/test/test_gcpio_compat_ref.ustar.uu \ 620 cpio/test/test_option_f.cpio.uu \ 621 cpio/test/test_option_m.cpio.uu \ 622 cpio/test/test_option_t.cpio.uu \ 623 cpio/test/test_option_t.stdout.uu \ 624 cpio/test/test_option_tv.stdout.uu \ 625 cpio/test/CMakeLists.txt 626