Remove more stuff when selecting drivers on top level Makefile
authorLuis R. Rodriguez <lrodriguez@atheros.com>
Wed, 5 Aug 2009 06:36:38 +0000 (23:36 -0700)
committerLuis R. Rodriguez <lrodriguez@atheros.com>
Wed, 5 Aug 2009 06:36:38 +0000 (23:36 -0700)
Also, always backup the top level Makefile

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Makefile
scripts/driver-select

index eecba715c74db05dfa1fb2604ae3d6836ca5af95..6fda3f4df76ac274d5a762dcb09e3731dbd9bf3f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -21,7 +21,8 @@ NOSTDINC_FLAGS := -I$(M)/include/ -include $(M)/include/net/compat.h $(CFLAGS)
 
 obj-y := net/wireless/ net/mac80211/ net/rfkill/
 ifeq ($(ONLY_CORE),)
-obj-y += drivers/ssb/ \
+obj-y += \
+       drivers/ssb/ \
        drivers/misc/eeprom/ \
        drivers/net/usb/ \
        drivers/net/wireless/
index ef72ad28b1cbf2ea2d1b381ed4a91165c9cab6cb..544de59806b6ed59920ba3663291034ab0d30379 100755 (executable)
@@ -45,16 +45,6 @@ function usage {
        echo -e "\t${GREEN}restore${NORMAL}: you can use this option to restore compat-wireless to the original state"
 }
 
-if [ $# -ne 1 ]; then
-       usage
-       exit
-fi
-
-if [ ! -f compat-release ]; then
-       echo "Must run $0 from the compat-wireless top level directory"
-       exit
-fi
-
 function backup_file {
        if [ -f $1.${BACKUP_EXT} ]; then
                echo -e "Backup exists: ${CYAN}${1}.${BACKUP_EXT}${NORMAL}"
@@ -83,7 +73,6 @@ function disable_lib80211
 }
 
 function disable_b44 {
-       backup_file Makefile
        perl -i -ne 'print if ! /CONFIG_B44/ ' Makefile
 }
 
@@ -91,16 +80,19 @@ function disable_ssb
 {
        disable_b44
        disable_makefile ${SSB_MAKEFILE}
+       perl -i -ne 'print if ! /drivers\/ssb\/ \\/ ' Makefile
 }
 
 function disable_eeprom
 {
        disable_makefile ${EEPROM_MAKEFILE}
+       perl -i -ne 'print if ! /drivers\/misc\/eeprom\// \\' Makefile
 }
 
 function disable_usbnet
 {
        disable_makefile ${DRIVERS_NET_USB_MAKEFILE}
+       perl -i -ne 'print if ! /drivers\/net\/usb\// \\' Makefile
 }
 
 function disable_var_01 {
@@ -139,6 +131,19 @@ function restore_compat {
        done
 }
 
+if [ $# -ne 1 ]; then
+       usage
+       exit
+fi
+
+if [ ! -f compat-release ]; then
+       echo "Must run $0 from the compat-wireless top level directory"
+       exit
+fi
+
+# Always backup the top level Makefile
+backup_file Makefile
+
 case $1 in
        restore)
                restore_compat