Add a function to choose content signature type. (Anthony Roach)
[scons.git] / config
1 /*
2  *      aegis - project change supervisor
3  *      This file is in the Public Domain, 1995, Peter Miller.
4  *
5  * MANIFEST: example use of make in project config file
6  *
7  * The make(1) program exists in many forms, usually one is available with each
8  * UNIX version.  The one used in the writing of this section is GNU Make 3.70,
9  * avaiable by anonymous FTP from your nearest GNU archive site.  GNU Make was
10  * chosen because it was the most powerful, it is widely avaiable (usually for
11  * little or no cost) and discussion of the alternatives (SunOS make, BSD 4.3
12  * make, etc), would not be universally applicable.  "Plain vanilla" make
13  * (with no transitive closure, no pattern rules, no functions) is not
14  * sufficiently capable to satisfy the demands placed on it by aegis.
15  *
16  * As mentioned in the Dependency Maintenance Tool chapter of the User Guide,
17  * make is not really sufficient, because it lacks dynamic include dependencies.
18  * However, GNU Make has a form of dynamic include dependencies, and it has a
19  * few quirks, but mostly works well.
20  *
21  * The other feature lacking in make is a search path.  While GNU Make has
22  * functionality called VPATH, the implementation leaves something to be
23  * desired, and can't be used for the search path functionality required by
24  * aegis.  Because of this, the create_symlinks_before_build field of the
25  * project config file is set to true so that aegis will arrange for the
26  * development directory to be fiull of symbolic links, making it appear that
27  * the entire project is in each change's development directory.
28  */
29
30 /*
31  * The build_command field of the project config file is used to invoke the
32  * relevant build command.  This command tells make where to find the rules.
33  * The ${s Makefile} expands to a path into the baseline during development
34  * if the file is not in the change.  Look in aesub(5) for more information
35  * about command substitutions.
36  */
37 build_command = "SCONS_LIB_DIR=src/engine python ${Source src/script/scons.py} date='${DAte %Y/%m/%d %H:%M:%S}' developer=${DEVeloper} version=${VERsion} change=${Change}";
38
39 /*
40  * The rules used in the User Guide all remove their targets before
41  * constructing them, which qualifies them for the following entry in the
42  * config file.  The files must be removed first, otherwise the baseline would
43  * cease to be self-consistent.
44  */
45 link_integration_directory = true;
46
47 /*
48  * Another field to be set in this file is one which tells aegis to maintain
49  * symbolic links between the development directory and the basline.  This also
50  * requires that rules remove their targets before constructing them, to ensure
51  * that development builds do not attempt to write their results onto the
52  * read-only versions in the baseline.
53  */
54 create_symlinks_before_build = true;
55
56 remove_symlinks_after_build = false;
57
58 /*
59 integrate_begin_command =
60         "";
61 */
62
63 /*
64  *      aegis - project change supervisor
65  *      This file is in the Public Domain, 1995, 1998 Peter Miller.
66  *
67  * MANIFEST: example of using rcs in the project config file
68  *
69  * The entries for the commands are listed below.  RCS uses a slightly
70  * different model than aegis wants, so some maneuvering is required.
71  * The command strings in this section assume that the RCS commands ci and co
72  * and rcs and rlog are in the command search PATH, but you may like to
73  * hard-wire the paths, or set PATH at the start of each.  You should also note
74  * that the strings are always handed to the Bourne shell to be executed, and
75  * are set to exit with an error immediately a sub-command fails.
76  *
77  * In these commands, the RCS file is kept unlocked, since only the owner will
78  * be checking changes in.  The RCS functionality for coordinating shared
79  * access is not required.
80  *
81  * One advantage of using RCS version 5.6 or later is that binary files are
82  * supported, should you want to have binary files in the baseline.
83  *
84  * The ${quote ...} construct is used to quote filenames which contain
85  * shell special characters.  A minimum of quoting is performed, so if
86  * the filenames do not contail shell special characters, no quotes will
87  * be used.
88  */
89
90 /*
91  * This command is used to create a new file history.
92  * This command is always executed as the project owner.
93  * The following substitutions are available:
94  *
95  * ${Input}
96  *      absolute path of the source file
97  * ${History}
98  *      absolute path of the history file
99  *
100  * The "ci -f" option is used to specify that a copy is to be checked-in even
101  *      if there are no changes.
102  * The "ci -u" option is used to specify that an unlocked copy will remain in
103  *      the baseline.
104  * The "ci -d" option is used to specify that the file time rather than the
105  *      current time is to be used for the new revision.
106  * The "ci -M" option is used to specify that the mode date on the original
107  *      file is not to be altered.
108  * The "ci -t" option is used to specify that there is to be no description
109  *      text for the new RCS file.
110  * The "ci -m" option is used to specify that the change number is to be stored
111  *      in the file log if this is actually an update (typically from aenf
112  *      after aerm on the same file name).
113  * The "rcs -U" option is used to specify that the new RCS file is to have
114  *      unstrict locking.
115  * The "rcs -kk" option is used to specify that keyword substitution is
116  *      disabled (only keyword names, not values, are substituted).
117  */
118 history_create_command =
119         "ci -f -u -d -M -m$c -t/dev/null ${quote $input} ${quote $history,v}; \
120 rcs -kk -U ${quote $history,v}";
121
122
123 /*
124  * This command is used to get a specific edit back from history.
125  * This command is always executed as the project owner.
126  * The following substitutions are available:
127  *
128  * ${History}
129  *      absolute path of the history file
130  * ${Edit}
131  *      edit number, as given by history_\%query_\%command
132  * ${Output}
133  *      absolute path of the destination file
134  *
135  * The "co -r" option is used to specify the edit to be retrieved.
136  * The "co -p" option is used to specify that the results be printed on the
137  *      standard output; this is because the destination filename will never
138  *      look anything like the history source filename.
139  * The "rcs -kk" option is used to specify that keyword substitution is
140  *      disabled (only keyword names, not values, are substituted).
141  */
142 history_get_command =
143         "co -kk -r${quote $edit} -p ${quote $history,v} > ${quote $output}";
144
145 /*
146  * This command is used to add a new "top-most" entry to the history file.
147  * This command is always executed as the project owner.
148  * The following substitutions are available:
149  *
150  * ${Input}
151  *      absolute path of source file
152  * ${History}
153  *      absolute path of history file
154  *
155  * The "ci -f" option is used to specify that a copy is to be checked-in even
156  *      if there are no changes.
157  * The "ci -u" option is used to specify that an unlocked copy will remain in
158  *      the baseline.
159  * The "ci -d" option is used to specify that the file time rather than the
160  *      current time is to be used for the new revision.
161  * The "ci -M" option is used to specify that the mode date on the original
162  *      file is not to be altered.
163  * The "ci -m" option is used to specify that the change number is to be stored
164  *      in the file log, which allows rlog to be used to find the change
165  *      numbers to which each revision of the file corresponds.
166  *
167  * It is possible for a a very cautious approach has been taken, in which case
168  * the history_put_command may be set to the same string specified above for
169  * the history_create_command.
170  */
171 history_put_command =
172         "ci -f -u -d -M -m$c ${quote $input} ${quote $history,v}";
173
174 /*
175  * This command is used to query what the history mechanism calls the top-most
176  * edit of a history file.  The result may be any arbitrary string, it need not
177  * be anything like a number, just so long as it uniquely identifies the edit
178  * for use by the history_get_command at a later date.  The edit number is to
179  * be printed on the standard output.  This command is always executed as the
180  * project owner.
181  *
182  * The following substitutions are available:
183  *
184  * ${History}
185  *      absolute path of the history file
186  */
187 history_query_command =
188         "rlog -r ${quote $history,v} | awk '/^head:/ {print $$2}'";
189
190 /*
191  * RCS also provides a merge program, which can be used to provide a three-way
192  * merge.  It has an ouput format some sites prefer to the fmerge output.
193  *
194  * This command is used by aed(1) to produce a difference listing when a file
195  * in the development directory is out of date compared to the current version
196  * in the baseline.
197  *
198  * All of the command substitutions described in aesub(5) are available.
199  * In addition, the following substitutions are also available:
200  *
201  * ${ORiginal}
202  *      The absolute path name of a file containing the common ancestor
203  *      version of ${MostRecent} and {$Input}.  Usually the version originally
204  *      copied into the change.  Usually in a temporary file.
205  * ${Most_Recent}
206  *      The absolute path name of a file containing the most recent version.
207  *      Usually in the baseline.
208  * ${Input}
209  *      The absolute path name of the edited version of the file.  Usually in
210  *      the development directory.
211  * ${Output}
212  *      The absolute path name of the file in which to write the difference
213  *      listing.  Usually in the development directory.
214  *
215  * An exit status of 0 means successful, even of the files differ (and they
216  * usually do).  An exit status which is non-zero means something is wrong.
217  *
218  * The "merge -L" options are used to specify labels for the baseline and the
219  *      development directory, respecticvely, when conflict lines are inserted
220  *      into the result.
221  * The "merge -p" options is used to specify that the results are to be printed
222  *      on the standard output.
223  */
224
225 diff3_command =
226         "set +e; \
227 merge -p -L baseline -L C$c ${quote $mostrecent} ${quote $original} \
228 ${quote $input} > ${quote $output}; \
229 test $? -le 1";
230
231 diff_command =
232         "set +e; \
233         diff -c ${quote $original} ${quote $input} > ${quote $output}; \
234         test $? -le 1";
235
236 /*
237  * We use a runtest.pl script to execute tests.  This takes care of
238  * massaging environment variables and the like to test agains the
239  * unpacked package in the current directory.
240  *
241  * Note that we must include $spe in the batch_test_command line (so
242  * that Aegis thinks we're smart about testing ourselves against the
243  * baseline) but we don't actually need it.  Our tests always run
244  * relative to the package built under the current directory, which
245  * is set appropriately during a baseline test.  So we just use the
246  * proper aesub variable to comment out the expanded $spe.
247  */
248 test_command = "python ${Source runtest.py Absolute} -p tar-gz -q ${File_Name}";
249
250 batch_test_command = "python ${Source runtest.py Absolute} -p tar-gz -o ${Output} ${File_Names} ${COMment $spe}";
251
252 new_test_filename = "test/CHANGETHIS.py";
253
254 /*
255  *
256  */
257 file_template =
258 [
259         {
260                 pattern = [ "src/engine/*__init__.py" ];
261                 body = "${read_file ${source template/__init__.py abs}}";
262         },
263         {
264                 pattern = [ "src/engine/*Tests.py" ];
265                 body = "${read_file ${source template/Tests.py abs}}";
266         },
267         {
268                 pattern = [ "src/engine/*.py" ];
269                 body = "${read_file ${source template/file.py abs}}";
270         },
271         {
272                 pattern = [ "test/*.py" ];
273                 body = "${read_file ${source template/test.py abs}}";
274         },
275 ];