From: stevenknight Date: Sat, 28 Feb 2004 07:25:33 +0000 (+0000) Subject: Document the dbm_module argument to SConsignFile(). X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5c5735a4870b62d063a2d8b2fc44bb9e683ae1db;p=scons.git Document the dbm_module argument to SConsignFile(). git-svn-id: http://scons.tigris.org/svn/scons/trunk@909 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- diff --git a/doc/man/scons.1 b/doc/man/scons.1 index 0b0756ad..46a5dda4 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 7e438ecf..a0cc2afc 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")