doc_examples_hello_static_libdir = ${docdir}/examples/hello-static-lib
doc_examples_demo_tracefdir = ${docdir}/examples/demo-tracef
-if BUILD_JAVA_AGENT
+if BUILD_JAVA_AGENT_WITH_JUL
doc_examples_java_juldir = ${docdir}/examples/java-jul
dist_doc_examples_java_jul_DATA = java-jul/Makefile \
java-jul/Hello.java \
SUBDIRS_JUL = java-jul
endif
+if BUILD_JAVA_AGENT_WITH_LOG4J
+doc_examples_java_log4jdir = ${docdir}/examples/java-log4j
+dist_doc_examples_java_log4j_DATA = java-log4j/Makefile \
+ java-log4j/Hello.java \
+ java-log4j/run
+SUBDIRS_LOG4J = java-log4j
+endif
+
dist_doc_examples_DATA = README
dist_doc_examples_easy_ust_DATA = easy-ust/Makefile \
all-local:
@if [ x"$(srcdir)" != x"$(builddir)" ]; then \
- for subdir in $(SUBDIRS_PROXY) $(SUBDIRS_JUL); do \
+ for subdir in $(SUBDIRS_PROXY) $(SUBDIRS_JUL) $(SUBDIRS_LOG4J); do \
cp -pfR $(srcdir)/$$subdir $(builddir); \
done; \
fi; \
for subdir in $(SUBDIRS_JUL); do \
(cd $(SUBDIRS_JUL) && $(MAKE) JAVA_CLASSPATH_OVERRIDE="../../../liblttng-ust-java-agent/java" JAVA_JARFILE_OVERRIDE="liblttng-ust-agent.jar" $(AM_MAKEFLAGS) all && cd ..) || exit 1; \
done; \
+ fi; \
+ if [ x"$(SUBDIRS_LOG4J)" != x"" ]; then \
+ for subdir in $(SUBDIRS_LOG4J); do \
+ (cd $(SUBDIRS_LOG4J) && $(MAKE) JAVA_CLASSPATH_OVERRIDE="../../../liblttng-ust-java-agent/java" JAVA_JARFILE_OVERRIDE="liblttng-ust-agent.jar" $(AM_MAKEFLAGS) all && cd ..) || exit 1; \
+ done; \
fi;
clean-local:
fi; \
done; \
fi; \
+ if [ x"$(SUBDIRS_LOG4J)" != x"" ]; then \
+ for subdir in $(SUBDIRS_LOG4J); do \
+ if [ -d $$subdir ]; then \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) clean && cd ..) || exit 1; \
+ fi; \
+ done; \
+ fi; \
if [ x"$(srcdir)" != x"$(builddir)" ]; then \
- for subdir in $(SUBDIRS_PROXY) $(SUBDIRS_JUL); do \
+ for subdir in $(SUBDIRS_PROXY) $(SUBDIRS_JUL) $(SUBDIRS_LOG4J); do \
rm -rf $(builddir)/$$subdir; \
done; \
fi;
LIBPATH="../../../liblttng-ust-java-agent/jni/jul/.libs"
else
CLASSPATH="/usr/local/share/java/$JARFILE:/usr/share/java/$JARFILE"
- LIBPATH="/usr/local/lib:/usr/lib"
+ # Use system defined java.library.path
+ #LIBPATH="/usr/local/lib:/usr/lib"
fi
java -classpath "$CLASSPATH:." -Djava.library.path="$LIBPATH" Hello
LIBPATH="../../../liblttng-ust-java-agent/jni/log4j/.libs"
else
CLASSPATH="/usr/local/share/java/$JARFILE:/usr/share/java/$JARFILE:$LOG4J"
- LIBPATH="/usr/local/lib:/usr/lib"
+ # Use system defined java.library.path
+ #LIBPATH="/usr/local/lib:/usr/lib"
fi
-java -classpath "$CLASSPATH:." Hello
+java -classpath "$CLASSPATH:." -Djava.library.path="$LIBPATH" Hello
cd -