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

ruby-changes:38723

From: nobu <ko1@a...>
Date: Tue, 9 Jun 2015 15:58:37 +0900 (JST)
Subject: [ruby-changes:38723] nobu:r50804 (trunk): mkmf.rb: macro assigments

nobu	2015-06-09 15:58:18 +0900 (Tue, 09 Jun 2015)

  New Revision: 50804

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=50804

  Log:
    mkmf.rb: macro assigments
    
    * lib/mkmf.rb ($configure_args): store macro assigments as-is, not
      only in option style.  e.g., ruby extconf.rb optflags=-O0

  Modified files:
    trunk/lib/mkmf.rb
Index: lib/mkmf.rb
===================================================================
--- lib/mkmf.rb	(revision 50803)
+++ lib/mkmf.rb	(revision 50804)
@@ -98,22 +98,16 @@ module MakeMakefile https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L98
       arg, val = arg.split('=', 2)
       next unless arg
       arg.tr!('_', '-')
-      if arg.sub!(/^(?!--)/, '--')
-        val or next
-        arg.downcase!
-      end
-      next if /^--(?:top|topsrc|src|cur)dir$/ =~ arg
+      next if /\A(--)?(?:top|topsrc|src|cur)dir\z/i =~ arg
       $configure_args[arg] = val || true
+      $configure_args["--#{arg.downcase}"] = val if val and /\A--/ !~ arg
     end
     for arg in ARGV
       arg, val = arg.split('=', 2)
       next unless arg
       arg.tr!('_', '-')
-      if arg.sub!(/^(?!--)/, '--')
-        val or next
-        arg.downcase!
-      end
       $configure_args[arg] = val || true
+      $configure_args["--#{arg.downcase}"] = val if val and /\A--/ !~ arg
     end
   end
 

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

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