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_clock_overridedir = ${docdir}/examples/clock-override
10 doc_examples_java_juldir = ${docdir}/examples/java-jul
11 dist_doc_examples_java_jul_DATA = java-jul/Makefile \
14 SUBDIRS_JUL = java-jul
17 dist_doc_examples_DATA = README
19 dist_doc_examples_easy_ust_DATA = easy-ust/Makefile \
21 easy-ust/sample_component_provider.h easy-ust/tp.c
23 dist_doc_examples_gen_tp_DATA = gen-tp/Makefile \
24 gen-tp/sample.c gen-tp/sample_tracepoint.tp
26 dist_doc_examples_demo_DATA = demo/demo.c \
33 demo/ust_tests_demo2.h \
34 demo/ust_tests_demo3.h \
37 dist_doc_examples_hello_static_lib_DATA = hello-static-lib/Makefile \
38 hello-static-lib/hello.c \
39 hello-static-lib/README \
40 hello-static-lib/ust_tests_hello.h \
43 dist_doc_examples_demo_tracef_DATA = demo-tracef/Makefile \
44 demo-tracef/demo-tracef.c \
47 dist_doc_examples_clock_override_DATA = clock-override/Makefile \
48 clock-override/lttng-ust-clock-override-example.c \
49 clock-override/run-clock-override \
53 # Don't build examples if shared libraries support was explicitly
56 # Copies are for VPATH build support
57 SUBDIRS_PROXY = easy-ust demo hello-static-lib demo-tracef clock-override
59 if BUILD_GEN_TP_EXAMPLES
60 SUBDIRS_PROXY += gen-tp
64 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
65 for subdir in $(SUBDIRS_PROXY) $(SUBDIRS_JUL); do \
66 cp -pfR $(srcdir)/$$subdir $(builddir); \
69 if [ x"$(shell echo "$(top_srcdir)" | grep "^/" | wc -l)" = x"1" ]; then \
70 echo "Examples: absolute top_srcdir path $(top_srcdir)"; \
73 echo "Examples: relative top_srcdir path $(top_srcdir)"; \
74 rel_src_subdir="../"; \
76 if [ x"$(shell echo "$(top_builddir)" | grep "^/" | wc -l)" = x"1" ]; then \
77 echo "Examples: absolute top_builddir path $(top_builddir)"; \
78 rel_build_subdir=""; \
80 echo "Examples: relative top_builddir path $(top_builddir)"; \
81 rel_build_subdir="../"; \
83 for subdir in $(SUBDIRS_PROXY); do \
84 (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; \
86 if [ x"$(SUBDIRS_JUL)" != x"" ]; then \
87 for subdir in $(SUBDIRS_JUL); do \
88 (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; \
93 @for subdir in $(SUBDIRS_PROXY); do \
94 if [ -d $$subdir ]; then \
95 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) clean && cd ..) || exit 1; \
98 if [ x"$(SUBDIRS_JUL)" != x"" ]; then \
99 for subdir in $(SUBDIRS_JUL); do \
100 if [ -d $$subdir ]; then \
101 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) clean && cd ..) || exit 1; \
105 if [ x"$(srcdir)" != x"$(builddir)" ]; then \
106 for subdir in $(SUBDIRS_PROXY) $(SUBDIRS_JUL); do \
107 rm -rf $(builddir)/$$subdir; \