summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2014-03-02 08:15:01 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2014-03-02 08:15:01 +0900
commitba7ea507880430908735972b6d72c2bb4059b558 (patch)
tree4ef9fa8c61b6e26617481f975d5be4b11b0b643d
parent873fae9f4505a5f2b5146f969917e8b083269f36 (diff)
parent2543b712a3983137040dd660a5cb65be4f8a467b (diff)
downloadmruby-ba7ea507880430908735972b6d72c2bb4059b558.tar.gz
mruby-ba7ea507880430908735972b6d72c2bb4059b558.zip
Merge pull request #1777 from take-cheeze/command_improvement
Command improvements.
-rw-r--r--tasks/mruby_build.rake1
-rw-r--r--tasks/mruby_build_commands.rake12
-rw-r--r--travis_config.rb1
3 files changed, 11 insertions, 3 deletions
diff --git a/tasks/mruby_build.rake b/tasks/mruby_build.rake
index 3c0a67179..c65ad4c20 100644
--- a/tasks/mruby_build.rake
+++ b/tasks/mruby_build.rake
@@ -102,6 +102,7 @@ module MRuby
def enable_cxx_abi
return if @cxx_abi_enabled
compilers.each { |c| c.defines += %w(MRB_ENABLE_CXX_EXCEPTION) }
+ linker.command = cxx.command
@cxx_abi_enabled = true
end
diff --git a/tasks/mruby_build_commands.rake b/tasks/mruby_build_commands.rake
index b0965ea09..24a77206a 100644
--- a/tasks/mruby_build_commands.rake
+++ b/tasks/mruby_build_commands.rake
@@ -24,9 +24,17 @@ module MRuby
target
end
+ NotFoundCommands = {}
+
private
def _run(options, params={})
- sh build.filename(command) + ' ' + ( options % params )
+ return sh command + ' ' + ( options % params ) if NotFoundCommands.key? @command
+ begin
+ sh build.filename(command) + ' ' + ( options % params )
+ rescue RuntimeError
+ NotFoundCommands[@command] = true
+ _run options, params
+ end
end
end
@@ -225,7 +233,7 @@ module MRuby
def initialize(build)
super
@command = 'git'
- @flags = []
+ @flags = %w[--depth 1]
@clone_options = "clone %{flags} %{url} %{dir}"
@pull_options = "pull"
end
diff --git a/travis_config.rb b/travis_config.rb
index e29a066ec..4c9e623fe 100644
--- a/travis_config.rb
+++ b/travis_config.rb
@@ -32,6 +32,5 @@ MRuby::Build.new('cxx_abi') do |conf|
end
conf.enable_bintest = true
- conf.linker.command = 'g++'
enable_cxx_abi
end