diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-31 22:16:51 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-31 22:16:51 +0000 |
| commit | 11bf69354e7284d4729f7e347dd6d15e7fab7b6f (patch) | |
| tree | 3fa7378e72db33c07a9270210c9cd9b92df8f1d6 | |
| parent | 78b1d1f176ec1fe8b96308cdd3be0a020d488e08 (diff) | |
| download | ruby-11bf69354e7284d4729f7e347dd6d15e7fab7b6f.tar.gz ruby-11bf69354e7284d4729f7e347dd6d15e7fab7b6f.tar.xz ruby-11bf69354e7284d4729f7e347dd6d15e7fab7b6f.zip | |
* Makefile.in (distclean-ext, realclean-ext): use EXTS as default.
* win32/Makefile.sub (distclean-ext, realclean-ext): try to remove ext
directory.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 7 | ||||
| -rw-r--r-- | Makefile.in | 23 | ||||
| -rw-r--r-- | win32/Makefile.sub | 6 |
3 files changed, 27 insertions, 9 deletions
@@ -1,3 +1,10 @@ +Thu Jan 1 07:16:44 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * Makefile.in (distclean-ext, realclean-ext): use EXTS as default. + + * win32/Makefile.sub (distclean-ext, realclean-ext): try to remove ext + directory. + Thu Jan 1 06:56:28 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> * tool/file2lastrev.rb: unset PWD. diff --git a/Makefile.in b/Makefile.in index 6f5056556..4c3651ff4 100644 --- a/Makefile.in +++ b/Makefile.in @@ -226,17 +226,24 @@ distclean-local:: -rmdir -p $(arch_hdrdir)/ruby clean-ext distclean-ext realclean-ext:: - @find ext -name Makefile | sort | while read mk; do \ - dir=`dirname "$$mk"`; \ - echo $(@:-ext=)ing `expr "$$dir" : 'ext/\(.*\)'`; \ + @set dummy ${EXTS}; shift; \ + if test "$$#" = 0; then \ + set dummy `find ext -name Makefile | sed 's:^ext/::;s:/Makefile$$::' | sort`; \ + shift; \ + fi; \ + cd ext; \ + for dir; do \ + echo $(@:-ext=)ing "$$dir"; \ (cd "$$dir"; $(MAKE) $(MFLAGS) $(@:-ext=)) && \ - if [ $@ == clean-ext ]; then \ - true; \ - else \ - rmdir -p "$$dir" 2> /dev/null; \ - fi; \ + case "$@" in \ + *distclean-ext*|*realclean-ext*) \ + rmdir -p "$$dir" 2> /dev/null;; \ + esac; \ done +distclean-ext realclean-ext:: + @-rmdir ext 2> /dev/null || true + ext/extinit.$(OBJEXT): ext/extinit.c $(SETUP) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c ext/extinit.c diff --git a/win32/Makefile.sub b/win32/Makefile.sub index a567c7799..0586c1ba3 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -692,9 +692,13 @@ clean-ext distclean-ext realclean-ext:: echo $(@:-ext=)ing %~nI & \ cd %I & \ $(MAKE) $(MFLAGS) $(@:-ext=) & \ - cd %CD% \ + cd %CD% & \ + rmdir %I \ ) +distclean-ext realclean-ext:: + @-rmdir ext + $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc: $(RBCONFIG) $(srcdir)/revision.h $(srcdir)/win32/resource.rb @$(MINIRUBY) $(srcdir)/win32/resource.rb \ -ruby_name=$(RUBY_INSTALL_NAME) \ |
