update JobSet interface to just take a Hash of job parameters
This commit is contained in:
parent
9cfc0c20b7
commit
d46dc2014c
@ -400,7 +400,11 @@ module Rscons
|
|||||||
sources: sources,
|
sources: sources,
|
||||||
env: self,
|
env: self,
|
||||||
vars: vars)
|
vars: vars)
|
||||||
@job_set.add_job(builder, target, sources, vars)
|
@job_set.add_job(
|
||||||
|
builder: builder,
|
||||||
|
target: target,
|
||||||
|
sources: sources,
|
||||||
|
vars: vars)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Manually record a given target as depending on the specified files.
|
# Manually record a given target as depending on the specified files.
|
||||||
|
@ -11,26 +11,23 @@ module Rscons
|
|||||||
|
|
||||||
# Add a job to the JobSet.
|
# Add a job to the JobSet.
|
||||||
#
|
#
|
||||||
# @param target [Symbol, String]
|
# @param options [Hash]
|
||||||
|
# Options.
|
||||||
|
# @option options [Symbol, String] :target
|
||||||
# Build target name.
|
# Build target name.
|
||||||
# @param builder [Builder]
|
# @option options [Builder] :builder
|
||||||
# The {Builder} to use to build the target.
|
# The {Builder} to use to build the target.
|
||||||
# @param sources [Array<String>]
|
# @option options [Array<String>] :sources
|
||||||
# Source file name(s).
|
# Source file name(s).
|
||||||
# @param vars [Hash]
|
# @option options [Hash] :vars
|
||||||
# Construction variable overrides.
|
# Construction variable overrides.
|
||||||
def add_job(builder, target, sources, vars)
|
def add_job(options)
|
||||||
# We allow multiple jobs to be registered per target for cases like:
|
# We allow multiple jobs to be registered per target for cases like:
|
||||||
# env.Directory("dest")
|
# env.Directory("dest")
|
||||||
# env.Install("dest", "bin")
|
# env.Install("dest", "bin")
|
||||||
# env.Install("dest", "share")
|
# env.Install("dest", "share")
|
||||||
@jobs[target] ||= []
|
@jobs[options[:target]] ||= []
|
||||||
@jobs[target] << {
|
@jobs[options[:target]] << options
|
||||||
builder: builder,
|
|
||||||
target: target,
|
|
||||||
sources: sources,
|
|
||||||
vars: vars,
|
|
||||||
}
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Get the next job that is ready to run from the JobSet.
|
# Get the next job that is ready to run from the JobSet.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user