[前][次][番号順一覧][スレッド一覧]

ruby-changes:66278

From: Nobuyoshi <ko1@a...>
Date: Fri, 21 May 2021 10:40:20 +0900 (JST)
Subject: [ruby-changes:66278] 9edad0df74 (master): Remove short options with argument [Bug #17870]

https://git.ruby-lang.org/ruby.git/commit/?id=9edad0df74

From 9edad0df74c6ad39281852cca9793fc7dba5c81f Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Fri, 21 May 2021 10:34:28 +0900
Subject: Remove short options with argument [Bug #17870]

Remove GNU make `-O` and `-W` options which are short but followed
by an argument, so that `$mflags.set?(?n)` does not return `true`
wrongly.
---
 defs/gmake.mk     | 1 +
 tool/rbinstall.rb | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/defs/gmake.mk b/defs/gmake.mk
index 316ff18..dc749b8 100644
--- a/defs/gmake.mk
+++ b/defs/gmake.mk
@@ -9,6 +9,7 @@ nproc = $(subst -j,,$(filter -j%,$(MFLAGS))) https://github.com/ruby/ruby/blob/trunk/defs/gmake.mk#L9
 ifneq ($(filter %darwin%,$(arch)),)
 INSTRUBY_ENV += SDKROOT=/
 endif
+INSTRUBY_ARGS += --gnumake
 
 CHECK_TARGETS := great exam love check test check% test% btest%
 # expand test targets, and those dependents
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index 141b670..b7370a8 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -56,6 +56,7 @@ def parse_args(argv = ARGV) https://github.com/ruby/ruby/blob/trunk/tool/rbinstall.rb#L56
                 File.exist?("rubystub.exe") ? 'exe' : 'cmd'
               end)
   mflags = []
+  gnumake = false
   opt = OptionParser.new
   opt.on('-n', '--dry-run') {$dryrun = true}
   opt.on('--dest-dir=DIR') {|dir| $destdir = dir}
@@ -91,6 +92,7 @@ def parse_args(argv = ARGV) https://github.com/ruby/ruby/blob/trunk/tool/rbinstall.rb#L92
   opt.on('--html-output [DIR]') {|dir| $htmldir = dir}
   opt.on('--cmd-type=TYPE', %w[cmd plain]) {|cmd| $cmdtype = (cmd unless cmd == 'plain')}
   opt.on('--[no-]strip') {|strip| $strip = strip}
+  opt.on('--gnumake') {gnumake = true}
 
   opt.order!(argv) do |v|
     case v
@@ -113,6 +115,7 @@ def parse_args(argv = ARGV) https://github.com/ruby/ruby/blob/trunk/tool/rbinstall.rb#L115
   $make, *rest = Shellwords.shellwords($make)
   $mflags.unshift(*rest) unless rest.empty?
   $mflags.unshift(*mflags)
+  $mflags.reject! {|v| /\A-[OW]/ =~ v} if gnumake
 
   def $mflags.set?(flag)
     grep(/\A-(?!-).*#{flag.chr}/i) { return true }
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]