Fix "make distclean" when Ruby is not in use
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@719379 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/rb/Makefile.am b/lib/rb/Makefile.am
index 43acfff..07fc5c6 100644
--- a/lib/rb/Makefile.am
+++ b/lib/rb/Makefile.am
@@ -7,7 +7,9 @@
install-exec-hook:
$(RUBY) setup.rb install
+# Make sure this doesn't fail if Ruby is not configured.
clean-local:
- $(RUBY) setup.rb clean
+ RUBY=$(RUBY) ; if test -z "$$RUBY" ; then RUBY=: ; fi ; \
+ $$RUBY setup.rb clean
check-local: all