diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-05-17 14:27:25 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-05-17 14:27:25 +0000 |
| commit | 75ebffdbb721713955728b4b485e6f46200e9d92 (patch) | |
| tree | d97fbf4df4c04edf206e11fc1a2afdfdd97a7c95 | |
| parent | 678b65989cb34319855f6ffec168ecca9cb92dea (diff) | |
* Makefile.in (distclean-ext): removes extension directories.
* lib/mkmf.rb (try_do): removes conftest.dSYM
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@23480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 6 | ||||
| -rw-r--r-- | Makefile.in | 3 | ||||
| -rw-r--r-- | lib/mkmf.rb | 5 |
3 files changed, 13 insertions, 1 deletions
@@ -1,3 +1,9 @@ +Sun May 17 23:27:24 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * Makefile.in (distclean-ext): removes extension directories. + + * lib/mkmf.rb (try_do): removes conftest.dSYM + Sun May 17 23:23:14 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> * lib/mkmf.rb (SRC_EXT): should be flat. diff --git a/Makefile.in b/Makefile.in index d7e0f7fd21..0840daff39 100644 --- a/Makefile.in +++ b/Makefile.in @@ -179,7 +179,8 @@ clean-ext distclean-ext realclean-ext:: @find ext -name Makefile | sort | while read mk; do \ dir=`dirname "$$mk"`; \ echo $(@:-ext=)ing `expr "$$dir" : 'ext/\(.*\)'`; \ - (cd "$$dir"; $(MAKE) $(MFLAGS) $(@:-ext=)); \ + (cd "$$dir"; $(MAKE) $(MFLAGS) $(@:-ext=)) && \ + test $@ != clean-ext && rmdir -p "$$dir" 2> /dev/null; \ done ext/extinit.$(OBJEXT): ext/extinit.c $(SETUP) diff --git a/lib/mkmf.rb b/lib/mkmf.rb index b589efe02b..67fd0214ea 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -168,6 +168,10 @@ def rm_f(*files) FileUtils.rm_f(Dir[files.join("\0")]) end +def rm_rf(*files) + FileUtils.rm_rf(Dir[*files]) +end + # Returns time stamp of the +target+ file if it exists and is newer # than or equal to all of +times+. def modified?(target, times) @@ -324,6 +328,7 @@ MSG xsystem(command) ensure log_src(src) + rm_rf 'conftest.dSYM' end def link_command(ldflags, opt="", libpath=$DEFLIBPATH|$LIBPATH) |
