Remove the explicit path by correcting the dependencies.

This commit is contained in:
Russel Winder
2009-08-30 09:44:10 +01:00
parent b003e7ae97
commit 7232af85c9

View File

@@ -23,11 +23,8 @@ taskName = 'test0'
def createTestExecLinkerScript(target, source, env):
with open(target[0].path, 'w') as outFile:
####
#### TODO: Remove this dependency on the hardwired path.
####
with open('containers/posix/test0/linker.lds.in') as templateFile:
outFile.write(templateFile.read().replace('__PHYSICAL_BASE_FILE_NAME_MARKER__', source[0].path))
with open(source[0].path) as templateFile:
outFile.write(templateFile.read().replace('__PHYSICAL_BASE_FILE_NAME_MARKER__', source[1].path))
def createTestExecS(target, source, env):
with open(target[0].path, 'w') as outFile:
@@ -41,7 +38,7 @@ def createTestExecS(target, source, env):
testTaskEnvironment = environment.Clone()
testTaskEnvironment.Append(CPPPATH=['#' + testTaskEnvironment['posixServicesDirectory'] +'/libposix/include/posix'])
testExecLinkerScript = Command('#build/' + testTaskEnvironment['posixServicesDirectory'] +'/' + taskName + '/test_exec_linker.lds', testTaskEnvironment['physicalBaseLinkerScript'], createTestExecLinkerScript)
testExecLinkerScript = Command('#build/' + testTaskEnvironment['posixServicesDirectory'] +'/' + taskName + '/test_exec_linker.lds', ['linker.lds.in', testTaskEnvironment['physicalBaseLinkerScript']], createTestExecLinkerScript)
testExecEnvironment = testTaskEnvironment.Clone()
testExecEnvironment.Append(LINKFLAGS=['-T' + testExecLinkerScript[0].path])
testExec = testExecEnvironment.Program('test_exec', Glob('src/test_exec/*.[cS]'))