Skip to contentSkip to conversation

Bluetooth kbuild fix and config cleanup

PATCH In review Marcel Holtmann 2 participants 4 messages Oct 6, 2002 – Oct 7, 2002

Subsystems (2)
lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

PATCH 1/1 Bluetooth kbuild fix and config cleanup

You can import this changeset into BK by piping this whole message to:
'| bk receive [path to repository]' or apply the patch as usual.

===================================================================

[email protected], 2002-10-06 19:14:49+02:00, [email protected]
Bluetooth kbuild fix and config cleanup

This patch removes the obsolete O_TARGET and cleans up the Config.in and Config.help files to have a unique CONFIG_BLUEZ prefix. Additional two missing help entries are added.

 drivers/bluetooth/Makefile       |   15 ++++++++++-----
 net/bluetooth/Config.help        |   26 --------------------------
 net/bluetooth/Config.in          |    4 +++-
 net/bluetooth/Makefile           |   26 ++++++++------------------
 net/bluetooth/bnep/Config.help   |   21 +++++++++++++++++++++
 net/bluetooth/bnep/Config.in     |    6 ++++--
 net/bluetooth/bnep/Makefile      |    7 +++----
 net/bluetooth/rfcomm/Config.help |   12 ++++++++++++
 net/bluetooth/rfcomm/Config.in   |    4 +++-
 net/bluetooth/rfcomm/Makefile    |   12 +++++++-----
 10 files changed, 71 insertions(+), 62 deletions(-)
drivers/bluetooth/Makefile +10 -5
diff -Nru a/drivers/bluetooth/Makefile b/drivers/bluetooth/Makefile
@@ -1,5 +1,5 @@
 #
-# Makefile for Bluetooth HCI device drivers.
+# Makefile for the Linux Bluetooth HCI device drivers.
 #
 
 obj-$(CONFIG_BLUEZ_HCIUSB)	+= hci_usb.o
@@ -9,9 +9,14 @@
 obj-$(CONFIG_BLUEZ_HCIBT3C)	+= bt3c_cs.o
 obj-$(CONFIG_BLUEZ_HCIBLUECARD)	+= bluecard_cs.o
 
-hci_uart-y				:= hci_ldisc.o
-hci_uart-$(CONFIG_BLUEZ_HCIUART_H4)	+= hci_h4.o
-hci_uart-$(CONFIG_BLUEZ_HCIUART_BCSP)	+= hci_bcsp.o
-hci_uart-objs				:= $(hci_uart-y)
+hci_uart-objs := hci_ldisc.o
+
+ifeq ($(CONFIG_BLUEZ_HCIUART_H4),y)
+  hci_uart-objs += hci_h4.o
+endif
+
+ifeq ($(CONFIG_BLUEZ_HCIUART_BCSP),y)
+  hci_uart-objs += hci_bcsp.o
+endif
 
 include $(TOPDIR)/Rules.make
net/bluetooth/Config.help +0 -26
diff -Nru a/net/bluetooth/Config.help b/net/bluetooth/Config.help
@@ -33,19 +33,6 @@
   Say Y here to compile L2CAP support into the kernel or say M to
   compile it as module (l2cap.o).
 
-RFCOMM protocol support
-CONFIG_BLUEZ_RFCOMM
-  RFCOMM provides connection oriented stream transport. RFCOMM
-  support is required for Dialup Networking, OBEX and other Bluetooth
-  applications.
-
-  Say Y here to compile RFCOMM support into the kernel or say M to
-  compile it as module (rfcomm.o).
-
-RFCOMM TTY emulation support
-CONFIG_RFCOMM_TTY
-  This options enables TTY emulation support for RFCOMM channels.
-
 SCO links support
 CONFIG_BLUEZ_SCO
   SCO link provides voice transport over Bluetooth. SCO support is
@@ -53,17 +40,4 @@
 
   Say Y here to compile SCO support into the kernel or say M to
   compile it as module (sco.o).
-
-BNEP protocol support
-CONFIG_BLUEZ_BNEP
-  BNEP (Bluetooth Network Encapsulation Protocol) is Ethernet
-  emulation layer on top of Bluetooth. BNEP is required for Bluetooth
-  PAN (Personal Area Network).
-
-  To use BNEP, you will need user-space utilities provided in the 
-  BlueZ-PAN package.
-  For more information, see <http://bluez.sourceforge.net>.
-
-  Say Y here to compile BNEP support into the kernel or say M to
-  compile it as module (bnep.o).
 
net/bluetooth/Config.in +3 -1
diff -Nru a/net/bluetooth/Config.in b/net/bluetooth/Config.in
@@ -1,8 +1,9 @@
 #
-# Bluetooth configuration
+# Bluetooth subsystem configuration
 #
 
 if [ "$CONFIG_NET" != "n" ]; then
+
    mainmenu_option next_comment
    comment 'Bluetooth support'
    dep_tristate 'Bluetooth subsystem support' CONFIG_BLUEZ $CONFIG_NET
@@ -14,6 +15,7 @@
       source net/bluetooth/bnep/Config.in
       source drivers/bluetooth/Config.in
    fi
+
    endmenu
 fi
 
net/bluetooth/Makefile +8 -18
diff -Nru a/net/bluetooth/Makefile b/net/bluetooth/Makefile
@@ -1,25 +1,15 @@
 #
-# Makefile for the Bluetooth subsystem
+# Makefile for the Linux Bluetooth subsystem.
 #
 
-export-objs	:= syms.o
+export-objs := syms.o
 
-obj-$(CONFIG_BLUEZ) += bluez.o
-obj-$(CONFIG_BLUEZ_L2CAP) += l2cap.o
-obj-$(CONFIG_BLUEZ_SCO) += sco.o
+obj-$(CONFIG_BLUEZ)		+= bluez.o
+obj-$(CONFIG_BLUEZ_L2CAP)	+= l2cap.o
+obj-$(CONFIG_BLUEZ_SCO)		+= sco.o
+obj-$(CONFIG_BLUEZ_RFCOMM)	+= rfcomm/
+obj-$(CONFIG_BLUEZ_BNEP)	+= bnep/
 
-subdir-$(CONFIG_BLUEZ_BNEP) += bnep
-
-ifeq ($(CONFIG_BLUEZ_BNEP),y)
-obj-y += bnep/bnep.o
-endif
-
-subdir-$(CONFIG_BLUEZ_RFCOMM) += rfcomm
-
-ifeq ($(CONFIG_BLUEZ_RFCOMM),y)
-obj-y += rfcomm/rfcomm.o
-endif
-
-bluez-objs	:= af_bluetooth.o hci_core.o hci_conn.o hci_event.o hci_sock.o lib.o syms.o
+bluez-objs := af_bluetooth.o hci_core.o hci_conn.o hci_event.o hci_sock.o lib.o syms.o
 
 include $(TOPDIR)/Rules.make
net/bluetooth/bnep/Config.help new file +21 -0
diff -Nru a/net/bluetooth/bnep/Config.help b/net/bluetooth/bnep/Config.help
@@ -0,0 +1,21 @@
+BNEP protocol support
+CONFIG_BLUEZ_BNEP
+  BNEP (Bluetooth Network Encapsulation Protocol) is Ethernet
+  emulation layer on top of Bluetooth. BNEP is required for Bluetooth
+  PAN (Personal Area Network).
+
+  To use BNEP, you will need user-space utilities provided in the 
+  BlueZ-PAN package.
+  For more information, see <http://bluez.sourceforge.net>.
+
+  Say Y here to compile BNEP support into the kernel or say M to
+  compile it as module (bnep.o).
+
+BNEP multicast filter support
+CONFIG_BLUEZ_BNEP_MC_FILTER
+  This option enables the multicast filter support for BNEP.
+
+BNEP protocol filter support
+CONFIG_BLUEZ_BNEP_PROTO_FILTER
+  This option enables the protocol filter support for BNEP.
+
net/bluetooth/bnep/Config.in +4 -2
diff -Nru a/net/bluetooth/bnep/Config.in b/net/bluetooth/bnep/Config.in
@@ -1,6 +1,8 @@
 
 dep_tristate 'BNEP protocol support' CONFIG_BLUEZ_BNEP $CONFIG_BLUEZ_L2CAP
+
 if [ "$CONFIG_BLUEZ_BNEP" != "n" ]; then
-   bool '  Multicast filter support' CONFIG_BNEP_MC_FILTER
-   bool '  Protocol filter support'  CONFIG_BNEP_PROTO_FILTER
+   bool '  Multicast filter support' CONFIG_BLUEZ_BNEP_MC_FILTER
+   bool '  Protocol filter support'  CONFIG_BLUEZ_BNEP_PROTO_FILTER
 fi
+
net/bluetooth/bnep/Makefile +3 -4
diff -Nru a/net/bluetooth/bnep/Makefile b/net/bluetooth/bnep/Makefile
@@ -1,10 +1,9 @@
 #
