summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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