mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* Makefile.in (clean-ext): allow glob patterns.
* ext/extmk.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@26355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
040fef9a89
commit
e07bce5e5c
3 changed files with 37 additions and 26 deletions
|
|
@ -1,3 +1,9 @@
|
||||||
|
Tue Jan 19 14:29:16 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* Makefile.in (clean-ext): allow glob patterns.
|
||||||
|
|
||||||
|
* ext/extmk.rb: ditto.
|
||||||
|
|
||||||
Mon Jan 18 17:16:03 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Mon Jan 18 17:16:03 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* lib/webrick/httpservlet/filehandler.rb (make_partial_content):
|
* lib/webrick/httpservlet/filehandler.rb (make_partial_content):
|
||||||
|
|
|
||||||
17
Makefile.in
17
Makefile.in
|
|
@ -178,11 +178,18 @@ distclean-local::
|
||||||
-$(RM) $(INSTALLED_LIST)
|
-$(RM) $(INSTALLED_LIST)
|
||||||
|
|
||||||
clean-ext distclean-ext realclean-ext::
|
clean-ext distclean-ext realclean-ext::
|
||||||
@find ext -name Makefile | sort | while read mk; do \
|
@cd ext; set dummy `echo "${EXTS}" | tr , ' '`; shift; \
|
||||||
dir=`dirname "$$mk"`; \
|
test "$$#" = 0 && set .; \
|
||||||
echo $(@:-ext=)ing `expr "$$dir" : 'ext/\(.*\)'`; \
|
set dummy `for dir; do \
|
||||||
(cd "$$dir"; $(MAKE) $(MFLAGS) $(@:-ext=)) && \
|
find $$dir -name Makefile | sed 's:^\./::;s:/Makefile$$:~:' | sort | sed 's:~$$::'; \
|
||||||
test $@ = clean-ext || rmdir -p "$$dir" 2> /dev/null; \
|
done`; shift; \
|
||||||
|
for dir; do \
|
||||||
|
echo $(@:-ext=)ing "$$dir"; \
|
||||||
|
(cd "$$dir" && exec $(MAKE) $(MFLAGS) $(@:-ext=)) && \
|
||||||
|
case "$@" in \
|
||||||
|
*distclean-ext*|*realclean-ext*) \
|
||||||
|
rmdir -p "$$dir" 2> /dev/null;; \
|
||||||
|
esac; \
|
||||||
done
|
done
|
||||||
|
|
||||||
ext/extinit.$(OBJEXT): ext/extinit.c $(SETUP)
|
ext/extinit.$(OBJEXT): ext/extinit.c $(SETUP)
|
||||||
|
|
|
||||||
20
ext/extmk.rb
20
ext/extmk.rb
|
|
@ -397,10 +397,7 @@ end unless $extstatic
|
||||||
|
|
||||||
ext_prefix = "#{$top_srcdir}/ext"
|
ext_prefix = "#{$top_srcdir}/ext"
|
||||||
exts = $static_ext.sort_by {|t, i| i}.collect {|t, i| t}
|
exts = $static_ext.sort_by {|t, i| i}.collect {|t, i| t}
|
||||||
if $extension
|
withes, withouts = %w[--with --without].collect {|w|
|
||||||
exts |= $extension.select {|d| File.directory?("#{ext_prefix}/#{d}")}
|
|
||||||
else
|
|
||||||
withes, withouts = %w[--with --without].collect {|w|
|
|
||||||
if not (w = %w[-extensions -ext].collect {|o|arg_config(w+o)}).any?
|
if not (w = %w[-extensions -ext].collect {|o|arg_config(w+o)}).any?
|
||||||
nil
|
nil
|
||||||
elsif (w = w.grep(String)).empty?
|
elsif (w = w.grep(String)).empty?
|
||||||
|
|
@ -408,18 +405,19 @@ else
|
||||||
else
|
else
|
||||||
proc {|c1| w.collect {|o| o.split(/,/)}.flatten.any?(&c1)}
|
proc {|c1| w.collect {|o| o.split(/,/)}.flatten.any?(&c1)}
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
if withes
|
if withes
|
||||||
withouts ||= proc {true}
|
withouts ||= proc {true}
|
||||||
else
|
else
|
||||||
withes = proc {false}
|
withes = proc {false}
|
||||||
withouts ||= withes
|
withouts ||= withes
|
||||||
end
|
end
|
||||||
cond = proc {|ext, *|
|
cond = proc {|ext, *|
|
||||||
cond1 = proc {|n| File.fnmatch(n, ext)}
|
cond1 = proc {|n| File.fnmatch(n, ext)}
|
||||||
withes.call(cond1) or !withouts.call(cond1)
|
withes.call(cond1) or !withouts.call(cond1)
|
||||||
}
|
}
|
||||||
exts |= Dir.glob("#{ext_prefix}/*/**/extconf.rb").collect {|d|
|
($extension || %w[*]).each do |e|
|
||||||
|
exts |= Dir.glob("#{ext_prefix}/#{e}/**/extconf.rb").collect {|d|
|
||||||
d = File.dirname(d)
|
d = File.dirname(d)
|
||||||
d.slice!(0, ext_prefix.length + 1)
|
d.slice!(0, ext_prefix.length + 1)
|
||||||
d
|
d
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue