summaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-01 06:43:17 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-01 06:43:17 +0000
commitbf4f43e21092ec6432671d595a6a42e939f51494 (patch)
tree3a826280842448f08d9ce27038600d1ec7d40761 /Makefile.in
parentdabea27279d19d13ab041ecab1d2532440703f58 (diff)
merges r21220 from trunk into ruby_1_9_1.
* 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: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in23
1 files changed, 15 insertions, 8 deletions
diff --git a/Makefile.in b/Makefile.in
index 2aa9befef8..ef5e61eb4b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -221,17 +221,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