]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
configure.ac: change junit4 handling
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 4 Jan 2013 17:51:31 +0000 (18:51 +0100)
committerGary Lowell <glowell@inktank.com>
Thu, 10 Jan 2013 01:13:11 +0000 (17:13 -0800)
Change handling of --with-debug and junit4. Add a new conditional HAVE_JUNIT4
to be able to build ceph-test package also if junit4 isn't available. In
this case simply don't build libcephfs-test.jar, but the rest of the tools.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
configure.ac
src/java/Makefile.am

index 15430ddc173433ad35849f780255fa1637339ec7..832054b292605ed3a8a48f4ff7d67d0ad2101f2b 100644 (file)
@@ -309,8 +309,10 @@ AS_IF([test "x$enable_cephfs_java" = "xyes"], [
       junit4_jar=`find $dir -name junit4.jar | head -n 1`
                  AS_IF([test -r "$junit4_jar"], [
              EXTRA_CLASSPATH_JAR=`dirname $junit4_jar`/junit4.jar
-      AC_SUBST(EXTRA_CLASSPATH_JAR)], [
-      AC_MSG_ERROR([Cannot find junit4.jar (apt-get install junit4)])])])
+      AC_SUBST(EXTRA_CLASSPATH_JAR)
+      [have_junit4=1]], [
+      AC_MSG_NOTICE([Cannot find junit4.jar (apt-get install junit4)])
+      [have_junit4=0]])])
 
        # Check for Java programs: javac, javah, jar
     PATH_save=$PATH
@@ -341,6 +343,7 @@ AS_IF([test "x$enable_cephfs_java" = "xyes"], [
        # Setup output var
        AC_SUBST(JDK_CPPFLAGS)
 ])
+AM_CONDITIONAL(HAVE_JUNIT4, [test "$have_junit4" = "1"])
 
 # jni?
 # clear cache (from java above) -- this whole thing will get
index 1f87885831848df1018bc280ba33b26c46eccecf..788bea2c29b546d3212f229b9808ff469e834e7a 100644 (file)
@@ -51,7 +51,7 @@ CLEANFILES = -rf java/com/ceph/fs/*.class $(JAVA_H) libcephfs.jar
 BUILT_SOURCES = $(JAVA_H)
 
 # build the tests if *both* --enable-cephfs-java and --with-debug were specifed
-if WITH_DEBUG 
+if HAVE_JUNIT4
 
 JAVA_TEST_CLASSES = $(JAVA_TEST_SRC:test/%.java=%.class)
 ESCAPED_JAVA_TEST_CLASSES = com/ceph/fs/CephAllTests\$$1.class
@@ -68,5 +68,5 @@ libcephfs-test.jar: $(CEPH_TEST_PROXY)
 java_DATA += libcephfs-test.jar
 
 CLEANFILES += test/com/ceph/fs/*.class libcephfs-test.jar
-endif # WITH_DEBUG
+endif # HAVE_JUNIT4 (includes WITH_DEBUG)
 endif #ENABLE_CEPHFS_JAVA