remove a few deprecated methods - #84
This commit is contained in:
1 parent
31ef45258f
commit
12f1909d35
8 files changed
+16
-202
No files matched your search
@@ -180,33 +180,6 @@ module Rscons
|
||||
def finalize(options)
|
||||
end
|
||||
|
||||
# Check if the cache is up to date for the target and if not execute the
|
||||
# build command. This method does not support parallelization.
|
||||
#
|
||||
# @param short_cmd_string [String]
|
||||
# Short description of build action to be printed when env.echo ==
|
||||
# :short.
|
||||
# @param target [String] Name of the target file.
|
||||
# @param command [Array<String>]
|
||||
# The command to execute to build the target.
|
||||
# @param sources [Array<String>] Source file name(s).
|
||||
# @param env [Environment] The Environment executing the builder.
|
||||
# @param cache [Cache] The Cache object.
|
||||
#
|
||||
# @return [String,false]
|
||||
# The name of the target on success or false on failure.
|
||||
def standard_build(short_cmd_string, target, command, sources, env, cache)
|
||||
unless cache.up_to_date?(target, command, sources, env)
|
||||
unless Rscons.phony_target?(target)
|
||||
cache.mkdir_p(File.dirname(target))
|
||||
FileUtils.rm_f(target)
|
||||
end
|
||||
return false unless env.execute(short_cmd_string, command)
|
||||
cache.register_build(target, command, sources, env)
|
||||
end
|
||||
target
|
||||
end
|
||||
|
||||
# Check if the cache is up to date for the target and if not create a
|
||||
# {ThreadedCommand} object to execute the build command in a thread.
|
||||
#
|
||||
|
||||
@@ -336,27 +336,6 @@ module Rscons
|
||||
@job_set.clear!
|
||||
end
|
||||
|
||||
# Execute a builder command.
|
||||
#
|
||||
# @param short_desc [String] Message to print if the Environment's echo
|
||||
# mode is set to :short
|
||||
# @param command [Array] The command to execute.
|
||||
# @param options [Hash] Optional options, possible keys:
|
||||
# - :env - environment Hash to pass to Kernel#system.
|
||||
# - :options - options Hash to pass to Kernel#system.
|
||||
#
|
||||
# @return [true,false,nil] Return value from Kernel.system().
|
||||
def execute(short_desc, command, options = {})
|
||||
print_builder_run_message(short_desc, command)
|
||||
env_args = options[:env] ? [options[:env]] : []
|
||||
options_args = options[:options] ? [options[:options]] : []
|
||||
system(*env_args, *Rscons.command_executer, *command, *options_args).tap do |result|
|
||||
unless result or @echo == :command
|
||||
print_failed_command(command)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Define a build target.
|
||||
#
|
||||
# @param method [Symbol] Method name.
|
||||
@@ -468,39 +447,6 @@ module Rscons
|
||||
@user_deps[target]
|
||||
end
|
||||
|
||||
# Build a list of source files into files containing one of the suffixes
|
||||
# given by suffixes.
|
||||
#
|
||||
# This method is used internally by Rscons builders.
|
||||
#
|
||||
# @deprecated Use {#register_builds} instead.
|
||||
#
|
||||
# @param sources [Array<String>] List of source files to build.
|
||||
# @param suffixes [Array<String>]
|
||||
# List of suffixes to try to convert source files into.
|
||||
# @param cache [Cache] The Cache.
|
||||
# @param vars [Hash] Extra variables to pass to the builder.
|
||||
#
|
||||
# @return [Array<String>] List of the converted file name(s).
|
||||
def build_sources(sources, suffixes, cache, vars)
|
||||
sources.map do |source|
|
||||
if source.end_with?(*suffixes)
|
||||
source
|
||||
else
|
||||
converted = nil
|
||||
suffixes.each do |suffix|
|
||||
converted_fname = get_build_fname(source, suffix)
|
||||
if builder = find_builder_for(converted_fname, source, [])
|
||||
converted = run_builder(builder, converted_fname, [source], cache, vars)
|
||||
return nil unless converted
|
||||
break
|
||||
end
|
||||
end
|
||||
converted or raise "Could not find a builder to handle #{source.inspect}."
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Find and register builders to build source files into files containing
|
||||
# one of the suffixes given by suffixes.
|
||||
#
|
||||
|
||||
Reference in new issue
Block a user