Merged revisions 1884-1905 via svnmerge from
[scons.git] / src / engine / SCons / Tool / tar.xml
1 <!--
2 __COPYRIGHT__
3
4 This file is processed by the bin/SConsDoc.py module.
5 See its __doc__ string for a discussion of the format.
6 -->
7 <tool name="tar">
8 <summary>
9 Sets construction variables for the &tar; archiver.
10 </summary>
11 <sets>
12 TAR
13 TARFLAGS
14 TARCOM
15 TARSUFFIX
16 </sets>
17 <uses>
18 TARCOMSTR
19 </uses>
20 </tool>
21
22 <builder name="Tar">
23 <summary>
24 Builds a tar archive of the specified files
25 and/or directories.
26 Unlike most builder methods,
27 the
28 &b-Tar;
29 builder method may be called multiple times
30 for a given target;
31 each additional call
32 adds to the list of entries
33 that will be built into the archive.
34 Any source directories will
35 be scanned for changes to
36 any on-disk files,
37 regardless of whether or not
38 &scons;
39 knows about them from other Builder or function calls.
40
41 <example>
42 env.Tar('src.tar', 'src')
43
44 # Create the stuff.tar file.
45 env.Tar('stuff', ['subdir1', 'subdir2'])
46 # Also add "another" to the stuff.tar file.
47 env.Tar('stuff', 'another')
48
49 # Set TARFLAGS to create a gzip-filtered archive.
50 env = Environment(TARFLAGS = '-c -z')
51 env.Tar('foo.tar.gz', 'foo')
52
53 # Also set the suffix to .tgz.
54 env = Environment(TARFLAGS = '-c -z',
55                   TARSUFFIX = '.tgz')
56 env.Tar('foo')
57 </example>
58 </summary>
59 </builder>
60
61 <cvar name="TAR">
62 <summary>
63 The tar archiver.
64 </summary>
65 </cvar>
66
67 <cvar name="TARCOM">
68 <summary>
69 The command line used to call the tar archiver.
70 </summary>
71 </cvar>
72
73 <cvar name="TARCOMSTR">
74 <summary>
75 The string displayed when archiving files
76 using the tar archiver.
77 If this is not set, then &cv-link-TARCOM; (the command line) is displayed.
78
79 <example>
80 env = Environment(TARCOMSTR = "Archiving $TARGET")
81 </example>
82 </summary>
83 </cvar>
84
85 <cvar name="TARFLAGS">
86 <summary>
87 General options passed to the tar archiver.
88 </summary>
89 </cvar>
90
91 <cvar name="TARSUFFIX">
92 <summary>
93 The suffix used for tar file names.
94 </summary>
95 </cvar>