-# Makefile for BNEP protocol
+# Makefile for the Linux Bluetooth BNEP layer.
 #
 
-O_TARGET := bnep.o
+obj-$(CONFIG_BLUEZ_BNEP) += bnep.o
 
-obj-y	 := core.o sock.o netdev.o crc32.o
-obj-m    += $(O_TARGET)
+bnep-objs := core.o sock.o netdev.o
 
 include $(TOPDIR)/Rules.make
net/bluetooth/rfcomm/Config.help new file +12 -0
diff -Nru a/net/bluetooth/rfcomm/Config.help b/net/bluetooth/rfcomm/Config.help
@@ -0,0 +1,12 @@
+RFCOMM protocol support
+CONFIG_BLUEZ_RFCOMM
+  RFCOMM provides connection oriented stream transport. RFCOMM
+  support is required for Dialup Networking, OBEX and other Bluetooth
+  applications.
+
+  Say Y here to compile RFCOMM support into the kernel or say M to
+  compile it as module (rfcomm.o).
+
+RFCOMM TTY emulation support
+CONFIG_BLUEZ_RFCOMM_TTY
+  This option enables TTY emulation support for RFCOMM channels.
net/bluetooth/rfcomm/Config.in +3 -1
diff -Nru a/net/bluetooth/rfcomm/Config.in b/net/bluetooth/rfcomm/Config.in
@@ -1,5 +1,7 @@
 
 dep_tristate 'RFCOMM protocol support' CONFIG_BLUEZ_RFCOMM $CONFIG_BLUEZ_L2CAP
+
 if [ "$CONFIG_BLUEZ_RFCOMM" != "n" ]; then
-   bool '  RFCOMM TTY support' CONFIG_RFCOMM_TTY
+   bool '  RFCOMM TTY support' CONFIG_BLUEZ_RFCOMM_TTY
 fi
+
net/bluetooth/rfcomm/Makefile +7 -5
diff -Nru a/net/bluetooth/rfcomm/Makefile b/net/bluetooth/rfcomm/Makefile
@@ -1,11 +1,13 @@
 #
-# Makefile for BNEP protocol
+# Makefile for the Linux Bluetooth RFCOMM layer.
 #
 
-O_TARGET := rfcomm.o
+obj-$(CONFIG_BLUEZ_RFCOMM) += rfcomm.o
 
-obj-y	 := core.o sock.o crc.o
-obj-$(CONFIG_RFCOMM_TTY) += tty.o
-obj-m    += $(O_TARGET)
+rfcomm-objs := core.o sock.o crc.o
+
+ifeq ($(CONFIG_BLUEZ_RFCOMM_TTY),y)
+  rfcomm-objs += tty.o
+endif
 
 include $(TOPDIR)/Rules.make

===================================================================

This BitKeeper patch contains the following changesets:
+
## Wrapped with gzip_uu ##

