Tweak Java Makefile.ams to fix "make distclean".
authorDavid Reiss <dreiss@apache.org>
Fri, 9 May 2008 07:17:35 +0000 (07:17 +0000)
committerDavid Reiss <dreiss@apache.org>
Fri, 9 May 2008 07:17:35 +0000 (07:17 +0000)
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

lib/java/Makefile.am
test/java/Makefile.am

index fd13142..e878ae9 100644 (file)
@@ -6,7 +6,9 @@ all-local:
 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
index 853207e..1b6e839 100644 (file)
@@ -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