Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
* [lttng-dev] [PATCH lttng-tools v2] Fix python bindings' Makefile for out-of-tree builds
@ 2015-04-14 20:45 Simon Marchi
  2015-04-16 19:40 ` Jérémie Galarneau
  0 siblings, 1 reply; 2+ messages in thread
From: Simon Marchi @ 2015-04-14 20:45 UTC (permalink / raw)


The references to the built archives should use top_builddir and not
top_srcdir, because that's where they are.

And new in V2, I got a new error:

  lttng_wrap.c:2970:25: fatal error: lttng/lttng.h: No such file or directory
   #include <lttng/lttng.h>

I think we are missing the -I$(top_srcdir)/include. I had not noticed this
previously, probably because I had an lttng/lttng.h in
/usr/local/include or /usr/include. Also, the other includes seem
unnecessary. The This is not really related to out-of-tree builds though.

Signed-off-by: Simon Marchi <simon.marchi at polymtl.ca>
---
 extras/bindings/swig/python/Makefile.am | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/extras/bindings/swig/python/Makefile.am b/extras/bindings/swig/python/Makefile.am
index ec35930..35f28d5 100644
--- a/extras/bindings/swig/python/Makefile.am
+++ b/extras/bindings/swig/python/Makefile.am
@@ -1,8 +1,7 @@
 lttng.i: lttng.i.in
-	sed "s/LTTNG_VERSION_STR/LTTng $(PACKAGE_VERSION)/g" <lttng.i.in >lttng.i
+	sed "s/LTTNG_VERSION_STR/LTTng $(PACKAGE_VERSION)/g" < $(srcdir)/lttng.i.in >lttng.i
 
-AM_CFLAGS = $(PYTHON_INCLUDE) -I$(top_srcdir)/lib/lttng-ctl -I../common \
-              $(BUDDY_CFLAGS)
+AM_CFLAGS = $(PYTHON_INCLUDE) -I$(top_srcdir)/include
 
 EXTRA_DIST = lttng.i.in
 nodist_python_PYTHON = lttng.py
@@ -12,9 +11,9 @@ MAINTAINERCLEANFILES = lttng_wrap.c lttng.py
 
 nodist__lttng_la_SOURCES = lttng_wrap.c
 _lttng_la_LDFLAGS = -module
-_lttng_la_LIBADD = 	$(top_srcdir)/src/lib/lttng-ctl/liblttng-ctl.la 		\
-			$(top_srcdir)/src/common/sessiond-comm/libsessiond-comm.la		\
-			$(top_srcdir)/src/common/libcommon.la
+_lttng_la_LIBADD = 	$(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la 		\
+			$(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la		\
+			$(top_builddir)/src/common/libcommon.la
 
 lttng_wrap.c: lttng.i
 	$(SWIG) -python -I. -I$(top_srcdir)/src/common/sessiond-comm lttng.i
-- 
2.3.5




^ permalink raw reply	[flat|nested] 2+ messages in thread

* [lttng-dev] [PATCH lttng-tools v2] Fix python bindings' Makefile for out-of-tree builds
  2015-04-14 20:45 [lttng-dev] [PATCH lttng-tools v2] Fix python bindings' Makefile for out-of-tree builds Simon Marchi
@ 2015-04-16 19:40 ` Jérémie Galarneau
  0 siblings, 0 replies; 2+ messages in thread
From: Jérémie Galarneau @ 2015-04-16 19:40 UTC (permalink / raw)


Merged, thanks!

J?r?mie

On Tue, Apr 14, 2015 at 4:45 PM, Simon Marchi <simon.marchi at polymtl.ca> wrote:
> The references to the built archives should use top_builddir and not
> top_srcdir, because that's where they are.
>
> And new in V2, I got a new error:
>
>   lttng_wrap.c:2970:25: fatal error: lttng/lttng.h: No such file or directory
>    #include <lttng/lttng.h>
>
> I think we are missing the -I$(top_srcdir)/include. I had not noticed this
> previously, probably because I had an lttng/lttng.h in
> /usr/local/include or /usr/include. Also, the other includes seem
> unnecessary. The This is not really related to out-of-tree builds though.
>
> Signed-off-by: Simon Marchi <simon.marchi at polymtl.ca>
> ---
>  extras/bindings/swig/python/Makefile.am | 11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/extras/bindings/swig/python/Makefile.am b/extras/bindings/swig/python/Makefile.am
> index ec35930..35f28d5 100644
> --- a/extras/bindings/swig/python/Makefile.am
> +++ b/extras/bindings/swig/python/Makefile.am
> @@ -1,8 +1,7 @@
>  lttng.i: lttng.i.in
> -       sed "s/LTTNG_VERSION_STR/LTTng $(PACKAGE_VERSION)/g" <lttng.i.in >lttng.i
> +       sed "s/LTTNG_VERSION_STR/LTTng $(PACKAGE_VERSION)/g" < $(srcdir)/lttng.i.in >lttng.i
>
> -AM_CFLAGS = $(PYTHON_INCLUDE) -I$(top_srcdir)/lib/lttng-ctl -I../common \
> -              $(BUDDY_CFLAGS)
> +AM_CFLAGS = $(PYTHON_INCLUDE) -I$(top_srcdir)/include
>
>  EXTRA_DIST = lttng.i.in
>  nodist_python_PYTHON = lttng.py
> @@ -12,9 +11,9 @@ MAINTAINERCLEANFILES = lttng_wrap.c lttng.py
>
>  nodist__lttng_la_SOURCES = lttng_wrap.c
>  _lttng_la_LDFLAGS = -module
> -_lttng_la_LIBADD =     $(top_srcdir)/src/lib/lttng-ctl/liblttng-ctl.la                 \
> -                       $(top_srcdir)/src/common/sessiond-comm/libsessiond-comm.la              \
> -                       $(top_srcdir)/src/common/libcommon.la
> +_lttng_la_LIBADD =     $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la               \
> +                       $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la            \
> +                       $(top_builddir)/src/common/libcommon.la
>
>  lttng_wrap.c: lttng.i
>         $(SWIG) -python -I. -I$(top_srcdir)/src/common/sessiond-comm lttng.i
> --
> 2.3.5
>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev



-- 
J?r?mie Galarneau
EfficiOS Inc.
http://www.efficios.com



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-04-16 19:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-14 20:45 [lttng-dev] [PATCH lttng-tools v2] Fix python bindings' Makefile for out-of-tree builds Simon Marchi
2015-04-16 19:40 ` Jérémie Galarneau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox