specify the type desired for some *SUFFIX variables when they are used
This commit is contained in:
parent
975f6b06c8
commit
37337f80d5
@ -6,13 +6,14 @@ module Rscons
|
|||||||
'CFLAGS' => [],
|
'CFLAGS' => [],
|
||||||
'CPPFLAGS' => [],
|
'CPPFLAGS' => [],
|
||||||
'OBJSUFFIX' => '.o',
|
'OBJSUFFIX' => '.o',
|
||||||
'CSUFFIX' => ['.c'],
|
'CSUFFIX' => '.c',
|
||||||
'CCCOM' => ['$CC', '-c', '-o', '$TARGET', '$CPPFLAGS', '$CFLAGS', '$SOURCES']
|
'CCCOM' => ['$CC', '-c', '-o', '$TARGET', '$CPPFLAGS', '$CFLAGS', '$SOURCES']
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.produces?(env, target, source)
|
def self.produces?(env, target, source)
|
||||||
target =~ /#{env['OBJSUFFIX']}$/ and env['CSUFFIX'].find {|ext| source =~ /#{ext}$/}
|
(env['OBJSUFFIX', :array].find {|os| target =~ /#{os}$/} and
|
||||||
|
env['CSUFFIX', :array].find {|cs| source =~ /#{cs}$/})
|
||||||
end
|
end
|
||||||
|
|
||||||
def run(env, target, source)
|
def run(env, target, source)
|
||||||
|
@ -19,7 +19,7 @@ module Rscons
|
|||||||
if source =~ /#{env['OBJSUFFIX']}$/ or source =~ /#{env['LIBSUFFIX']}$/
|
if source =~ /#{env['OBJSUFFIX']}$/ or source =~ /#{env['LIBSUFFIX']}$/
|
||||||
source
|
source
|
||||||
else
|
else
|
||||||
o_file = env.stem(source) + env['OBJSUFFIX']
|
o_file = env.stem(source) + env['OBJSUFFIX', :string]
|
||||||
builder_class = env.builders.values.find { |klass| klass.produces?(env, o_file, source) }
|
builder_class = env.builders.values.find { |klass| klass.produces?(env, o_file, source) }
|
||||||
if builder_class
|
if builder_class
|
||||||
builder = builder_class.new
|
builder = builder_class.new
|
||||||
|
Loading…
x
Reference in New Issue
Block a user