1 doc_examplesdir = ${docdir}/examples
2 doc_examples_easy_ustdir = ${docdir}/examples/easy-ust
3 doc_examples_gen_tpdir = ${docdir}/examples/gen-tp
4 doc_examples_demodir = ${docdir}/examples/demo
5 doc_examples_hello_static_libdir = ${docdir}/examples/hello-static-lib
6 doc_examples_demo_tracefdir = ${docdir}/examples/demo-tracef
7 doc_examples_demo_tracelogdir = ${docdir}/examples/demo-tracelog
8 doc_examples_clock_overridedir = ${docdir}/examples/clock-override
9 doc_examples_getcpu_overridedir = ${docdir}/examples/getcpu-override
11 if BUILD_JAVA_AGENT_WITH_JUL
12 doc_examples_java_juldir = ${docdir}/examples/java-jul
13 dist_doc_examples_java_jul_DATA = java-jul/Makefile \
16 java-jul/ApplicationContextExample.java \
17 java-jul/FilterChangeListenerExample.java \
19 SUBDIRS_JUL = java-jul
22 if BUILD_JAVA_AGENT_WITH_LOG4J
23 doc_examples_java_log4jdir = ${docdir}/examples/java-log4j
24 dist_doc_examples_java_log4j_DATA = java-log4j/Makefile \
25 java-log4j/Hello.java \
27 SUBDIRS_LOG4J = java-log4j
31 doc_examples_pythondir = ${docdir}/examples/python
32 dist_doc_examples_python_DATA = python/hello.py
35 dist_doc_examples_DATA = README
37 dist_doc_examples_easy_ust_DATA = easy-ust/Makefile \
39 easy-ust/sample_component_provider.h easy-ust/tp.c
41 dist_doc_examples_gen_tp_DATA = gen-tp/Makefile \
42 gen-tp/sample.c gen-tp/sample_tracepoint.tp
44 dist_doc_examples_demo_DATA = demo/demo.c \
51 demo/ust_tests_demo2.h \
52 demo/ust_tests_demo3.h \
55 dist_doc_examples_hello_static_lib_DATA = hello-static-lib/Makefile \
56 hello-static-lib/hello.c \
57 hello-static-lib/README \
58 hello-static-lib/ust_tests_hello.h \
61 dist_doc_examples_demo_tracef_DATA = demo-tracef/Makefile \
62 demo-tracef/demo-tracef.c \
65 dist_doc_examples_demo_tracelog_DATA = demo-tracelog/Makefile \
66 demo-tracelog/demo-tracelog.c \
69 dist_doc_examples_clock_override_DATA = clock-override/Makefile \
70 clock-override/lttng-ust-clock-override-example.c \
71 clock-override/run-clock-override \
74 dist_doc_examples_getcpu_override_DATA = getcpu-override/Makefile \
75 getcpu-override/lttng-ust-getcpu-override-example.c \
76 getcpu-override/run-getcpu-override \
77 getcpu-override/README
80 # Don't build examples if shared libraries support was explicitly
83 # Copies are for VPATH build support
84 SUBDIRS_PROXY = easy-ust demo hello-static-lib demo-tracef clock-override \
85 getcpu-override demo-tracelog
87 if BUILD_GEN_TP_EXAMPLES
88 SUBDIRS_PROXY += gen-tp
92 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
93 for subdir in $(SUBDIRS_PROXY) $(SUBDIRS_JUL) $(SUBDIRS_LOG4J); do \
94 cp -pfR $(srcdir)/$$subdir $(builddir); \
97 if [ x"$(shell echo "$(top_srcdir)" | grep "^/" | wc -l)" = x"1" ]; then \
98 echo "Examples: absolute top_srcdir path $(top_srcdir)"; \
101 echo "Examples: relative top_srcdir path $(top_srcdir)"; \
102 rel_src_subdir="../"; \
104 if [ x"$(shell echo "$(top_builddir)" | grep "^/" | wc -l)" = x"1" ]; then \
105 echo "Examples: absolute top_builddir path $(top_builddir)"; \
106 rel_build_subdir=""; \
108 echo "Examples: relative top_builddir path $(top_builddir)"; \
109 rel_build_subdir="../"; \
111 for subdir in $(SUBDIRS_PROXY); do \
112 (cd $$subdir && $(MAKE) AM_CC="$(CC)" AM_CPPFLAGS="$(CPPFLAGS) -I$$rel_src_subdir$(top_srcdir)/include/ -I$$rel_build_subdir$(top_builddir)/include/" AM_CFLAGS='$(CFLAGS)' AM_LDFLAGS='$(LDFLAGS) -L../../../liblttng-ust/.libs -Wl,-rpath="$(PWD)/../../liblttng-ust/.libs/" -Wl,-rpath-link="$(PWD)/../../liblttng-ust/.libs/"' LTTNG_GEN_TP_PATH="../../../tools/" $(AM_MAKEFLAGS) all && cd ..) || exit 1; \
114 if [ x"$(SUBDIRS_JUL)" != x"" ]; then \
115 for subdir in $(SUBDIRS_JUL); do \
116 (cd $(SUBDIRS_JUL) && $(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; \
119 if [ x"$(SUBDIRS_LOG4J)" != x"" ]; then \
120 for subdir in $(SUBDIRS_LOG4J); do \
121 (cd $(SUBDIRS_LOG4J) && $(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; \
126 @for subdir in $(SUBDIRS_PROXY); do \
127 if [ -d $$subdir ]; then \
128 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) clean && cd ..) || exit 1; \
131 if [ x"$(SUBDIRS_JUL)" != x"" ]; then \
132 for subdir in $(SUBDIRS_JUL); do \
133 if [ -d $$subdir ]; then \
134 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) clean && cd ..) || exit 1; \
138 if [ x"$(SUBDIRS_LOG4J)" != x"" ]; then \
139 for subdir in $(SUBDIRS_LOG4J); do \
140 if [ -d $$subdir ]; then \
141 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) clean && cd ..) || exit 1; \
145 if [ x"$(srcdir)" != x"$(builddir)" ]; then \
146 for subdir in $(SUBDIRS_PROXY) $(SUBDIRS_JUL) $(SUBDIRS_LOG4J); do \
147 rm -rf $(builddir)/$$subdir; \