Commit | Line | Data |
---|---|---|
a106a9f8 | 1 | doc_examplesdir = ${docdir}/examples |
7ccf75d3 MD |
2 | doc_examples_easy_ustdir = ${docdir}/examples/easy-ust |
3 | doc_examples_gen_tpdir = ${docdir}/examples/gen-tp | |
60302adc | 4 | doc_examples_demodir = ${docdir}/examples/demo |
a106a9f8 | 5 | doc_examples_hello_static_libdir = ${docdir}/examples/hello-static-lib |
af9f5e3c | 6 | doc_examples_demo_tracefdir = ${docdir}/examples/demo-tracef |
eb8246a0 | 7 | doc_examples_demo_tracelogdir = ${docdir}/examples/demo-tracelog |
f9364363 | 8 | doc_examples_clock_overridedir = ${docdir}/examples/clock-override |
5e1b7b8b | 9 | doc_examples_getcpu_overridedir = ${docdir}/examples/getcpu-override |
a106a9f8 | 10 | |
be347eb9 | 11 | if BUILD_JAVA_AGENT_WITH_JUL |
849202d4 DG |
12 | doc_examples_java_juldir = ${docdir}/examples/java-jul |
13 | dist_doc_examples_java_jul_DATA = java-jul/Makefile \ | |
501f6777 CB |
14 | java-jul/Hello.java \ |
15 | java-jul/run | |
849202d4 | 16 | SUBDIRS_JUL = java-jul |
849202d4 DG |
17 | endif |
18 | ||
be347eb9 MJ |
19 | if BUILD_JAVA_AGENT_WITH_LOG4J |
20 | doc_examples_java_log4jdir = ${docdir}/examples/java-log4j | |
21 | dist_doc_examples_java_log4j_DATA = java-log4j/Makefile \ | |
22 | java-log4j/Hello.java \ | |
23 | java-log4j/run | |
24 | SUBDIRS_LOG4J = java-log4j | |
25 | endif | |
26 | ||
37258731 PP |
27 | if BUILD_PYTHON_AGENT |
28 | doc_examples_pythondir = ${docdir}/examples/python | |
29 | dist_doc_examples_python_DATA = python/hello.py | |
30 | endif | |
31 | ||
a106a9f8 | 32 | dist_doc_examples_DATA = README |
7ccf75d3 MD |
33 | |
34 | dist_doc_examples_easy_ust_DATA = easy-ust/Makefile \ | |
35 | easy-ust/sample.c \ | |
36 | easy-ust/sample_component_provider.h easy-ust/tp.c | |
37 | ||
38 | dist_doc_examples_gen_tp_DATA = gen-tp/Makefile \ | |
39 | gen-tp/sample.c gen-tp/sample_tracepoint.tp | |
60302adc JG |
40 | |
41 | dist_doc_examples_demo_DATA = demo/demo.c \ | |
42 | demo/demo-trace \ | |
43 | demo/Makefile \ | |
44 | demo/README \ | |
45 | demo/tp2.c \ | |
46 | demo/tp3.c \ | |
47 | demo/tp.c \ | |
48 | demo/ust_tests_demo2.h \ | |
49 | demo/ust_tests_demo3.h \ | |
50 | demo/ust_tests_demo.h | |
a106a9f8 JG |
51 | |
52 | dist_doc_examples_hello_static_lib_DATA = hello-static-lib/Makefile \ | |
53 | hello-static-lib/hello.c \ | |
54 | hello-static-lib/README \ | |
55 | hello-static-lib/ust_tests_hello.h \ | |
56 | hello-static-lib/tp.c | |
57 | ||
af9f5e3c MD |
58 | dist_doc_examples_demo_tracef_DATA = demo-tracef/Makefile \ |
59 | demo-tracef/demo-tracef.c \ | |
60 | demo-tracef/README | |
61 | ||
eb8246a0 MD |
62 | dist_doc_examples_demo_tracelog_DATA = demo-tracelog/Makefile \ |
63 | demo-tracelog/demo-tracelog.c \ | |
64 | demo-tracelog/README | |
65 | ||
f9364363 MD |
66 | dist_doc_examples_clock_override_DATA = clock-override/Makefile \ |
67 | clock-override/lttng-ust-clock-override-example.c \ | |
68 | clock-override/run-clock-override \ | |
69 | clock-override/README | |
70 | ||
5e1b7b8b MD |
71 | dist_doc_examples_getcpu_override_DATA = getcpu-override/Makefile \ |
72 | getcpu-override/lttng-ust-getcpu-override-example.c \ | |
73 | getcpu-override/run-getcpu-override \ | |
74 | getcpu-override/README | |
75 | ||
92414a62 MD |
76 | if NO_SHARED |
77 | # Don't build examples if shared libraries support was explicitly | |
78 | # disabled. | |
79 | else | |
80 | # Copies are for VPATH build support | |
5e1b7b8b | 81 | SUBDIRS_PROXY = easy-ust demo hello-static-lib demo-tracef clock-override \ |
eb8246a0 | 82 | getcpu-override demo-tracelog |
2b90f1d3 JG |
83 | |
84 | if BUILD_GEN_TP_EXAMPLES | |
85 | SUBDIRS_PROXY += gen-tp | |
86 | endif | |
92414a62 MD |
87 | |
88 | all-local: | |
89 | @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ | |
be347eb9 | 90 | for subdir in $(SUBDIRS_PROXY) $(SUBDIRS_JUL) $(SUBDIRS_LOG4J); do \ |
a41cceb9 | 91 | cp -pfR $(srcdir)/$$subdir $(builddir); \ |
92414a62 | 92 | done; \ |
0faf99b8 MD |
93 | fi; \ |
94 | if [ x"$(shell echo "$(top_srcdir)" | grep "^/" | wc -l)" = x"1" ]; then \ | |
95 | echo "Examples: absolute top_srcdir path $(top_srcdir)"; \ | |
96 | rel_src_subdir=""; \ | |
97 | else \ | |
98 | echo "Examples: relative top_srcdir path $(top_srcdir)"; \ | |
99 | rel_src_subdir="../"; \ | |
100 | fi; \ | |
101 | if [ x"$(shell echo "$(top_builddir)" | grep "^/" | wc -l)" = x"1" ]; then \ | |
102 | echo "Examples: absolute top_builddir path $(top_builddir)"; \ | |
103 | rel_build_subdir=""; \ | |
104 | else \ | |
105 | echo "Examples: relative top_builddir path $(top_builddir)"; \ | |
106 | rel_build_subdir="../"; \ | |
107 | fi; \ | |
92414a62 | 108 | for subdir in $(SUBDIRS_PROXY); do \ |
4de5e077 | 109 | (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; \ |
0faf99b8 MD |
110 | done; \ |
111 | if [ x"$(SUBDIRS_JUL)" != x"" ]; then \ | |
849202d4 | 112 | for subdir in $(SUBDIRS_JUL); do \ |
8e57e02f | 113 | (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; \ |
849202d4 | 114 | done; \ |
be347eb9 MJ |
115 | fi; \ |
116 | if [ x"$(SUBDIRS_LOG4J)" != x"" ]; then \ | |
117 | for subdir in $(SUBDIRS_LOG4J); do \ | |
8e57e02f | 118 | (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; \ |
be347eb9 | 119 | done; \ |
0faf99b8 | 120 | fi; |
92414a62 MD |
121 | |
122 | clean-local: | |
0faf99b8 MD |
123 | @for subdir in $(SUBDIRS_PROXY); do \ |
124 | if [ -d $$subdir ]; then \ | |
849202d4 | 125 | (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) clean && cd ..) || exit 1; \ |
0faf99b8 MD |
126 | fi; \ |
127 | done; \ | |
128 | if [ x"$(SUBDIRS_JUL)" != x"" ]; then \ | |
129 | for subdir in $(SUBDIRS_JUL); do \ | |
130 | if [ -d $$subdir ]; then \ | |
131 | (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) clean && cd ..) || exit 1; \ | |
132 | fi; \ | |
849202d4 | 133 | done; \ |
0faf99b8 | 134 | fi; \ |
be347eb9 MJ |
135 | if [ x"$(SUBDIRS_LOG4J)" != x"" ]; then \ |
136 | for subdir in $(SUBDIRS_LOG4J); do \ | |
137 | if [ -d $$subdir ]; then \ | |
138 | (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) clean && cd ..) || exit 1; \ | |
139 | fi; \ | |
140 | done; \ | |
141 | fi; \ | |
0faf99b8 | 142 | if [ x"$(srcdir)" != x"$(builddir)" ]; then \ |
be347eb9 | 143 | for subdir in $(SUBDIRS_PROXY) $(SUBDIRS_JUL) $(SUBDIRS_LOG4J); do \ |
92414a62 MD |
144 | rm -rf $(builddir)/$$subdir; \ |
145 | done; \ | |
0faf99b8 | 146 | fi; |
92414a62 | 147 | endif |