X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=java%2FMakefile.am;h=ea90a4825e53ec0c95961837f1bbaf50fc150d34;hp=68f1d78dddc8e7ac8f7b7ce0ff547a3a1d6ebe05;hb=e9f5144537a4d89cc875bce42b269d1e2b119d8f;hpb=7f818fa00c3d019146c7178f152408038d4a4d52 diff --git a/java/Makefile.am b/java/Makefile.am index 68f1d78..ea90a48 100644 --- a/java/Makefile.am +++ b/java/Makefile.am @@ -18,18 +18,29 @@ CPTH = com/redhat/et/libguestfs java_sources = \ - $(CPTH)/LibGuestFSException.java \ - $(CPTH)/IntBool.java \ - $(CPTH)/PV.java \ - $(CPTH)/VG.java \ - $(CPTH)/LV.java \ - $(CPTH)/Stat.java \ - $(CPTH)/StatVFS.java \ - $(CPTH)/GuestFS.java - -EXTRA_DIST = $(java_sources) - -CLEANFILES = *~ doc-stamp + $(CPTH)/LibGuestFSException.java \ + $(CPTH)/IntBool.java \ + $(CPTH)/PV.java \ + $(CPTH)/VG.java \ + $(CPTH)/LV.java \ + $(CPTH)/Stat.java \ + $(CPTH)/StatVFS.java \ + $(CPTH)/Dirent.java \ + $(CPTH)/GuestFS.java + +java_tests = \ + Bindtests.java \ + t/GuestFS005Load.java \ + t/GuestFS010Launch.java \ + t/GuestFS050LVCreate.java + +EXTRA_DIST = \ + $(java_sources) \ + $(java_tests) \ + run-bindtests \ + run-java-tests + +CLEANFILES = doc-stamp if HAVE_JAVA @@ -39,7 +50,7 @@ libguestfs_jardir = $(JAR_INSTALL_DIR) libguestfs_jar_DATA = libguestfs-${VERSION}.jar libguestfs_jar_class_files = $(java_sources:.java=.class) $(libguestfs_jar_class_files): %.class: %.java - $(JAVAC) $(JAVAC_FLAGS) -classpath "$(CPTH)" $(java_sources) + $(JAVAC) $(JAVAC_FLAGS) -classpath $(CPTH) $(java_sources) libguestfs-${VERSION}.jar: $(libguestfs_jar_class_files) $(JAR) cf $@ $^ @@ -58,7 +69,7 @@ libguestfs_jni_la_CFLAGS = -Wall -I$(top_builddir)/src $(JNI_CFLAGS) BUILT_SOURCES = com_redhat_et_libguestfs_GuestFS.h com_redhat_et_libguestfs_GuestFS.h: $(CPTH)/GuestFS.class - $(JAVAH) -classpath ".:$(CPTH)" com.redhat.et.libguestfs.GuestFS + $(JAVAH) -classpath .:$(CPTH) com.redhat.et.libguestfs.GuestFS # Documentation. @@ -72,4 +83,28 @@ doc-stamp: $(java_sources) com.redhat.et.libguestfs touch $@ -endif \ No newline at end of file +install-data-hook: + mkdir -p $(DESTDIR)$(datadir)/javadoc/$(PACKAGE_NAME)-java-$(PACKAGE_VERSION) + cp -a api/* $(DESTDIR)$(datadir)/javadoc/$(PACKAGE_NAME)-java-$(PACKAGE_VERSION) + +# Tests (not comprehensive). + +TESTS = run-bindtests run-java-tests +TESTS_ENVIRONMENT = \ + JAVA=$(JAVA) \ + CLASSPATH=.:t:libguestfs-$(VERSION).jar \ + LIBGUESTFS_PATH=$(top_builddir)/appliance + +noinst_DATA = Bindtests.class $(java_tests:.java=.class) + +t/%.class: t/%.java + $(JAVAC) $(JAVAC_FLAGS) -classpath libguestfs-$(VERSION).jar $< + +Bindtests.class: Bindtests.java + $(JAVAC) $(JAVAC_FLAGS) -classpath libguestfs-$(VERSION).jar $< + +endif + +# Tell version 3.79 and up of GNU make to not build goals in this +# directory in parallel. +.NOTPARALLEL: