summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-11 04:44:09 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-11 04:44:09 +0000
commitae752cc546eeddb749604ca1cf4e83ee740ca47c (patch)
treede996326296ba391de184cba35e01a4e7a795323
parentd201761daef65a3a164003e4877d3a6238e269a3 (diff)
extmk.rb: default without-ext
* ext/extmk.rb: move the default execluded extensions from configure.in so that it works on win32 too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--configure.in7
-rwxr-xr-xext/extmk.rb20
2 files changed, 12 insertions, 15 deletions
diff --git a/configure.in b/configure.in
index 657e76cf38..599a22ee2e 100644
--- a/configure.in
+++ b/configure.in
@@ -3241,12 +3241,7 @@ AC_ARG_WITH(ext,
[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,
diff --git a/ext/extmk.rb b/ext/extmk.rb
index 850461a359..77a2d87700 100755
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -494,21 +494,23 @@ end unless $extstatic
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)