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

ruby-changes:37129

From: nobu <ko1@a...>
Date: Sun, 11 Jan 2015 13:44:19 +0900 (JST)
Subject: [ruby-changes:37129] nobu:r49210 (trunk): extmk.rb: default without-ext

nobu	2015-01-11 13:44:09 +0900 (Sun, 11 Jan 2015)

  New Revision: 49210

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

  Log:
    extmk.rb: default without-ext
    
    * ext/extmk.rb: move the default execluded extensions from
      configure.in so that it works on win32 too.

  Modified files:
    trunk/configure.in
    trunk/ext/extmk.rb
Index: configure.in
===================================================================
--- configure.in	(revision 49209)
+++ configure.in	(revision 49210)
@@ -3241,12 +3241,7 @@ AC_ARG_WITH(ext, https://github.com/ruby/ruby/blob/trunk/configure.in#L3241
                            [pass to --with-ext option of extmk.rb]))
 AC_ARG_WITH(out-ext,
             AC_HELP_STRING([--with-out-ext=EXTS],
-                           [pass to --without-ext option of extmk.rb]),
-	    [], [
-	    AS_CASE($target_os,
-		[mswin*|mingw*],
-		[as_fn_append ac_configure_args ' --with-out-ext=pty,readline,syslog'],
-		[as_fn_append ac_configure_args ' --with-out-ext=*win32*'])])
+                           [pass to --without-ext option of extmk.rb]))
 EXTSTATIC=
 AC_SUBST(EXTSTATIC)dnl
 AC_ARG_WITH(static-linked-ext,
Index: ext/extmk.rb
===================================================================
--- ext/extmk.rb	(revision 49209)
+++ ext/extmk.rb	(revision 49210)
@@ -494,21 +494,23 @@ end unless $extstatic https://github.com/ruby/ruby/blob/trunk/ext/extmk.rb#L494
 
 ext_prefix = "#{$top_srcdir}/ext"
 exts = $static_ext.sort_by {|t, i| i}.collect {|t, i| t}
-withes, withouts = %w[--with --without].collect {|w|
+default_exclude_exts =
+  if $mswin or $mingw
+    %w'pty readline syslog'
+  else
+    %w'*win32*'
+  end
+withes, withouts = [["--with", nil], ["--without", default_exclude_exts]].collect {|w, d|
   if !(w = %w[-extensions -ext].collect {|o|arg_config(w+o)}).any?
-    nil
+    d ? proc {|c1| d.any?(&c1)} : proc {false}
   elsif (w = w.grep(String)).empty?
     proc {true}
   else
-    proc {|c1| w.collect {|o| o.split(/,/)}.flatten.any?(&c1)}
+    w = w.collect {|o| o.split(/,/)}.flatten
+    w.collect! {|o| o == '+' ? d : o}.flatten! if d
+    proc {|c1| w.any?(&c1)}
   end
 }
-if withes
-  withouts ||= proc {true}
-else
-  withes = proc {false}
-  withouts ||= withes
-end
 cond = proc {|ext, *|
   cond1 = proc {|n| File.fnmatch(n, ext)}
   withes.call(cond1) or !withouts.call(cond1)

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

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