~tplavcic/percona-xtrabackup/bld-26-2.0

« back to all changes in this revision

Viewing changes to src/libarchive/Makefile.am

  • Committer: Alexey Kopytov
  • Date: 2012-02-10 20:05:56 UTC
  • mto: This revision was merged to the branch mainline in revision 390.
  • Revision ID: akopytov@gmail.com-20120210200556-6kx41z8wwrqfucro
Rebase of the parallel compression patch on new trunk + post-review
fixes.

Implementation of parallel compression and streaming for XtraBackup.

This revision implements the following changes:

* InnoDB files are now streamed by the xtrabackup binary rather than
innobackupex. As a result, integrity is now verified by xtrabackup and
thus tar4ibd is no longer needed, so it was removed.

* xtrabackup binary now accepts the new '--stream' option which has
exactly the same semantics as the '--stream' option in
innobackupex: it tells xtrabackup to stream all files to the standard
output in the specified format rather than storing them locally.

* The xtrabackup binary can now do parallel compression using the
quicklz library. Two new options were added to xtrabackup to support
this feature:

- '--compress' tells xtrabackup to compress all output data, including
the transaction log file and meta data files, using the specified
compression algorithm. The only currently supported algorithm is
'quicklz'. The resulting files have the qpress archive format,
i.e. every *.qp file produced by xtrabackup is essentially a one-file
qpress archive and can be extracted and uncompressed by the qpress
file archiver (http://www.quicklz.com/).

- '--compress-threads' specifies the number of worker threads used by
xtrabackup for parallel data compression. This option defaults to 1.

Parallel compression ('--compress-threads') can be used together with
parallel file copying ('--parallel'). For example, '--parallel=4
--compress --compress-threads=2' will create 4 IO threads that will
read the data and pipe it to 2 compression threads.

* To support simultaneous compression and streaming, a new custom
streaming format called 'xbstream' was introduced to XtraBackup in
addition to the 'tar' format. That was required to overcome some
limitations of traditional archive formats such as 'tar', 'cpio' and
others that do not allow streaming dynamically generated files, for
example dynamically compressed files.  Other advantages of xbstream over
traditional streaming/archive formats include ability to stream multiple
files concurrently (so it is possible to use streaming in the xbstream
format together with the --parallel option) and more compact data
storage.

* To allow streaming and extracting files to/from the xbstream format
produced by xtrabackup, a new utility aptly called 'xbstream' was
added to the XtraBackup distribution. This utility has a tar-like
interface:

- with the '-x' option it extracts files from the stream read from its
standard input to the current directory unless specified otherwise
with the '-C' option.

- with the '-c' option it streams files specified on the command line
to its standard output.

The utility also tries to minimize its impact on the OS page cache by
using the appropriate posix_fadvise() calls when available.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
## Process this file with automake to produce Makefile.in
 
2
 
 
3
AUTOMAKE_OPTIONS= foreign subdir-objects
 
4
ACLOCAL_AMFLAGS = -I build/autoconf
 
5
 
 
6
#
 
7
# What to build and install
 
8
#
 
9
lib_LTLIBRARIES=        libarchive.la
 
10
noinst_LTLIBRARIES=     libarchive_fe.la
 
11
bin_PROGRAMS=   $(bsdtar_programs) $(bsdcpio_programs)
 
12
man_MANS= $(libarchive_man_MANS) $(bsdtar_man_MANS) $(bsdcpio_man_MANS)
 
13
BUILT_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
#
 
19
check_PROGRAMS= libarchive_test $(bsdtar_test_programs) $(bsdcpio_test_programs)
 
20
TESTS= libarchive_test $(bsdtar_test_programs) $(bsdcpio_test_programs)
 
21
TESTS_ENVIRONMENT= $(libarchive_TESTS_ENVIRONMENT) $(bsdtar_TESTS_ENVIRONMENT) $(bsdcpio_TESTS_ENVIRONMENT)
 
22
# Always build and test both bsdtar and bsdcpio as part of 'distcheck'
 
23
DISTCHECK_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
 
28
PLATFORMCPPFLAGS = @PLATFORMCPPFLAGS@
 
29
AM_CPPFLAGS=$(PLATFORMCPPFLAGS)
 
30
 
 
31
#
 
32
# What to include in the distribution
 
33
#
 
34
EXTRA_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.
 
54
dist-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
 
64
distcheck-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
#
 
72
DISTCLEANFILES=                                 \
 
73
        libarchive/test/list.h                  \
 
74
        tar/test/list.h                         \
 
75
        cpio/test/list.h
 
76
 
 
77
distclean-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
 
 
93
include_HEADERS= libarchive/archive.h libarchive/archive_entry.h
 
94
 
 
95
libarchive_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
 
 
175
if INC_WINDOWS_FILES
 
176
libarchive_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
 
181
endif
 
182
 
 
183
# -no-undefined marks that libarchive doesn't rely on symbols
 
184
# defined in the application.  This is mandatory for cygwin.
 
185
libarchive_la_LDFLAGS= -no-undefined -version-info $(ARCHIVE_LIBTOOL_VERSION)
 
186
 
 
187
# Manpages to install
 
188
libarchive_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
 
203
libarchive_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
 
212
pkgconfigdir = $(libdir)/pkgconfig
 
213
pkgconfig_DATA = build/pkgconfig/libarchive.pc
 
214
 
 
215
#
 
216
#
 
217
# libarchive_test program
 
218
#
 
219
#
 
220
libarchive_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
 
 
332
libarchive_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.
 
337
libarchive/test/list.h: Makefile
 
338
        cat $(top_srcdir)/libarchive/test/test_*.c | grep DEFINE_TEST > libarchive/test/list.h
 
339
 
 
340
libarchive_TESTS_ENVIRONMENT= LIBARCHIVE_TEST_FILES=`cd $(top_srcdir);/bin/pwd`/libarchive/test
 
341
 
 
342
libarchive_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
#
 
389
libarchive_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
 
 
406
bsdtar_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
 
 
419
if INC_WINDOWS_FILES
 
420
bsdtar_SOURCES+=                        \
 
421
                tar/bsdtar_windows.h    \
 
422
                tar/bsdtar_windows.c
 
423
endif
 
424
 
 
425
bsdtar_DEPENDENCIES= libarchive.la libarchive_fe.la
 
426
 
 
427
if STATIC_BSDTAR
 
428
bsdtar_ldstatic= -static
 
429
bsdtar_ccstatic= -DLIBARCHIVE_STATIC
 
430
else
 
431
bsdtar_ldstatic=
 
432
bsdtar_ccstatic=
 
433
endif
 
434
 
 
435
bsdtar_LDADD= libarchive.la libarchive_fe.la
 
436
bsdtar_CPPFLAGS= -I$(top_srcdir)/libarchive -I$(top_srcdir)/libarchive_fe $(bsdtar_ccstatic) $(PLATFORMCPPFLAGS)
 
437
bsdtar_LDFLAGS= $(bsdtar_ldstatic)
 
438
 
 
439
bsdtar_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
 
 
448
if BUILD_BSDTAR
 
449
bsdtar_man_MANS= tar/bsdtar.1
 
450
bsdtar_programs= bsdtar
 
451
else
 
452
bsdtar_man_MANS=
 
453
bsdtar_programs=
 
454
endif
 
455
 
 
456
#
 
457
# bsdtar_test
 
458
#
 
459
 
 
460
bsdtar_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.*
 
482
if INC_WINDOWS_FILES
 
483
bsdtar_test_SOURCES+=                   \
 
484
                tar/bsdtar_windows.h    \
 
485
                tar/bsdtar_windows.c
 
486
endif
 
487
 
 
488
bsdtar_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
 
 
493
tar/test/list.h: Makefile
 
494
        cat $(top_srcdir)/tar/test/test_*.c | grep DEFINE_TEST > tar/test/list.h
 
495
 
 
496
if BUILD_BSDTAR
 
497
bsdtar_test_programs= bsdtar_test
 
498
bsdtar_TESTS_ENVIRONMENT= BSDTAR=`cd $(top_builddir);/bin/pwd`/bsdtar$(EXEEXT) BSDTAR_TEST_FILES=`cd $(top_srcdir);/bin/pwd`/tar/test
 
499
else
 
500
bsdtar_test_programs=
 
501
bsdtar_TESTS_ENVIRONMENT=
 
502
endif
 
503
 
 
504
bsdtar_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
 
 
517
bsdcpio_SOURCES=                        \
 
518
                cpio/cmdline.c          \
 
519
                cpio/cpio.c             \
 
520
                cpio/cpio.h             \
 
521
                cpio/cpio_platform.h
 
522
 
 
523
if INC_WINDOWS_FILES
 
524
bsdcpio_SOURCES+=                       \
 
525
                cpio/cpio_windows.h     \
 
526
                cpio/cpio_windows.c
 
527
endif
 
528
 
 
529
bsdcpio_DEPENDENCIES = libarchive.la libarchive_fe.la
 
530
 
 
531
 
 
532
if STATIC_BSDCPIO
 
533
bsdcpio_ldstatic= -static
 
534
bsdcpio_ccstatic= -DLIBARCHIVE_STATIC
 
535
else
 
536
bsdcpio_ldstatic=
 
537
bsdcpio_ccstatic=
 
538
endif
 
539
 
 
540
bsdcpio_LDADD= libarchive_fe.la libarchive.la
 
541
bsdcpio_CPPFLAGS= -I$(top_srcdir)/libarchive -I$(top_srcdir)/libarchive_fe $(bsdcpio_ccstatic) $(PLATFORMCPPFLAGS)
 
542
bsdcpio_LDFLAGS= $(bsdcpio_ldstatic)
 
543
 
 
544
bsdcpio_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
 
 
553
if BUILD_BSDCPIO
 
554
# Manpages to install
 
555
bsdcpio_man_MANS= cpio/bsdcpio.1
 
556
bsdcpio_programs= bsdcpio
 
557
else
 
558
bsdcpio_man_MANS=
 
559
bsdcpio_programs=
 
560
endif
 
561
 
 
562
#
 
563
# bsdcpio_test
 
564
#
 
565
 
 
566
bsdcpio_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
 
 
598
bsdcpio_test_CPPFLAGS= \
 
599
        -I$(top_srcdir)/libarchive -I$(top_srcdir)/libarchive_fe \
 
600
        -I$(top_srcdir)/cpio -I$(top_builddir)/cpio/test \
 
601
        $(PLATFORMCPPFLAGS)
 
602
bsdcpio_test_LDADD=libarchive_fe.la
 
603
 
 
604
cpio/test/list.h: Makefile
 
605
        cat $(top_srcdir)/cpio/test/test_*.c | grep DEFINE_TEST > cpio/test/list.h
 
606
 
 
607
if BUILD_BSDCPIO
 
608
bsdcpio_test_programs= bsdcpio_test
 
609
bsdcpio_TESTS_ENVIRONMENT= BSDCPIO=`cd $(top_builddir);/bin/pwd`/bsdcpio$(EXEEXT) BSDCPIO_TEST_FILES=`cd $(top_srcdir);/bin/pwd`/cpio/test
 
610
else
 
611
bsdcpio_test_programs=
 
612
bsdcpio_TESTS_ENVIRONMENT=
 
613
endif
 
614
 
 
615
bsdcpio_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_gcpio_compat_ref_nosym.bin.uu \
 
621
        cpio/test/test_gcpio_compat_ref_nosym.crc.uu \
 
622
        cpio/test/test_gcpio_compat_ref_nosym.newc.uu \
 
623
        cpio/test/test_gcpio_compat_ref_nosym.ustar.uu \
 
624
        cpio/test/test_option_f.cpio.uu         \
 
625
        cpio/test/test_option_m.cpio.uu         \
 
626
        cpio/test/test_option_t.cpio.uu         \
 
627
        cpio/test/test_option_t.stdout.uu       \
 
628
        cpio/test/test_option_tv.stdout.uu      \
 
629
        cpio/test/CMakeLists.txt