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/trunk@26355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
281825d48d
commit
1b26041724
3 changed files with 32 additions and 29 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.
|
||||||
|
|
||||||
Tue Jan 19 14:19:26 2010 NAKAMURA Usaku <usa@ruby-lang.org>
|
Tue Jan 19 14:19:26 2010 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
* ext/zlib/{extconf.rb, zlib.c): crc32_combine and adler32_combine is
|
* ext/zlib/{extconf.rb, zlib.c): crc32_combine and adler32_combine is
|
||||||
|
|
15
Makefile.in
15
Makefile.in
|
@ -252,18 +252,17 @@ distclean-rdoc:
|
||||||
@$(RMALL) $(RDOCOUT:/=\)
|
@$(RMALL) $(RDOCOUT:/=\)
|
||||||
|
|
||||||
clean-ext distclean-ext realclean-ext::
|
clean-ext distclean-ext realclean-ext::
|
||||||
@set dummy ${EXTS}; shift; \
|
@cd ext; set dummy `echo "${EXTS}" | tr , ' '`; shift; \
|
||||||
if test "$$#" = 0; then \
|
test "$$#" = 0 && set .; \
|
||||||
set dummy `find ext -name Makefile | sed 's:^ext/::;s:/Makefile$$::' | sort`; \
|
set dummy `for dir; do \
|
||||||
shift; \
|
find $$dir -name Makefile | sed 's:^\./::;s:/Makefile$$:~:' | sort | sed 's:~$$::'; \
|
||||||
fi; \
|
done`; shift; \
|
||||||
for dir; do \
|
for dir; do \
|
||||||
[ -f "ext/$$dir/Makefile" ] || continue; \
|
|
||||||
echo $(@:-ext=)ing "$$dir"; \
|
echo $(@:-ext=)ing "$$dir"; \
|
||||||
(cd "ext/$$dir" && exec $(MAKE) $(MFLAGS) $(@:-ext=)) && \
|
(cd "$$dir" && exec $(MAKE) $(MFLAGS) $(@:-ext=)) && \
|
||||||
case "$@" in \
|
case "$@" in \
|
||||||
*distclean-ext*|*realclean-ext*) \
|
*distclean-ext*|*realclean-ext*) \
|
||||||
$(RMDIRS) "ext/$$dir";; \
|
$(RMDIRS) "$$dir";; \
|
||||||
esac; \
|
esac; \
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
40
ext/extmk.rb
40
ext/extmk.rb
|
@ -396,29 +396,27 @@ 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}")}
|
if not (w = %w[-extensions -ext].collect {|o|arg_config(w+o)}).any?
|
||||||
else
|
nil
|
||||||
withes, withouts = %w[--with --without].collect {|w|
|
elsif (w = w.grep(String)).empty?
|
||||||
if not (w = %w[-extensions -ext].collect {|o|arg_config(w+o)}).any?
|
proc {true}
|
||||||
nil
|
|
||||||
elsif (w = w.grep(String)).empty?
|
|
||||||
proc {true}
|
|
||||||
else
|
|
||||||
proc {|c1| w.collect {|o| o.split(/,/)}.flatten.any?(&c1)}
|
|
||||||
end
|
|
||||||
}
|
|
||||||
if withes
|
|
||||||
withouts ||= proc {true}
|
|
||||||
else
|
else
|
||||||
withes = proc {false}
|
proc {|c1| w.collect {|o| o.split(/,/)}.flatten.any?(&c1)}
|
||||||
withouts ||= withes
|
|
||||||
end
|
end
|
||||||
cond = proc {|ext, *|
|
}
|
||||||
cond1 = proc {|n| File.fnmatch(n, ext)}
|
if withes
|
||||||
withes.call(cond1) or !withouts.call(cond1)
|
withouts ||= proc {true}
|
||||||
}
|
else
|
||||||
exts |= Dir.glob("#{ext_prefix}/*/**/extconf.rb").collect {|d|
|
withes = proc {false}
|
||||||
|
withouts ||= withes
|
||||||
|
end
|
||||||
|
cond = proc {|ext, *|
|
||||||
|
cond1 = proc {|n| File.fnmatch(n, ext)}
|
||||||
|
withes.call(cond1) or !withouts.call(cond1)
|
||||||
|
}
|
||||||
|
($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