linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH BlueZ] build: Fix out-of-tree builds
@ 2012-09-28 19:43 Anderson Lizardo
  2012-10-01  6:38 ` Marcel Holtmann
  0 siblings, 1 reply; 4+ messages in thread
From: Anderson Lizardo @ 2012-09-28 19:43 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Anderson Lizardo

This commit makes a few changes that mostly affect "out-of-tree" builds:

* Fix symlink creation for profiles/sap/sap.c (should use build
  directory, not source tree).
* Remove useless -I$(builddir)/{tools,health} directives (these
  build directories do not contain any headers).
* Add -I$(srcdir)/profiles/sap (necessary because sap.c is a symlink
  into the build directory, and refers to headers in the source tree).

Tested with:

./bootstrap
mkdir build
cd build
../configure [...]
---
 Makefile.am |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index c27eb01..257c18a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -405,10 +405,10 @@ AM_CFLAGS += @DBUS_CFLAGS@ @GLIB_CFLAGS@
 INCLUDES = -I$(builddir)/lib -I$(builddir)/src -I$(srcdir)/src \
 			-I$(srcdir)/audio -I$(srcdir)/sbc -I$(srcdir)/gdbus \
 			-I$(srcdir)/attrib -I$(srcdir)/btio -I$(srcdir)/tools \
-			-I$(builddir)/tools -I$(srcdir)/monitor
+			-I$(srcdir)/monitor
 
-if MCAP
-INCLUDES += -I$(builddir)/health
+if SAPPLUGIN
+INCLUDES += -I$(srcdir)/profiles/sap
 endif
 
 unit_objects =
@@ -447,7 +447,7 @@ audio/telephony.c: audio/@TELEPHONY_DRIVER@
 	$(AM_V_GEN)$(LN_S) $(abs_top_builddir)/$< $@
 
 profiles/sap/sap.c: profiles/sap/@SAP_DRIVER@
-	$(AM_V_GEN)$(LN_S) $(abs_top_srcdir)/$< $@
+	$(AM_V_GEN)$(LN_S) $(abs_top_builddir)/$< $@
 
 profiles/input/suspend.c: profiles/input/@HOG_SUSPEND_DRIVER@
 	$(AM_V_GEN)$(LN_S) $(abs_top_srcdir)/$< $@
-- 
1.7.9.5


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

* Re: [PATCH BlueZ] build: Fix out-of-tree builds
  2012-09-28 19:43 [PATCH BlueZ] build: Fix out-of-tree builds Anderson Lizardo
@ 2012-10-01  6:38 ` Marcel Holtmann
  2012-10-01 10:50   ` Anderson Lizardo
  0 siblings, 1 reply; 4+ messages in thread
From: Marcel Holtmann @ 2012-10-01  6:38 UTC (permalink / raw)
  To: Anderson Lizardo; +Cc: linux-bluetooth

Hi Anderson,

> This commit makes a few changes that mostly affect "out-of-tree" builds:
> 
> * Fix symlink creation for profiles/sap/sap.c (should use build
>   directory, not source tree).
> * Remove useless -I$(builddir)/{tools,health} directives (these
>   build directories do not contain any headers).
> * Add -I$(srcdir)/profiles/sap (necessary because sap.c is a symlink
>   into the build directory, and refers to headers in the source tree).
> 
> Tested with:
> 
> ./bootstrap
> mkdir build
> cd build
> ../configure [...]
> ---
>  Makefile.am |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/Makefile.am b/Makefile.am
> index c27eb01..257c18a 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -405,10 +405,10 @@ AM_CFLAGS += @DBUS_CFLAGS@ @GLIB_CFLAGS@
>  INCLUDES = -I$(builddir)/lib -I$(builddir)/src -I$(srcdir)/src \
>  			-I$(srcdir)/audio -I$(srcdir)/sbc -I$(srcdir)/gdbus \
>  			-I$(srcdir)/attrib -I$(srcdir)/btio -I$(srcdir)/tools \
> -			-I$(builddir)/tools -I$(srcdir)/monitor
> +			-I$(srcdir)/monitor
>  
> -if MCAP
> -INCLUDES += -I$(builddir)/health
> +if SAPPLUGIN
> +INCLUDES += -I$(srcdir)/profiles/sap
>  endif
>  
>  unit_objects =
> @@ -447,7 +447,7 @@ audio/telephony.c: audio/@TELEPHONY_DRIVER@
>  	$(AM_V_GEN)$(LN_S) $(abs_top_builddir)/$< $@
>  
>  profiles/sap/sap.c: profiles/sap/@SAP_DRIVER@
> -	$(AM_V_GEN)$(LN_S) $(abs_top_srcdir)/$< $@
> +	$(AM_V_GEN)$(LN_S) $(abs_top_builddir)/$< $@
>  
>  profiles/input/suspend.c: profiles/input/@HOG_SUSPEND_DRIVER@
>  	$(AM_V_GEN)$(LN_S) $(abs_top_srcdir)/$< $@

personally I am no longer a big fan of these selection of a specific
driver. We should be able to build all of them and make the selection at
runtime. So there is more work needed here.

Regards

Marcel



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

* Re: [PATCH BlueZ] build: Fix out-of-tree builds
  2012-10-01  6:38 ` Marcel Holtmann
