summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-02-28 08:22:00 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-02-28 08:22:00 +0000
commita0da6f0dfe85a44e1af6073f74405cf47c3d152c (patch)
tree06c592dd3ed1b5d8dd4b4d01a0ec4ea6fae8677a
parent7e0aaf3ac306cd71f9d650b7289e19d314eb7a87 (diff)
clean gems
* Makefile.in (clean-ext): clean gem directories too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--Makefile.in18
-rwxr-xr-xext/extmk.rb2
2 files changed, 13 insertions, 7 deletions
diff --git a/Makefile.in b/Makefile.in
index c182949..699b25e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -418,21 +418,25 @@ distclean-local::
clean-ext distclean-ext realclean-ext::
@[ -f $(EXTS_MK) ] && $(MAKE) -f $(EXTS_MK) $(@:-ext=)
- @cd ext 2>/dev/null || exit 0; set dummy `echo "${EXTS}" | tr , ' '`; shift; \
+ @set dummy `echo "${EXTS}" | tr , ' '`; shift; \
test "$$#" = 0 && set .; \
set dummy `\
+ cd ext 2>/dev/null && \
find "$$@" \( -name Makefile -o -name exts.mk \) -print | \
- sed -n 's:/[^/]*$$::;s:^\./::p' | sort -u; \
+ sed -n 's:^\./::;s:^:ext/:;s:/[^/][^/]*$$::p' | sort -u; \
+ ` ` \
+ cd gems 2>/dev/null && \
+ find "$$@" -name exts.mk -print | \
+ sed -n 's:^\./::;s:^:gems/:;s:/[^/][^/]*$$::p' | sort -u; \
`; shift; \
- cd ..; \
for dir do \
echo $(@:-ext=)ing "$$dir"; \
- $(RM) "ext/$$dir/exts.mk"; \
- { [ ! -f "ext/$$dir/Makefile" ] || \
- (cd "ext/$$dir" && exec $(MAKE) $(mflags) $(@:-ext=)); } && \
+ $(RM) "$$dir/exts.mk"; \
+ { [ ! -f "$$dir/Makefile" ] || \
+ (cd "$$dir" && exec $(MAKE) $(mflags) $(@:-ext=)); } && \
case "$@" in \
*distclean-ext*|*realclean-ext*) \
- $(RMDIRS) "ext/$$dir" 2> /dev/null || true;; \
+ $(RMDIRS) "$$dir" 2> /dev/null || true;; \
esac; \
done
-$(Q)$(RM) ext/extinit.$(OBJEXT)
diff --git a/ext/extmk.rb b/ext/extmk.rb
index 70fa88b..3e464c2 100755
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -538,6 +538,8 @@ build_complete: $(build_complete)
$(build_complete): $(TARGET_SO)
$(Q) $(TOUCH) $@
+clean-so::
+ -$(Q)$(RM) $(build_complete)
}
conf
end