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