From: Mathieu Desnoyers Date: Fri, 15 Nov 2013 18:24:40 +0000 (-0500) Subject: JUL: fix out of tree build X-Git-Tag: v2.4.0-rc1~2 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=16b36e5502b612f3c99e34bf8f5e794029ca3263;p=lttng-ust.git JUL: fix out of tree build Signed-off-by: Mathieu Desnoyers --- diff --git a/liblttng-ust-java/Makefile.am b/liblttng-ust-java/Makefile.am index 5d43cfc7..37867a7c 100644 --- a/liblttng-ust-java/Makefile.am +++ b/liblttng-ust-java/Makefile.am @@ -26,8 +26,8 @@ clean-local: LTTngUst.c: org_lttng_ust_LTTngUst.h -$(LTTNG_JUST_DESTDIR)/LTTngUst.class: $(LTTNG_JUST_DESTDIR)/LTTngUst.java - $(JCC)/javac -d "$(builddir)" "$(LTTNG_JUST_DESTDIR)/LTTngUst.java" +$(LTTNG_JUST_DESTDIR)/LTTngUst.class: $(LTTNG_JUST_SRCDIR)/LTTngUst.java + $(JCC)/javac -d "$(builddir)" "$(LTTNG_JUST_SRCDIR)/LTTngUst.java" org_lttng_ust_LTTngUst.h: $(LTTNG_JUST_DESTDIR)/LTTngUst.class $(JCC)/javah org.lttng.ust.LTTngUst diff --git a/liblttng-ust-jul/Makefile.am b/liblttng-ust-jul/Makefile.am index ffcc5380..89c90804 100644 --- a/liblttng-ust-jul/Makefile.am +++ b/liblttng-ust-jul/Makefile.am @@ -24,8 +24,10 @@ else JCC=javac endif -all-local: $(LTTNG_JUL_DESTDIR)/LTTngAgent.class $(LTTNG_JUL_DESTDIR)/LTTngUst.class \ - org_lttng_ust_jul_LTTngUst.h liblttng-ust-jul.jar +all-local: $(LTTNG_JUL_DESTDIR)/LTTngAgent.class \ + $(LTTNG_JUL_DESTDIR)/LTTngUst.class \ + org_lttng_ust_jul_LTTngUst.h \ + liblttng-ust-jul.jar clean-local: rm -f org_lttng_ust_jul_LTTngUst.h @@ -34,16 +36,23 @@ clean-local: LTTngUst.c: org_lttng_ust_jul_LTTngUst.h -$(LTTNG_JUL_DESTDIR)/LTTngUst.class: $(LTTNG_JUL_SRCDIR)/LTTngUst.java - $(JCC)/javac -d "$(builddir)" "$(LTTNG_JUL_SRCDIR)/LTTngUst.java" +%.class: %.java + $(JCC)/javac -d "$(builddir)" $< -$(LTTNG_JUL_DESTDIR)/LTTngAgent.class: $(LTTNG_JUL_SRCDIR)/LTTngAgent.java - $(JCC)/javac -d "$(builddir)" "$(LTTNG_JUL_SRCDIR)/LTTngAgent.java" +LTTNG_AGENT_FILES = $(LTTNG_JUL_SRCDIR)/LTTngAgent.java \ + $(LTTNG_JUL_SRCDIR)/LTTngLogHandler.java \ + $(LTTNG_JUL_SRCDIR)/LTTngSessiondCmd2_4.java \ + $(LTTNG_JUL_SRCDIR)/LTTngTCPSessiondClient.java \ + $(LTTNG_JUL_SRCDIR)/LTTngThread.java + +$(LTTNG_JUL_DESTDIR)/LTTngAgent.class: $(LTTNG_AGENT_FILES) \ + $(LTTNG_JUL_DESTDIR)/LTTngUst.class + $(JCC)/javac -d "$(builddir)" $(LTTNG_AGENT_FILES) org_lttng_ust_jul_LTTngUst.h: $(LTTNG_JUL_DESTDIR)/LTTngUst.class $(JCC)/javah org.lttng.ust.jul.LTTngUst -liblttng-ust-jul.jar: $(LTTNG_JUL_DESTDIR)/LTTngUst.class $(LTTNG_JUL_DESTDIR)/LTTngAgent.class +liblttng-ust-jul.jar: $(LTTNG_JUL_DESTDIR)/LTTngAgent.class $(JCC)/jar cf liblttng-ust-jul.jar \ $(LTTNG_JUL_DESTDIR)/*.class diff --git a/tests/java-jul/Makefile.am b/tests/java-jul/Makefile.am index b4dfc4ca..ba50fbf1 100644 --- a/tests/java-jul/Makefile.am +++ b/tests/java-jul/Makefile.am @@ -10,7 +10,7 @@ endif AM_CPPFLAGS = -I$(top_srcdir)/include -JUL_jar_file = "$(srcdir)/../../liblttng-ust-jul/liblttng-ust-jul.jar" +JUL_jar_file = "$(builddir)/../../liblttng-ust-jul/liblttng-ust-jul.jar" default: all