mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
extmk.rb: GNU make -C option
* ext/extmk.rb: use -C option for GNU make instead of shell. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
876bfc6b4e
commit
0b4e4b20cb
3 changed files with 15 additions and 3 deletions
|
@ -119,7 +119,8 @@ SCRIPT_ARGS = --dest-dir="$(DESTDIR)" \
|
|||
--mflags="$(MFLAGS)" \
|
||||
--make-flags="$(MAKEFLAGS)"
|
||||
EXTMK_ARGS = $(SCRIPT_ARGS) --extension $(EXTS) --extstatic $(EXTSTATIC) \
|
||||
--make-flags="V=$(V) MINIRUBY='$(MINIRUBY)'" --
|
||||
--make-flags="V=$(V) MINIRUBY='$(MINIRUBY)'" --gnumake=$(gnumake) \
|
||||
--
|
||||
INSTRUBY = $(SUDO) $(RUNRUBY) -r./$(arch)-fake $(srcdir)/tool/rbinstall.rb
|
||||
INSTRUBY_ARGS = $(SCRIPT_ARGS) \
|
||||
--data-mode=$(INSTALL_DATA_MODE) \
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
# -*- makefile-gmake -*-
|
||||
gnumake = yes
|
||||
|
||||
TEST_TARGETS := $(filter check test check% test% btest%,$(MAKECMDGOALS))
|
||||
TEST_TARGETS += $(subst check,test-all,$(patsubst check-%,test-%,$(TEST_TARGETS)))
|
||||
TEST_TARGETS := $(patsubst test-%,yes-test-%,$(patsubst btest-%,yes-btest-%,$(TEST_TARGETS)))
|
||||
|
|
13
ext/extmk.rb
13
ext/extmk.rb
|
@ -371,6 +371,9 @@ def parse_args()
|
|||
opts.on('--command-output=FILE', String) do |v|
|
||||
$command_output = v
|
||||
end
|
||||
opts.on('--gnumake=yes|no', true) do |v|
|
||||
$gnumake = v
|
||||
end
|
||||
end
|
||||
begin
|
||||
$optparser.parse!(ARGV)
|
||||
|
@ -718,10 +721,16 @@ if $configure_only and $command_output
|
|||
mf.puts "#{tgt}:\n\t#{submake} $@"
|
||||
end
|
||||
mf.puts
|
||||
exec = config_string("exec") {|str| str + " "}
|
||||
if $gnumake == "yes"
|
||||
submake = "$(MAKE) -C $(@D)"
|
||||
else
|
||||
submake = "cd $(@D) && "
|
||||
config_string("exec") {|str| submake << str << " "}
|
||||
submake << "$(MAKE)"
|
||||
end
|
||||
targets.each do |tgt|
|
||||
exts.each do |d|
|
||||
mf.puts "#{d[0..-2]}#{tgt}:\n\t$(Q)cd $(@D) && #{exec}$(MAKE) $(MFLAGS) V=$(V) $(@F)"
|
||||
mf.puts "#{d[0..-2]}#{tgt}:\n\t$(Q)#{submake} $(MFLAGS) V=$(V) $(@F)"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue