projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: bytecode validator: reject specialized load instructions
[lttng-ust.git]
/
src
/
lib
/
lttng-ust-java
/
Makefile.am
diff --git
a/src/lib/lttng-ust-java/Makefile.am
b/src/lib/lttng-ust-java/Makefile.am
index 55252fbb8fb77b00275e4ac50f3f71823c8f36e1..5b6be7bd4a7eaedfdae5a8492afc2bc18fe0b1c5 100644
(file)
--- a/
src/lib/lttng-ust-java/Makefile.am
+++ b/
src/lib/lttng-ust-java/Makefile.am
@@
-1,41
+1,52
@@
# SPDX-License-Identifier: LGPL-2.1-only
# SPDX-License-Identifier: LGPL-2.1-only
-JAVAROOT = .
+JAVAROOT = .
build
jarfile = liblttng-ust-java.jar
jardir = $(datadir)/java
pkgpath = org/lttng/ust
dist_noinst_JAVA = $(pkgpath)/LTTngUst.java
jar_DATA = $(jarfile)
jarfile = liblttng-ust-java.jar
jardir = $(datadir)/java
pkgpath = org/lttng/ust
dist_noinst_JAVA = $(pkgpath)/LTTngUst.java
jar_DATA = $(jarfile)
-BUILT_SOURCES = org_lttng_ust_LTTngUst.h
AM_CPPFLAGS += -I$(builddir) -I$(srcdir) $(JNI_CPPFLAGS)
AM_CPPFLAGS += -I$(builddir) -I$(srcdir) $(JNI_CPPFLAGS)
+
lib_LTLIBRARIES = liblttng-ust-java.la
liblttng_ust_java_la_SOURCES = LTTngUst.c lttng_ust_java.h
lib_LTLIBRARIES = liblttng-ust-java.la
liblttng_ust_java_la_SOURCES = LTTngUst.c lttng_ust_java.h
+
+# Generated by javac / javah
nodist_liblttng_ust_java_la_SOURCES = org_lttng_ust_LTTngUst.h
nodist_liblttng_ust_java_la_SOURCES = org_lttng_ust_LTTngUst.h
+# Explicit dependency to ensure the header is generated before the
+# C file is built.
+LTTngUst.lo: org_lttng_ust_LTTngUst.h
+
liblttng_ust_java_la_LIBADD = -lc \
liblttng_ust_java_la_LIBADD = -lc \
- $(top_builddir)/src/liblttng-ust/liblttng-ust.la
+ $(top_builddir)/src/lib
/
lttng-ust/liblttng-ust.la
$(jarfile): classnoinst.stamp
$(jarfile): classnoinst.stamp
- $(JAR) cf $(JARFLAGS) $@ $(pkgpath)/*.class
+ $(JAR) cf $(JARFLAGS) $@ -C $(JAVAROOT) $(pkgpath)/LTTngUst.class
+
+# Ensure the javaroot directory is created before the Java class files are built.
+$(pkgpath)/LTTngUst.java: $(JAVAROOT)
+$(JAVAROOT):
+ -test -d $(JAVAROOT) || mkdir $(JAVAROOT)
if !HAVE_JAVAH
# If we don't have javah, assume we are running openjdk >= 10 and use javac
# to generate the jni header file.
AM_JAVACFLAGS = -h .
if !HAVE_JAVAH
# If we don't have javah, assume we are running openjdk >= 10 and use javac
# to generate the jni header file.
AM_JAVACFLAGS = -h .
-org_lttng_ust_LTTngUst.h: $(jarfile)
+# The header file will be generated by javac when building the Java class
+# files, add a dependency on the stamp file to ensure proper ordering.
+org_lttng_ust_LTTngUst.h: classnoinst.stamp
else
else
-org_lttng_ust_LTTngUst.h: jni-header.stamp
-
-jni-header.stamp: $(dist_noinst_JAVA)
- $(JAVAH) -classpath $(srcdir) $(JAVAHFLAGS) org.lttng.ust.LTTngUst && \
- echo "JNI header generated" > jni-header.stamp
+org_lttng_ust_LTTngUst.h:
+ $(JAVAH) -classpath $(srcdir) $(JAVAHFLAGS) org.lttng.ust.LTTngUst
endif
endif
-all-local: org_lttng_ust_LTTngUst.h
-
EXTRA_DIST = README
EXTRA_DIST = README
-CLEANFILES = $(jarfile) $(pkgpath)/*.class jni-header.stamp org_lttng_ust_LTTngUst.h
+CLEANFILES = $(jarfile) org_lttng_ust_LTTngUst.h
+
+clean-local:
+ -rm -rf $(JAVAROOT)
This page took
0.025476 seconds
and
4
git commands to generate.