From 77a56aa3f89a2cfa5b7e0b722ea867bf8d7d9680 Mon Sep 17 00:00:00 2001 From: Steven Knight Date: Sat, 28 Feb 2004 07:25:33 +0000 Subject: Document the dbm_module argument to SConsignFile(). --- doc/man/scons.1 | 21 +++++++++++++++++++-- test/Repository/variants.py | 12 ++++++------ 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/doc/man/scons.1 b/doc/man/scons.1 index 0b0756a..46a5dda 100644 --- a/doc/man/scons.1 +++ b/doc/man/scons.1 @@ -3287,9 +3287,9 @@ SConscript('bar/SConscript') # will chdir to bar '\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .TP -.RI SConsignFile([ file ]) +.RI SConsignFile([ file , dbm_module ]) .TP -.RI env.SConsignFile([ file ]) +.RI env.SConsignFile([ file , dbm_module ]) This tells .B scons to store all file signatures @@ -3306,6 +3306,23 @@ is not an absolute path name, the file is placed in the same directory as the top-level .B SConstruct file. + +The optional +.I dbm_module +argument can be used to specify +which Python database module +The default is to use +.B dumbdbm +if the specified +.I file +does not already exist, +and to use +.B anydbm +to auto-detect the database format +if the +.I file +already exists. + Examples: .ES diff --git a/test/Repository/variants.py b/test/Repository/variants.py index 7e438ec..a0cc2af 100644 --- a/test/Repository/variants.py +++ b/test/Repository/variants.py @@ -78,13 +78,13 @@ opts = "-Y " + test.workpath('repository') test.write(['repository', 'SConstruct'], r""" OS = ARGUMENTS.get('OS', '') build1_os = "#build1/" + OS -default_ccflags = Environment()['CCFLAGS'] +default = Environment() ccflags = { '' : '', 'foo' : '-DFOO', 'bar' : '-DBAR', } -env1 = Environment(CCFLAGS = default_ccflags + ' ' + ccflags[OS], +env1 = Environment(CCFLAGS = default.subst('$CCFLAGS %s' % ccflags[OS]), CPPPATH = build1_os) BuildDir(build1_os, 'src1') SConscript(build1_os + '/SConscript', "env1") @@ -101,8 +101,8 @@ env1.Program('xxx', ['aaa.c', 'bbb.c', 'main.c']) test.write(['repository', 'build2', 'foo', 'SConscript'], r""" BuildDir('src2', '#src2') -default_ccflags = Environment()['CCFLAGS'] -env2 = Environment(CCFLAGS = default_ccflags + ' -DFOO', +default = Environment() +env2 = Environment(CCFLAGS = default.subst('$CCFLAGS -DFOO'), CPPPATH = ['#src2/xxx', '#src2/include']) SConscript('src2/xxx/SConscript', "env2") @@ -111,8 +111,8 @@ SConscript('src2/xxx/SConscript', "env2") test.write(['repository', 'build2', 'bar', 'SConscript'], r""" BuildDir('src2', '#src2') -default_ccflags = Environment()['CCFLAGS'] -env2 = Environment(CCFLAGS = default_ccflags + ' -DBAR', +default = Environment() +env2 = Environment(CCFLAGS = default.subst('$CCFLAGS -DBAR'), CPPPATH = ['#src2/xxx', '#src2/include']) SConscript('src2/xxx/SConscript', "env2") -- cgit v0.12