mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* common.mk (realclean): separate local and ext.
* ext/extmk.rb: not remove unrelated directories. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
868e180cef
commit
a96b6f0604
3 changed files with 21 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Fri Jun 15 22:33:29 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* common.mk (realclean): separate local and ext.
|
||||||
|
|
||||||
|
* ext/extmk.rb: not remove unrelated directories.
|
||||||
|
|
||||||
Fri Jun 15 20:50:02 2007 Tanaka Akira <akr@fsij.org>
|
Fri Jun 15 20:50:02 2007 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* keywords: enclose C code in declaration section by %{ and %}.
|
* keywords: enclose C code in declaration section by %{ and %}.
|
||||||
|
|
|
@ -306,8 +306,11 @@ distclean-local:: clean-local
|
||||||
distclean-ext:
|
distclean-ext:
|
||||||
@-$(MINIRUBY) $(srcdir)/ext/extmk.rb $(EXTMK_ARGS) distclean
|
@-$(MINIRUBY) $(srcdir)/ext/extmk.rb $(EXTMK_ARGS) distclean
|
||||||
|
|
||||||
realclean:: distclean
|
realclean:: realclean-ext realclean-local
|
||||||
|
realclean-local:: distclean-local
|
||||||
@$(RM) parse.c lex.c
|
@$(RM) parse.c lex.c
|
||||||
|
realclean-ext::
|
||||||
|
@-$(MINIRUBY) $(srcdir)/ext/extmk.rb $(EXTMK_ARGS) realclean
|
||||||
|
|
||||||
check: test test-all
|
check: test test-all
|
||||||
|
|
||||||
|
|
14
ext/extmk.rb
14
ext/extmk.rb
|
@ -297,9 +297,9 @@ parse_args()
|
||||||
|
|
||||||
if target = ARGV.shift and /^[a-z-]+$/ =~ target
|
if target = ARGV.shift and /^[a-z-]+$/ =~ target
|
||||||
$mflags.push(target)
|
$mflags.push(target)
|
||||||
target = target.sub(/^(dist|real)(?=(?:clean)?$)/, '')
|
|
||||||
case target
|
case target
|
||||||
when /clean/
|
when /^(dist|real)?(clean)$/
|
||||||
|
target = $2
|
||||||
$ignore ||= true
|
$ignore ||= true
|
||||||
$clean = $1 ? $1[0] : true
|
$clean = $1 ? $1[0] : true
|
||||||
when /^install\b/
|
when /^install\b/
|
||||||
|
@ -427,7 +427,15 @@ if $ignore
|
||||||
Dir.chdir ".."
|
Dir.chdir ".."
|
||||||
if $clean
|
if $clean
|
||||||
Dir.rmdir('ext') rescue nil
|
Dir.rmdir('ext') rescue nil
|
||||||
FileUtils.rm_rf(extout) if $extout
|
if $extout
|
||||||
|
FileUtils.rm_rf([extout+"/common", extout+"/include/ruby"])
|
||||||
|
FileUtils.rm_rf(extout+"/"+CONFIG["arch"])
|
||||||
|
if $clean != true
|
||||||
|
FileUtils.rm_rf(extout+"/include/"+CONFIG["arch"])
|
||||||
|
Dir.rmdir(extout+"/include") rescue nil
|
||||||
|
Dir.rmdir(extout) rescue nil
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
exit
|
exit
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue