Tweak Java Makefile.ams to fix "make distclean".
The Java Makefile.ams assume the existence of ANT, but "make distclean"
runs in the Java directories even if ENABLE_JAVA is off. This change
makes the clean-local target handle the absence of ANT, fixing
"make distclean".
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665683 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/java/Makefile.am b/lib/java/Makefile.am
index fd13142..e878ae9 100644
--- a/lib/java/Makefile.am
+++ b/lib/java/Makefile.am
@@ -6,7 +6,9 @@
install-exec-hook:
$(ANT) install
+# Make sure this doesn't fail if ant is not configured.
clean-local:
- $(ANT) clean
+ ANT=$(ANT) ; if test -z "$$ANT" ; then ANT=: ; fi ; \
+ $$ANT clean
check-local: all
diff --git a/test/java/Makefile.am b/test/java/Makefile.am
index 853207e..1b6e839 100644
--- a/test/java/Makefile.am
+++ b/test/java/Makefile.am
@@ -1,6 +1,8 @@
check:
$(ANT) test
+# Make sure this doesn't fail if ant is not configured.
clean-local:
- $(ANT) clean
+ ANT=$(ANT) ; if test -z "$$ANT" ; then ANT=: ; fi ; \
+ $$ANT clean