begin 664 bkpatch22794 M'XL(`(IPH#T``\U::V_;N!+]'/V*;K)FAMDQ3U,FX6S;,UFC1!FBYV%P4" M6J9C-;*DZI$F%_KQ=TC9CI/(EA/?;-H&CB.3A\.9PYE#TF_@:R;3[L98I+X, MC3?P,<[R[L8H#O.QB*)VG%[BP[,XQH>=43R6G>E'G7Z07TF9R+33#POYWQ9K M6P:V/16Y/X)KF6;=#=HV9T_RVT1V-\X./GP]VCDSC.UMV!N)Z%)^D3EL;QMY MG%Z+<)"]%_DHC*-VGHHH&\M<M/UX7,Z:EHP0AO\MZIC$LDMJ$^Z4/AU0*CB5 M\*X:W/CN_S>?S\NPLM47,OV9A1'<NL!""7$1AA"S9)R[&7LV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D*/\
MU,?&WXQ@*'_9BVNXN;6N]LMI/4\%Z6Y[?864:#8*A9N_BN2U'V!6_>:IC; M?._&&1(%(4T72VIUIWM_(X7,-9MN=%^;M]6EX0/>+I[[2Y/VXUX/L.8%OIP:
M@=3%#2<W>M0"SQCYP44ATGS&1O4@'`39$A8BYM>=L_.+CWS"POL@;RN0$9]1 ML0%G=^_+Z3*DOI\E]VB]\(:T@=5KWM8VIN.:TP*5BEWFE,PFIJDY;=TOVKQ+ M[(;#'&:_=B[6%\U+<_%Z)P+[)LI_=(^E?RT,<27+7NJZ>]7PWE=D*KC<I([U M,+C4ZUINE[F_N"*K+NI7B>VSI-A\LKHS*BOZV6V6R_'$GB+5YQ%3P=6CBW:# M*Y:O=;Y:T$B#.K6E6&"Z%C,?EBW%J?A#LE%%KBO3(/J6Q%+:?!OE:P9.>9% MEKQ14GU6I;+;<79/4ST685L;&VI[J*]8XCJ1=L3V=DZW5*.0^2*I;_1E[Z0" MRORXOL5$ZVW,M%YGX7YU8[)?[6)IBK3]9BI=JSZP'PZ-3&\F/D<]:`J@!.% M6+U5K-%OY;6,\LG[B7@,@[Y2DI5S9E_?\T?2O\J*\383WH#;?=_X'^4060T[ #*```
`
end

#1 lore raw
Quoted 13 lines · Marcel Holtmann

diff -Nru a/drivers/bluetooth/Makefile b/drivers/bluetooth/Makefile

drivers/bluetooth/Makefile +1 -4
@@ -9,9 +9,14 @@
 obj-$(CONFIG_BLUEZ_HCIBT3C)	+= bt3c_cs.o
 obj-$(CONFIG_BLUEZ_HCIBLUECARD)	+= bluecard_cs.o
 
-hci_uart-y				:= hci_ldisc.o
-hci_uart-$(CONFIG_BLUEZ_HCIUART_H4)	+= hci_h4.o
-hci_uart-$(CONFIG_BLUEZ_HCIUART_BCSP)	+= hci_bcsp.o
-hci_uart-objs				:= $(hci_uart-y)
+hci_uart-objs := hci_ldisc.o

drivers/bluetooth/Makefile line 22

Quoted 10 lines
drivers/bluetooth/Makefile +8 -0
+
+ifeq ($(CONFIG_BLUEZ_HCIUART_H4),y)
+  hci_uart-objs += hci_h4.o
+endif
+
+ifeq ($(CONFIG_BLUEZ_HCIUART_BCSP),y)
+  hci_uart-objs += hci_bcsp.o
+endif
 
 include $(TOPDIR)/Rules.make

Hmm.. This seems to be reverting a perfectly good clean Makefile without any conditionals to the old-stype setup. Please don't do that.

Linus

author maintainer
#2 lore raw
Quoted 21 lines
Quoted 21 lines

diff -Nru a/drivers/bluetooth/Makefile b/drivers/bluetooth/Makefile

drivers/bluetooth/Makefile +9 -4
@@ -9,9 +9,14 @@
 obj-$(CONFIG_BLUEZ_HCIBT3C)	+= bt3c_cs.o
 obj-$(CONFIG_BLUEZ_HCIBLUECARD)	+= bluecard_cs.o
 
-hci_uart-y				:= hci_ldisc.o
-hci_uart-$(CONFIG_BLUEZ_HCIUART_H4)	+= hci_h4.o
-hci_uart-$(CONFIG_BLUEZ_HCIUART_BCSP)	+= hci_bcsp.o
-hci_uart-objs				:= $(hci_uart-y)
+hci_uart-objs := hci_ldisc.o
+
+ifeq ($(CONFIG_BLUEZ_HCIUART_H4),y)
+  hci_uart-objs += hci_h4.o
+endif
+
+ifeq ($(CONFIG_BLUEZ_HCIUART_BCSP),y)
+  hci_uart-objs += hci_bcsp.o
+endif
 
Quoted 4 lines

drivers/bluetooth/Makefile line 22

Quoted 1 line
drivers/bluetooth/Makefile +0 -0
 include $(TOPDIR)/Rules.make

Hmm.. This seems to be reverting a perfectly good clean Makefile without any conditionals to the old-stype setup. Please don't do that.

I will change this and submit you a new patch. Should I do this also for only one conditional like in net/bluetooth/rfcomm/Makefile? So it will look like this:

###
obj-$(CONFIG_BLUEZ_RFCOMM) += rfcomm.o

rfcomm-y                                := core.o sock.o crc.o
rfcomm-$(CONFIG_BLUEZ_RFCOMM_TTY)       += tty.o
rfcomm-objs                             := $(rfcomm-y)

include $(TOPDIR)/Rules.make
###

Regards

Marcel

#3 lore raw
Quoted 4 lines · Marcel Holtmann

I will change this and submit you a new patch. Should I do this also for only one conditional like in net/bluetooth/rfcomm/Makefile? So it will look like this:

Yes please, that looks right.

Linus