From b8a2a3dcc3e0e7e0dba5a35951644de466a59b2a Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Wed, 13 Nov 2013 12:16:18 -0500 Subject: [PATCH] Fix: check for java .class in package subfolders Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- liblttng-ust-java/Makefile.am | 19 +++++++++++-------- .../{ => org/lttng/ust}/LTTngUst.java | 0 2 files changed, 11 insertions(+), 8 deletions(-) rename liblttng-ust-java/{ => org/lttng/ust}/LTTngUst.java (100%) diff --git a/liblttng-ust-java/Makefile.am b/liblttng-ust-java/Makefile.am index 8bf63499..e52bf0e2 100644 --- a/liblttng-ust-java/Makefile.am +++ b/liblttng-ust-java/Makefile.am @@ -5,31 +5,34 @@ AM_CPPFLAGS = -I$(top_srcdir)/include 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 -dist_noinst_DATA = LTTngUst.java +dist_noinst_DATA = $(LTTNG_JUST_SRCDIR)/LTTngUst.java liblttng_ust_java_la_LIBADD = -lc -L$(top_builddir)/liblttng-ust/.libs -llttng-ust +LTTNG_JUST_SRCDIR = $(srcdir)/org/lttng/ust +LTTNG_JUST_DESTDIR = $(builddir)/org/lttng/ust + if HAVE_JAVA_JDK JCC=$(JAVA_JDK)/bin else JCC=javac endif -all: LTTngUst.class org_lttng_ust_LTTngUst.h liblttng-ust-java.jar +all: $(LTTNG_JUST_DESTDIR)/LTTngUst.class org_lttng_ust_LTTngUst.h liblttng-ust-java.jar clean-local: rm -f org_lttng_ust_LTTngUst.h rm -f liblttng-ust-java.jar - rm -rf org/ + rm -rf org/lttng/ust/*.class LTTngUst.c: org_lttng_ust_LTTngUst.h -LTTngUst.class: LTTngUst.java - $(JCC)/javac -d "$(builddir)" "$(srcdir)/LTTngUst.java" +$(LTTNG_JUST_DESTDIR)/LTTngUst.class: $(LTTNG_JUST_DESTDIR)/LTTngUst.java + $(JCC)/javac -d "$(builddir)" "$(LTTNG_JUST_DESTDIR)/LTTngUst.java" -org_lttng_ust_LTTngUst.h: LTTngUst.class +org_lttng_ust_LTTngUst.h: $(LTTNG_JUST_DESTDIR)/LTTngUst.class $(JCC)/javah org.lttng.ust.LTTngUst -liblttng-ust-java.jar: LTTngUst.class - $(JCC)/jar cf liblttng-ust-java.jar org/* +liblttng-ust-java.jar: $(LTTNG_JUST_DESTDIR)/LTTngUst.class + $(JCC)/jar cf liblttng-ust-java.jar $(LTTNG_JUST_DESTDIR)/*.class endif diff --git a/liblttng-ust-java/LTTngUst.java b/liblttng-ust-java/org/lttng/ust/LTTngUst.java similarity index 100% rename from liblttng-ust-java/LTTngUst.java rename to liblttng-ust-java/org/lttng/ust/LTTngUst.java -- 2.34.1