aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-15 13:31:54 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-15 13:31:54 +0000
commita96b6f060406c15d56f3cc6a493a8b3d59c3fed9 (patch)
treea844aa1128f6a30ce862bb0fb89376902f41c18e
parent868e180cefabbbf2ec8cf53ea9f58559468418d7 (diff)
downloadruby-a96b6f060406c15d56f3cc6a493a8b3d59c3fed9.tar.gz
* 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
-rw-r--r--ChangeLog6
-rw-r--r--common.mk5
-rw-r--r--ext/extmk.rb14
3 files changed, 21 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 702e2fd217..dca59a9bbf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
* keywords: enclose C code in declaration section by %{ and %}.
diff --git a/common.mk b/common.mk
index 4a81708540..133d0c0611 100644
--- a/common.mk
+++ b/common.mk
@@ -306,8 +306,11 @@ distclean-local:: clean-local
distclean-ext:
@-$(MINIRUBY) $(srcdir)/ext/extmk.rb $(EXTMK_ARGS) distclean
-realclean:: distclean
+realclean:: realclean-ext realclean-local
+realclean-local:: distclean-local
@$(RM) parse.c lex.c
+realclean-ext::
+ @-$(MINIRUBY) $(srcdir)/ext/extmk.rb $(EXTMK_ARGS) realclean
check: test test-all
diff --git a/ext/extmk.rb b/ext/extmk.rb
index e4b62c8553..1c34fa0aa1 100644
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -297,9 +297,9 @@ parse_args()
if target = ARGV.shift and /^[a-z-]+$/ =~ target
$mflags.push(target)
- target = target.sub(/^(dist|real)(?=(?:clean)?$)/, '')
case target
- when /clean/
+ when /^(dist|real)?(clean)$/
+ target = $2
$ignore ||= true
$clean = $1 ? $1[0] : true
when /^install\b/
@@ -427,7 +427,15 @@ if $ignore
Dir.chdir ".."
if $clean
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
exit
end