Fix: Move generated headers to the BUILT_SOURCES target
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 7 May 2014 15:41:46 +0000 (11:41 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 7 May 2014 19:56:45 +0000 (15:56 -0400)
This fixes the out of tree build when enabling Java support. The
problem in using an LTTngUst.c target is that automake will then
assume the file is generated and thus be found in the builddir.

Using the BUILT_SOURCES target will ensure the
org_lttng_ust_LTTngUst.h and org_lttng_ust_jul_LTTngUst.h headers
are generated before LTTngUst.c is compiled.

Tested-by: David Goulet <dgoulet@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust-java/Makefile.am
liblttng-ust-jul/Makefile.am

index 37867a7cdf45b115e1ec131b2ebbf47f4ac45817..64c654bb5a07c29e811f7efea6f97d20d641c110 100644 (file)
@@ -3,8 +3,9 @@ LTTNG_JUST_DESTDIR = $(builddir)/org/lttng/ust
 
 if BUILD_JNI_INTERFACE
 
-AM_CPPFLAGS = -I$(top_srcdir)/include
+AM_CPPFLAGS = -I$(top_srcdir)/include -I$(builddir)
 
+BUILT_SOURCES = org_lttng_ust_LTTngUst.h
 lib_LTLIBRARIES = liblttng-ust-java.la
 liblttng_ust_java_la_SOURCES = LTTngUst.c lttng_ust_java.h
 nodist_liblttng_ust_java_la_SOURCES = org_lttng_ust_LTTngUst.h
@@ -24,8 +25,6 @@ clean-local:
        rm -f liblttng-ust-java.jar
        rm -rf org/lttng/ust/*.class
 
-LTTngUst.c: org_lttng_ust_LTTngUst.h
-
 $(LTTNG_JUST_DESTDIR)/LTTngUst.class: $(LTTNG_JUST_SRCDIR)/LTTngUst.java
        $(JCC)/javac -d "$(builddir)" "$(LTTNG_JUST_SRCDIR)/LTTngUst.java"
 
index 9b86caae28c71486ae3494563ea3e8e2adfa1771..bc13c76f8ba8bf212e104aa5207e0305ac51e607 100644 (file)
@@ -3,8 +3,9 @@ LTTNG_JUL_DESTDIR = $(builddir)/org/lttng/ust/jul
 
 if BUILD_JNI_INTERFACE
 
-AM_CPPFLAGS = -I$(top_srcdir)/include
+AM_CPPFLAGS = -I$(top_srcdir)/include -I$(builddir)
 
+BUILT_SOURCES = org_lttng_ust_jul_LTTngUst.h
 lib_LTLIBRARIES = liblttng-ust-jul-jni.la
 liblttng_ust_jul_jni_la_SOURCES = LTTngUst.c lttng_ust_jul.h
 nodist_liblttng_ust_jul_jni_la_SOURCES = org_lttng_ust_jul_LTTngUst.h
@@ -35,8 +36,6 @@ clean-local:
        rm -f liblttng-ust-jul.jar
        rm -f org/lttng/ust/jul/*.class
 
-LTTngUst.c: org_lttng_ust_jul_LTTngUst.h
-
 %.class: %.java
        $(JCC)/javac -d "$(builddir)" $<
 
This page took 0.026074 seconds and 4 git commands to generate.