create requisite output directories for build targets; refactor common buile functionality into Builder#standard_build()
This commit is contained in:
1 parent
17c7bf1d31
commit
f13664331f
4 files changed
+19
-11
No files matched your search
@@ -21,12 +21,7 @@ module Rscons
|
||||
'SOURCES' => objects,
|
||||
})
|
||||
command = env.build_command(env['ARCOM'], vars)
|
||||
unless cache.up_to_date?(target, command, objects)
|
||||
FileUtils.rm_f(target)
|
||||
return false unless env.execute("AR #{target}", command)
|
||||
cache.register_build(target, command, objects)
|
||||
end
|
||||
target
|
||||
standard_build("AR #{target}", target, command, objects, env, cache)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -55,6 +55,8 @@ module Rscons
|
||||
end
|
||||
command = env.build_command(env["#{com_prefix}COM"], vars)
|
||||
unless cache.up_to_date?(target, command, sources)
|
||||
FileUtils.mkdir_p(File.dirname(target))
|
||||
FileUtils.rm_f(target)
|
||||
return false unless env.execute("#{com_prefix} #{target}", command)
|
||||
deps = sources
|
||||
if File.exists?(vars['DEPFILE'])
|
||||
|
||||
@@ -28,11 +28,7 @@ module Rscons
|
||||
'LD' => env['LD'] || ld_alt,
|
||||
})
|
||||
command = env.build_command(env['LDCOM'], vars)
|
||||
unless cache.up_to_date?(target, command, objects)
|
||||
return false unless env.execute("LD #{target}", command)
|
||||
cache.register_build(target, command, objects)
|
||||
end
|
||||
target
|
||||
standard_build("LD #{target}", target, command, objects, env, cache)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user