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