aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-04-22 09:25:16 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-04-22 09:25:16 +0000
commit7b9431d98d37f57813fbcb1b72bd312f47f439a9 (patch)
treea1fa9f16e766b357d51345d99d17da7a508b948b
parent074852e54071117d3fec0672154e33124e635730 (diff)
downloadruby-7b9431d98d37f57813fbcb1b72bd312f47f439a9.tar.gz
* common.mk, ext/extmk.rb: make ext and .ext get removed by distclean.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--common.mk2
-rw-r--r--ext/extmk.rb9
3 files changed, 10 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 6813e5a9c7..25323bd47a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Apr 22 18:25:10 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * common.mk, ext/extmk.rb: make ext and .ext get removed by distclean.
+
Thu Apr 22 10:07:01 2004 NAKAMURA Usaku <usa@ruby-lang.org>
* */Makefile.sub (distclean-local): should remove $(RBCONFIG).
diff --git a/common.mk b/common.mk
index c60371e319..a7bb2251cd 100644
--- a/common.mk
+++ b/common.mk
@@ -103,7 +103,7 @@ install-doc: $(PROGRAM)
clean: clean-ext clean-local
clean-local::
@$(RM) $(OBJS) $(MAINOBJ) $(WINMAINOBJ) $(LIBRUBY_A) $(LIBRUBY_SO) $(LIBRUBY) $(LIBRUBY_ALIASES)
- @$(RM) $(PROGRAM) $(WPROGRAM) miniruby$(EXEEXT) dmyext.$(OBJEXT)
+ @$(RM) $(PROGRAM) $(WPROGRAM) miniruby$(EXEEXT) dmyext.$(OBJEXT) $(PREP) $(ARCHFILE)
clean-ext:
@-$(MINIRUBY) $(srcdir)/ext/extmk.rb $(EXTMK_ARGS) clean
diff --git a/ext/extmk.rb b/ext/extmk.rb
index d5d0d87ecd..af52d97b1c 100644
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -126,7 +126,7 @@ def extmake(target)
end
args = sysquote($mflags)
if $static
- args += ["static"]
+ args += ["static"] unless $clean
$extlist.push [$static, $target, File.basename($target), $preload]
end
unless system($make, *args)
@@ -317,10 +317,10 @@ exts |= Dir.glob("#{ext_prefix}/*/**/MANIFEST").collect {|d|
} unless $extension
if $extout
- Config.expand(extout = $extout+"/.", Config::CONFIG.merge("topdir"=>$topdir))
+ Config.expand(extout = $extout, Config::CONFIG.merge("topdir"=>$topdir))
if $install
Config.expand(dest = "#{$destdir}#{$rubylibdir}")
- FileUtils.cp_r(extout, dest, :verbose => true, :noop => $dryrun)
+ FileUtils.cp_r(extout+"/.", dest, :verbose => true, :noop => $dryrun)
exit
end
unless $ignore
@@ -340,10 +340,11 @@ $hdrdir = $top_srcdir = srcdir
$topdir = "."
if $ignore
+ FileUtils.rm_f(%W"extinit.c extinit.#{$OBJEXT}") if $clean
Dir.chdir ".."
if $clean
Dir.rmdir('ext') rescue nil
- FileUtils.rm_rf($extout) if $extout
+ FileUtils.rm_rf(extout) if $extout
end
exit
end