X-Git-Url: http://git.tremily.us/?a=blobdiff_plain;f=config;h=b055bdb279db7b37b1e50800a32947900c0de254;hb=36b347e3a63383388882ba7e2ac522e4686c312e;hp=c7a62a32b139077a27ab1907bce83e2cb25c3f63;hpb=70dccfdd02539a2755d666ed76a1358a1012ee08;p=scons.git diff --git a/config b/config index c7a62a32..b055bdb2 100644 --- a/config +++ b/config @@ -1,64 +1,70 @@ /* - * aegis - project change supervisor - * This file is in the Public Domain, 1995, Peter Miller. - * - * MANIFEST: example use of make in project config file - * - * The make(1) program exists in many forms, usually one is available with each - * UNIX version. The one used in the writing of this section is GNU Make 3.70, - * avaiable by anonymous FTP from your nearest GNU archive site. GNU Make was - * chosen because it was the most powerful, it is widely avaiable (usually for - * little or no cost) and discussion of the alternatives (SunOS make, BSD 4.3 - * make, etc), would not be universally applicable. "Plain vanilla" make - * (with no transitive closure, no pattern rules, no functions) is not - * sufficiently capable to satisfy the demands placed on it by aegis. - * - * As mentioned in the Dependency Maintenance Tool chapter of the User Guide, - * make is not really sufficient, because it lacks dynamic include dependencies. - * However, GNU Make has a form of dynamic include dependencies, and it has a - * few quirks, but mostly works well. - * - * The other feature lacking in make is a search path. While GNU Make has - * functionality called VPATH, the implementation leaves something to be - * desired, and can't be used for the search path functionality required by - * aegis. Because of this, the create_symlinks_before_build field of the - * project config file is set to true so that aegis will arrange for the - * development directory to be fiull of symbolic links, making it appear that - * the entire project is in each change's development directory. + * MANIFEST: use of SCons in project config file to build itself + * + * SCons has a Repository feature, introduced in SCons 0.09, that was + * designed to work well with Aegis. */ /* - * The build_command field of the project config file is used to invoke the - * relevant build command. This command tells make where to find the rules. - * The ${s Makefile} expands to a path into the baseline during development - * if the file is not in the change. Look in aesub(5) for more information - * about command substitutions. + * The build_command field of the project config file is used to invoke + * the relevant build command. This command tells SCons where to find + * the rules. + * + * Our chicken-and-egg dilemma is this: we want to use the version of + * SCons under development in an Aegis change to build itself. But the + * pieces of SCons are likely only partly in this change, and partly in + * baselines. + * + * Python only imports things on a module-by-module basis--which is to + * say, once it finds __init__.py in a given directory, it assumes that + * all other files in that module are in the same directory. But that's + * not the way Aegis works, because if a file hasn't changed on the + * branch, it will only be in its parent's baseline directory. + * + * Aegis' mechanism for working around this sort of problem is to make + * symlinks to the proper baseline versions of each file, which makes + * it look like everything is in the local tree. That's unattractive, + * though, because we really want to eat our own dog food and use the + * SCons -Y options to pull things from the baseline repositories. + * + * So our solution (suggested by Anthony Roach) is a bootstrap.py script + * that does some Aegis-like searching through the baseline directories + * and makes a bootstrap copy of the version of SCons under development + * that we can use for building. After it makes this copy of SCons, it + * executes it with the same command-line arguments we supplied (and + * setting $SCONS_LIB_DIR to the right directory) so we can use it + * here with command-line options as if it were SCons itself. (Note, + * however, that bootstrap.py only understands the specific command-line + * options already in use here, so if you change the call below to add + * some other SCons options, you may have to modify bootstrap.py to + * recognize them. + * + * The ${Source bootstrap.py} substitution finds bootstrap.py wherever + * it may be in the Aegis baselines. + * + * The long -Y${SUBSTitute...} substitution takes the Aegis baseline + * search path and turns it into the right -Y command-line options for + * SCons. + * + * The rest of the substitutions (${DEVeloper}, etc.) should be obvious. + * + * Look in aesub(5) for more information about command substitutions. */ -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}"; +build_command = "python2.1 ${Source bootstrap.py} -Y${SUBSTitute : \\ -Y $Search_Path} date='${DAte %Y/%m/%d %H:%M:%S}' developer=${DEVeloper} version=${VERsion} change=${Change}"; /* - * The rules used in the User Guide all remove their targets before - * constructing them, which qualifies them for the following entry in the - * config file. The files must be removed first, otherwise the baseline would - * cease to be self-consistent. + * SCons removes its targets before constructing them, which qualifies it + * for the following entry in the config file. The files must be removed + * first, otherwise the baseline would cease to be self-consistent. */ + link_integration_directory = true; /* - * Another field to be set in this file is one which tells aegis to maintain - * symbolic links between the development directory and the basline. This also - * requires that rules remove their targets before constructing them, to ensure - * that development builds do not attempt to write their results onto the - * read-only versions in the baseline. - */ + * This is set temporarily to allow us to build using the SCons + * currently checked in to the src directory. create_symlinks_before_build = true; - -remove_symlinks_after_build = false; - -/* -integrate_begin_command = - ""; -*/ + */ /* * aegis - project change supervisor @@ -228,18 +234,33 @@ merge -p -L baseline -L C$c ${quote $mostrecent} ${quote $original} \ ${quote $input} > ${quote $output}; \ test $? -le 1"; +/* + * The diff command in Red Hat 8.0 changed the exit status so it *fails* + * when *it* thinks it's trying to diff a binary (non-ASCII-text) file. + * The -a option disables this behavior and makes diff's exit status + * behave like it used to, even on any binary files we have checked in. + */ + diff_command = "set +e; \ - diff -c ${quote $original} ${quote $input} > ${quote $output}; \ + diff -a -c ${quote $original} ${quote $input} > ${quote $output}; \ test $? -le 1"; /* - * We use an intermediary test.pl script to execute tests. - * This serves as glue between the tests themselves (which are - * written to conform to Perl conventions) and Aegis' expectations. - * See the comments in the test.pl script itself for details. + * We use a runtest.py script to execute tests. This takes care of + * massaging environment variables and the like to test against the + * unpacked package in the current directory. + * + * Note that we must include $spe in the batch_test_command line (so + * that Aegis thinks we're smart about testing ourselves against the + * baseline) but we don't actually need it. Our tests always run + * relative to the package built under the current directory, which + * is set appropriately during a baseline test. So we just use the + * proper aesub variable to comment out the expanded $spe. */ -test_command = "python ${Source runtest.py Absolute} -p tar-gz -q ${File_Name}"; +test_command = "python1.5 ${Source runtest.py Absolute} --noqmtest -p tar-gz -t -v ${SUBSTitute '\\.[CD][0-9]+$' '' ${VERsion}} -q --sp ${Search_Path} --spe ${Search_Path_Executable} ${File_Name}"; + +batch_test_command = "python1.5 ${Source runtest.py Absolute} --noqmtest -p tar-gz -t -v ${SUBSTitute '\\.[CD][0-9]+$' '' ${VERsion}} -o ${Output} --aegis --sp ${Search_Path} --spe ${Search_Path_Executable} ${File_Names}"; new_test_filename = "test/CHANGETHIS.py"; @@ -265,3 +286,14 @@ file_template = body = "${read_file ${source template/test.py abs}}"; }, ]; + +/* + * Command for distributing changes from Aegis to all of the repositories + * we want to mirror the information. + * + * XXX Uncomment after upgrading to an Aegis version that supports this. + +integrate_pass_notify_command = + "$sh ${s bin/scons-cdist} -p $project $change"; + * + */