rename check_executable to check_program
This commit is contained in:
1 parent
3b586cb476
commit
aba11155a4
10 files changed
+33
-33
No files matched your search
@@ -120,9 +120,9 @@ module Rscons
|
||||
co.check_lib(*cl)
|
||||
end
|
||||
end
|
||||
if ces = @script.check_executables
|
||||
if ces = @script.check_programs
|
||||
ces.each do |ce|
|
||||
co.check_executable(*ce)
|
||||
co.check_program(*ce)
|
||||
end
|
||||
end
|
||||
rescue ConfigureOp::ConfigureFailure
|
||||
|
||||
@@ -182,19 +182,19 @@ module Rscons
|
||||
common_config_checks(status, options)
|
||||
end
|
||||
|
||||
# Check for an executable.
|
||||
def check_executable(executable, options = {})
|
||||
$stdout.write("Checking for executable '#{executable}'... ")
|
||||
# Check for a executable program.
|
||||
def check_program(program, options = {})
|
||||
$stdout.write("Checking for program '#{program}'... ")
|
||||
found = false
|
||||
if executable["/"] or executable["\\"]
|
||||
if File.file?(executable) and File.executable?(executable)
|
||||
if program["/"] or program["\\"]
|
||||
if File.file?(program) and File.executable?(program)
|
||||
found = true
|
||||
success_message = executable
|
||||
success_message = program
|
||||
end
|
||||
else
|
||||
path_entries = ENV["PATH"].split(File::PATH_SEPARATOR)
|
||||
path_entries.find do |path_entry|
|
||||
if path = test_path_for_executable(path_entry, executable)
|
||||
if path = test_path_for_executable(path_entry, program)
|
||||
found = true
|
||||
success_message = path
|
||||
end
|
||||
|
||||
@@ -66,10 +66,10 @@ module Rscons
|
||||
@script.check_libs << args
|
||||
end
|
||||
|
||||
# Check for an executable.
|
||||
def check_executable(*args)
|
||||
@script.check_executables ||= []
|
||||
@script.check_executables << args
|
||||
# Check for an executable program.
|
||||
def check_program(*args)
|
||||
@script.check_programs ||= []
|
||||
@script.check_programs << args
|
||||
end
|
||||
end
|
||||
|
||||
@@ -107,7 +107,7 @@ module Rscons
|
||||
|
||||
# @return [Array<Array>]
|
||||
# Executables to check for.
|
||||
attr_accessor :check_executables
|
||||
attr_accessor :check_programs
|
||||
|
||||
# @return [Boolean]
|
||||
# Whether to autoconfigure if the user does not explicitly perform a
|
||||
|
||||
Reference in new issue
Block a user