fix: use configured python when building the examples
authorMichael Jeanson <mjeanson@efficios.com>
Tue, 23 Mar 2021 16:09:49 +0000 (12:09 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 23 Mar 2021 17:53:42 +0000 (13:53 -0400)
Prior to the refactoring of the autotools setup we used different python
detection mechanisms for the python agent feature and the example code.
The example code detection was flawed as it would only work with a
python binary named exactly 'python'. Wire the detected python binary in
the examples Makefile integration.

Change-Id: I07b9222a8869ff154073e5b72fb2ac0d70f14896
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
doc/examples/Makefile.am
doc/examples/gen-tp/Makefile

index d713d1eadb8108ed57e653c486c7cc537afeb7c3..c16210f43414564ed522ce14f694c92c74aea8a8 100644 (file)
@@ -132,6 +132,7 @@ all-local:
                        $(MAKE) all \
                                AR="$(AR)" \
                                CC="$(CC)" \
+                               PYTHON="$(PYTHON)" \
                                CPPFLAGS="$(CPPFLAGS)" \
                                AM_CPPFLAGS="$(AM_CPPFLAGS) \
                                -I$$rel_src_subdir$(top_srcdir)/include/ \
index de62e481485ccbfc1e3fe9a4e4eac0e26ea60a11..07627f3deed10f9180c98a2c966dfce232efc187 100644 (file)
@@ -10,6 +10,8 @@
 #
 # This makefile is purposefully kept simple to support GNU and BSD make.
 
+PYTHON := python
+
 LIBS = -ldl -llttng-ust                #On Linux
 #LIBS = -lc -llttng-ust                #On BSD
 AM_V_P := :
@@ -39,7 +41,7 @@ sample.o: sample.c sample_tracepoint.h
                CFLAGS="$(AM_CFLAGS) $(CFLAGS)" \
                LDFLAGS="$(AM_LDFLAGS) $(LDFLAGS)" \
                CC="$(CC)" \
-               $(LTTNG_GEN_TP_PATH)lttng-gen-tp -o $@ $<
+               $(PYTHON) $(LTTNG_GEN_TP_PATH)lttng-gen-tp -o $@ $<
 
 # The following rule can be used to generate all files instead of having one
 # for each file type. Note that the sample.o has a dependency on the
@@ -49,11 +51,11 @@ sample.o: sample.c sample_tracepoint.h
 
 %.h: %.tp
        @if $(AM_V_P); then set -x; else echo "  GEN      $@"; fi; \
-               $(LTTNG_GEN_TP_PATH)lttng-gen-tp -o $@ $<
+               $(PYTHON) $(LTTNG_GEN_TP_PATH)lttng-gen-tp -o $@ $<
 
 %.c: %.tp
        @if $(AM_V_P); then set -x; else echo "  GEN      $@"; fi; \
-               $(LTTNG_GEN_TP_PATH)lttng-gen-tp -o $@ $<
+               $(PYTHON)  $(LTTNG_GEN_TP_PATH)lttng-gen-tp -o $@ $<
 
 .PHONY: clean
 clean:
This page took 0.027382 seconds and 4 git commands to generate.