p = os.path.join('build', 'etc', file)
if os.path.islink(p):
os.unlink(p)
- env.Command(os.path.join('#' + p), file, copy)
+ sp = '#' + p
+ env.Command(sp, file, copy)
+ Local(sp)
From Charles Crain and Steven Knight:
- - Add Repository() functionality.
+ - Add Repository() functionality, including the -Y option.
From Steven Knight:
if not hasattr(target, 'cpppath'):
try:
- target.cpppath = tuple(fs.Rsearchall(SCons.Util.mapPaths(env['CPPPATH'], target.cwd), clazz=SCons.Node.FS.Dir))
+ target.cpppath = tuple(fs.Rsearchall(SCons.Util.mapPaths(env['CPPPATH'], target.cwd), clazz=SCons.Node.FS.Dir, must_exist=0))
except KeyError:
target.cpppath = ()
test.write(['work', 'src', 'fff.c'], """
#include <iii.h>
+#include <jjj.h>
int main()
{
os.chdir(test.workpath('work'))
fs = SCons.Node.FS.FS(test.workpath('work'))
fs.Repository(test.workpath('repository'))
+
+ # Create a derived file in a directory that does not exist yet.
+ # This was a bug at one time.
+ f1=fs.File('include2/jjj.h')
+ f1.builder=1
s = SCons.Scanner.C.CScan(fs=fs)
- env = DummyEnvironment(['include'])
+ env = DummyEnvironment(['include', 'include2'])
deps = s.scan(fs.File('src/fff.c'), env, DummyTarget())
- deps_match(self, deps, [test.workpath('repository/include/iii.h')])
+ deps_match(self, deps, [ test.workpath('repository/include/iii.h'), 'include2/jjj.h' ])
os.chdir(test.workpath(''))
class CScannerTestCase12(unittest.TestCase):
if not hasattr(target, 'f77path'):
try:
- target.f77path = tuple(fs.Rsearchall(SCons.Util.mapPaths(env['F77PATH'], target.cwd), clazz=SCons.Node.FS.Dir))
+ target.f77path = tuple(fs.Rsearchall(SCons.Util.mapPaths(env['F77PATH'], target.cwd), clazz=SCons.Node.FS.Dir, must_exist=0))
except KeyError:
target.f77path = ()
test.write(['work', 'src', 'fff.f'], """
PROGRAM FOO
INCLUDE 'iii.f'
+ INCLUDE 'jjj.f'
STOP
END
""")
os.chdir(test.workpath('work'))
fs = SCons.Node.FS.FS(test.workpath('work'))
fs.Repository(test.workpath('repository'))
+
+ # Create a derived file in a directory that does not exist yet.
+ # This was a bug at one time.
+ f1=fs.File('include2/jjj.f')
+ f1.builder=1
s = SCons.Scanner.Fortran.FortranScan(fs=fs)
- env = DummyEnvironment(['include'])
+ env = DummyEnvironment(['include','include2'])
deps = s.scan(fs.File('src/fff.f'), env, DummyTarget())
- deps_match(self, deps, [test.workpath('repository/include/iii.f')])
+ deps_match(self, deps, [test.workpath('repository/include/iii.f'), 'include2/jjj.f'])
os.chdir(test.workpath(''))
class FortranScannerTestCase14(unittest.TestCase):