[lttng-dev] [PATCH 2/2] Add the CFLAGS for an "out of system" building of the gen-tp example files.

Jimmy Durand Wesolowski jimmy.durand.wesolowski at gmail.com
Thu Aug 22 04:27:31 EDT 2013


From: Jimmy Durand Wesolowski <jimmy.durand-wesolowski-ext at oneaccess-net.com>

---
 doc/examples/Makefile.am     |    2 +-
 doc/examples/gen-tp/Makefile |    9 ++++++---
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am
index 8c4901b..303a11e 100644
--- a/doc/examples/Makefile.am
+++ b/doc/examples/Makefile.am
@@ -45,7 +45,7 @@ all-local:
 		done; \
 	fi
 	for subdir in $(SUBDIRS_PROXY); do \
-		cd $$subdir && $(MAKE) AM_CPPFLAGS="-I../../../include/" AM_LDFLAGS='-L../../../liblttng-ust/.libs/ -Wl,-rpath="$(PWD)/../../liblttng-ust/.libs/"' LTTNG_GEN_TP_PATH="../../../tools/" $(AM_MAKEFLAGS) all; cd ..; \
+		cd $$subdir && $(MAKE) AM_CPPFLAGS="${CPPFLAGS} -I../../../include/" AM_LDFLAGS='${LDFLAGS} -L../../../liblttng-ust/.libs/ -Wl,-rpath="$(PWD)/../../liblttng-ust/.libs/"' LTTNG_GEN_TP_PATH="../../../tools/" $(AM_MAKEFLAGS) all; cd ..; \
 	done
 
 clean-local:
diff --git a/doc/examples/gen-tp/Makefile b/doc/examples/gen-tp/Makefile
index e5e3cd3..c2dd05d 100644
--- a/doc/examples/gen-tp/Makefile
+++ b/doc/examples/gen-tp/Makefile
@@ -1,6 +1,8 @@
 # Copyright (C) 2011-2012  Matthew Khouzam <matthew.khouzam at ericsson.com>
 # Copyright (C) 2012  Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
 # Copyright (C) 2012  Yannick Brosseau <yannick.brosseau at gmail.com>
+# Copyright (C) 2013  Jimmy Durand Wesolowski
+#                       <jimmy.durand.wesolowski at gmail.com>
 #
 # THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
 # OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
@@ -39,8 +41,9 @@ sample.o: sample.c sample_tracepoint.h
 
 # This rule generate .o only and depends on rules for generating
 # the .h and .c
+
 %.o: %.tp %.c %.h
-	$(LTTNG_GEN_TP_PATH)lttng-gen-tp -o $@ $<
+	CFLAGS="$(AM_CPPFLAGS)" $(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,10 +52,10 @@ sample.o: sample.c sample_tracepoint.h
 #	lttng-gen-tp $<
 
 %.h: %.tp
-	$(LTTNG_GEN_TP_PATH)lttng-gen-tp -o $@ $<
+	CFLAGS="$(AM_CPPFLAGS)" $(LTTNG_GEN_TP_PATH)lttng-gen-tp -o $@ $<
 
 %.c: %.tp
-	$(LTTNG_GEN_TP_PATH)lttng-gen-tp -o $@ $<
+	CFLAGS="$(AM_CPPFLAGS)" $(LTTNG_GEN_TP_PATH)lttng-gen-tp -o $@ $<
 
 .PHONY: clean
 clean:
-- 
1.7.10.4




More information about the lttng-dev mailing list