@ 2012-10-01 10:50   ` Anderson Lizardo
  2012-10-01 14:53     ` Marcel Holtmann
  0 siblings, 1 reply; 4+ messages in thread
From: Anderson Lizardo @ 2012-10-01 10:50 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: linux-bluetooth

Hi Marcel,

On Mon, Oct 1, 2012 at 2:38 AM, Marcel Holtmann <marcel@holtmann.org> wrote:
>>  profiles/sap/sap.c: profiles/sap/@SAP_DRIVER@
>> -     $(AM_V_GEN)$(LN_S) $(abs_top_srcdir)/$< $@
>> +     $(AM_V_GEN)$(LN_S) $(abs_top_builddir)/$< $@
>>
>>  profiles/input/suspend.c: profiles/input/@HOG_SUSPEND_DRIVER@
>>       $(AM_V_GEN)$(LN_S) $(abs_top_srcdir)/$< $@
>
> personally I am no longer a big fan of these selection of a specific
> driver. We should be able to build all of them and make the selection at
> runtime. So there is more work needed here.

I agree, this could also help on testing as well (actually, all
drivers are built, regardless of which one was selected by configure,
but only the selected object is linked).

What do you propose? a config file option, e.g. "sap_driver=u8500" ,
"hog_suspend_driver=dummy" , etc (this could fit of the INI config
format proposal).

Regards,
-- 
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil

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

* Re: [PATCH BlueZ] build: Fix out-of-tree builds
  2012-10-01 10:50   ` Anderson Lizardo
@ 2012-10-01 14:53     ` Marcel Holtmann
  0 siblings, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2012-10-01 14:53 UTC (permalink / raw)
  To: Anderson Lizardo; +Cc: linux-bluetooth

Hi Anderson,

> >>  profiles/sap/sap.c: profiles/sap/@SAP_DRIVER@
> >> -     $(AM_V_GEN)$(LN_S) $(abs_top_srcdir)/$< $@
> >> +     $(AM_V_GEN)$(LN_S) $(abs_top_builddir)/$< $@
> >>
> >>  profiles/input/suspend.c: profiles/input/@HOG_SUSPEND_DRIVER@
> >>       $(AM_V_GEN)$(LN_S) $(abs_top_srcdir)/$< $@
> >
> > personally I am no longer a big fan of these selection of a specific
> > driver. We should be able to build all of them and make the selection at
> > runtime. So there is more work needed here.
> 
> I agree, this could also help on testing as well (actually, all
> drivers are built, regardless of which one was selected by configure,
> but only the selected object is linked).
> 
> What do you propose? a config file option, e.g. "sap_driver=u8500" ,
> "hog_suspend_driver=dummy" , etc (this could fit of the INI config
> format proposal).

something like that. I have no clear idea. So just go ahead and propose
a patch set for it. We then can review it.

Regards

Marcel



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

end of thread, other threads:[~2012-10-01 14:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-28 19:43 [PATCH BlueZ] build: Fix out-of-tree builds Anderson Lizardo
2012-10-01  6:38 ` Marcel Holtmann
2012-10-01 10:50   ` Anderson Lizardo
2012-10-01 14:53     ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).