pass extra variables into Environment.execute()

This commit is contained in:
josh committed 2013-06-26 21:32:08 -04:00
1 parent 116406c74d
commit 0f3a6accd7
3 files changed
+13 -4

No files matched your search

+5 -1
View File
@@ -23,7 +23,11 @@ module Rscons
'-o', o_file,
source
]
env.execute("CC #{o_file}", command)
vars = {
'TARGET' => o_file,
'SOURCES' => source,
}
env.execute("CC #{o_file}", command, vars)
Cache.open.register_build(target, [source])
end
o_file
+5 -1
View File
@@ -34,7 +34,11 @@ module Rscons
*env['LIBPATHS'].map {|lp| "-L#{lp}"},
*env['LIBS'].map {|lib| "-l#{lib}"}
]
env.execute("LINK #{target}", command)
vars = {
'TARGET' => target,
'SOURCES' => sources,
}
env.execute("LINK #{target}", command, vars)
Cache.open.register_build(target, sources)
end
target