From: Michael Jeanson Date: Wed, 22 Apr 2020 18:37:55 +0000 (-0400) Subject: fix: Add CLASSPATH to autoconf precious variables X-Git-Tag: v2.11.3~12 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=dafacb78410cca51a1945305017cfa21a413ec6c;p=lttng-ust.git fix: Add CLASSPATH to autoconf precious variables This will record the value of CLASSPATH in the autoconf cache and ensure it's used when calling make even if it's not exported to the environment. Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers Change-Id: Ia06070dd352f9d3b6956a1ec0f4eb1d024f73179 --- diff --git a/configure.ac b/configure.ac index 067eaaa1..3cc5205e 100644 --- a/configure.ac +++ b/configure.ac @@ -360,6 +360,7 @@ AS_IF([test "x$jni_interface" = "xyes" || test "x$java_agent_jul" = "xyes" || te AX_PROG_JAVAC AX_PROG_JAVA AX_PROG_JAR + AC_ARG_VAR([CLASSPATH], [Java class path]) AX_JNI_INCLUDE_DIR for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am index 493e07dd..9413ff12 100644 --- a/doc/examples/Makefile.am +++ b/doc/examples/Makefile.am @@ -131,12 +131,12 @@ all-local: done; \ if [ x"$(SUBDIRS_JUL)" != x"" ]; then \ for subdir in $(SUBDIRS_JUL); do \ - (cd $$subdir && $(MAKE) JAVA_CLASSPATH_OVERRIDE_JUL="../../../liblttng-ust-java-agent/java/lttng-ust-agent-jul" JAVA_CLASSPATH_OVERRIDE_COMMON="../../../liblttng-ust-java-agent/java/lttng-ust-agent-common" $(AM_MAKEFLAGS) all && cd ..) || exit 1; \ + (cd $$subdir && $(MAKE) CLASSPATH="$(CLASSPATH)" JAVA_CLASSPATH_OVERRIDE_JUL="../../../liblttng-ust-java-agent/java/lttng-ust-agent-jul" JAVA_CLASSPATH_OVERRIDE_COMMON="../../../liblttng-ust-java-agent/java/lttng-ust-agent-common" $(AM_MAKEFLAGS) all && cd ..) || exit 1; \ done; \ fi; \ if [ x"$(SUBDIRS_LOG4J)" != x"" ]; then \ for subdir in $(SUBDIRS_LOG4J); do \ - (cd $$subdir && $(MAKE) JAVA_CLASSPATH_OVERRIDE_LOG4J="../../../liblttng-ust-java-agent/java/lttng-ust-agent-log4j" JAVA_CLASSPATH_OVERRIDE_COMMON="../../../liblttng-ust-java-agent/java/lttng-ust-agent-common" $(AM_MAKEFLAGS) all && cd ..) || exit 1; \ + (cd $$subdir && $(MAKE) CLASSPATH="$(CLASSPATH)" JAVA_CLASSPATH_OVERRIDE_LOG4J="../../../liblttng-ust-java-agent/java/lttng-ust-agent-log4j" JAVA_CLASSPATH_OVERRIDE_COMMON="../../../liblttng-ust-java-agent/java/lttng-ust-agent-common" $(AM_MAKEFLAGS) all && cd ..) || exit 1; \ done; \ fi; \ if [ x"$(SUBDIRS_CMAKE)" != x"" ]; then \ diff --git a/doc/examples/java-log4j/Makefile b/doc/examples/java-log4j/Makefile index bf10fc52..59ffdf79 100644 --- a/doc/examples/java-log4j/Makefile +++ b/doc/examples/java-log4j/Makefile @@ -22,7 +22,7 @@ JARFILE_COMMON=lttng-ust-agent-common.jar # If system classpath is empty, try to guess log4j location ifeq "$(CLASSPATH)" "" - CLASSPATH="/usr/local/share/java/log4j.jar:/usr/share/java/log4j.jar" + CLASSPATH=/usr/local/share/java/log4j.jar:/usr/share/java/log4j.jar endif # Check if the top level makefile overrides the Log4j Jar file's path.