[lttng-dev] [PATCH] Fix out of tree build for doc examples

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Thu Oct 31 08:12:03 EDT 2013


----- Original Message -----
> From: "Cristiana Voicu" <cristiana.voicu at intel.com>
> To: lttng-dev at lists.lttng.org
> Cc: "Cristiana Voicu" <cristiana.voicu at intel.com>
> Sent: Thursday, October 31, 2013 7:51:46 AM
> Subject: [lttng-dev] [PATCH] Fix out of tree build for doc examples
> 
> Signed-off-by: Cristiana Voicu <cristiana.voicu at intel.com>
> 
> Index: userspace-rcu-0.8.0/doc/examples/Makefile.am
> ===================================================================
> --- userspace-rcu-0.8.0.orig/doc/examples/Makefile.am	2013-08-30
> 21:25:20.000000000 +0300
> +++ userspace-rcu-0.8.0/doc/examples/Makefile.am	2013-10-21
> 17:52:34.774597179 +0300
> @@ -128,7 +128,7 @@
>  			cp -fR $(srcdir)/$$subdir $(builddir); \
>  		done; \
>  	fi
> -	$(MAKE) -f dist-files/Makefile AM_CPPFLAGS="$(CPPFLAGS) -I../../../urcu/
> -I../../../" AM_CFLAGS='$(CFLAGS)' AM_LDFLAGS='$(LDFLAGS) -L../../../.libs/
> -Wl,-rpath="$(PWD)/../../.libs/"' $(AM_MAKEFLAGS) all
> +	$(MAKE) -f dist-files/Makefile AM_CPPFLAGS="$(CPPFLAGS) -I$(top_srcdir)
> -I../../../urcu/ -I../../../" AM_CFLAGS='$(CFLAGS)' AM_LDFLAGS='$(LDFLAGS)
> -L../../../.libs/ -Wl,-rpath="$(PWD)/../../.libs/"' $(AM_MAKEFLAGS) all

I understand the issue, but the proposed fix is not quite right.

When we build examples, we are passing the AM_CPPFLAGS directly to Makefiles executed in subdirectories. Therefore, $(top_srcdir) is OK when it points to an absolute path, but points to a location that does not exist when it is a relative path (in the case we are not doing a out of tree build). Or someone could have put some headers there that would unexpectedly have precedence over the real urcu headers.

Can you provide an updated patch that takes care of this ?

Thanks,

Mathieu

>  
>  clean-local:
>  	$(MAKE) -f dist-files/Makefile $(AM_MAKEFLAGS) clean
> 
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
> 

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list