diff options
author | Matthew Booth <mbooth@redhat.com> | 2009-07-03 11:52:50 +0100 |
---|---|---|
committer | Matthew Booth <mbooth@redhat.com> | 2009-07-03 16:16:51 +0100 |
commit | 349814e9d912c4f372b8fbdfb10b03749911021f (patch) | |
tree | 7168b6ee4dadd363a28a73e2a5ff26799395d75c /java | |
parent | 5f9cb51f11879ece8b921d833850505d7e57d339 (diff) | |
download | libguestfs-349814e9d912c4f372b8fbdfb10b03749911021f.tar.gz libguestfs-349814e9d912c4f372b8fbdfb10b03749911021f.tar.xz libguestfs-349814e9d912c4f372b8fbdfb10b03749911021f.zip |
Make it possible to build in a separate directory
This patch allows you to do:
mkdir build
cd build
../configure ...
make
This will output all generated files to the build directory. Given that
autogen automatically runs configure, you can also do:
BUILDDIR=./build ./autogen.sh
which will do the right thing.
Also:
* Fix a dependency bug which means that guestfs_protocol.h
isn't automatically rebuilt.
* Re-running autogen.sh with no arguments won't blow away your previous
configure arguments.
Diffstat (limited to 'java')
-rw-r--r-- | java/Makefile.am | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/java/Makefile.am b/java/Makefile.am index ea90a482..b6827473 100644 --- a/java/Makefile.am +++ b/java/Makefile.am @@ -15,18 +15,18 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -CPTH = com/redhat/et/libguestfs +java_prefix = 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)/Dirent.java \ - $(CPTH)/GuestFS.java + $(java_prefix)/LibGuestFSException.java \ + $(java_prefix)/IntBool.java \ + $(java_prefix)/PV.java \ + $(java_prefix)/VG.java \ + $(java_prefix)/LV.java \ + $(java_prefix)/Stat.java \ + $(java_prefix)/StatVFS.java \ + $(java_prefix)/Dirent.java \ + $(java_prefix)/GuestFS.java java_tests = \ Bindtests.java \ @@ -50,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) -d @builddir@ -classpath @srcdir@:@builddir@ -sourcepath @srcdir@:@builddir@ $< libguestfs-${VERSION}.jar: $(libguestfs_jar_class_files) $(JAR) cf $@ $^ @@ -64,12 +64,12 @@ libguestfs_jni_la_SOURCES = \ libguestfs_jni_la_LIBADD = $(top_builddir)/src/libguestfs.la libguestfs_jni_la_LDFLAGS = -version-info $(JNI_VERSION_INFO) -libguestfs_jni_la_CFLAGS = -Wall -I$(top_builddir)/src $(JNI_CFLAGS) +libguestfs_jni_la_CFLAGS = -Wall -I$(top_srcdir)/src -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 +com_redhat_et_libguestfs_GuestFS.h: $(java_prefix)/GuestFS.class + $(JAVAH) -classpath @srcdir@:@builddir@ com.redhat.et.libguestfs.GuestFS # Documentation. |