fix PROGSUFFIX handling - close #29
This commit is contained in:
1 parent
d31b4725d2
commit
1880e6650e
6 files changed
+34
-4
No files matched your search
@@ -36,6 +36,8 @@ module Rscons
|
||||
# The user-supplied target name.
|
||||
# @option options [Array<String>] :sources
|
||||
# The user-supplied source file name(s).
|
||||
# @option options [Hash,VarSet] :vars
|
||||
# Extra construction variables.
|
||||
#
|
||||
# @return [BuildTarget]
|
||||
def create_build_target(options)
|
||||
|
||||
@@ -39,9 +39,10 @@ module Rscons
|
||||
#
|
||||
# @return [BuildTarget]
|
||||
def create_build_target(options)
|
||||
env, target, vars = options.values_at(:env, :target, :vars)
|
||||
my_options = options.dup
|
||||
unless my_options[:target] =~ /\./
|
||||
my_options[:target] += options[:env].expand_varref("${PROGSUFFIX}")
|
||||
unless env.expand_varref(target, vars) =~ /\./
|
||||
my_options[:target] += env.expand_varref("${PROGSUFFIX}", vars)
|
||||
end
|
||||
super(my_options)
|
||||
end
|
||||
|
||||
@@ -409,7 +409,7 @@ module Rscons
|
||||
end
|
||||
sources = Array(sources)
|
||||
builder = @builders[method.to_s]
|
||||
build_target = builder.create_build_target(env: self, target: target, sources: sources)
|
||||
build_target = builder.create_build_target(env: self, target: target, sources: sources, vars: vars)
|
||||
add_target(build_target.to_s, builder, sources, vars || {}, rest)
|
||||
build_target
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user