Modify

Opened 6 years ago

Last modified 4 years ago

#11893 new defect

Trunk: leading whitespace audit in Makefiles

Reported by: Greg Turner <gmt@…> Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: base system Version: Trunk
Keywords: Cc:

Description

    Trunk whitespace audit
    
    Found a couple of these and figured I'd might as well audit.
    
    I used (requires bash, I think):
    
    $ find . -name '*.mk' -o -name 'Makefile' | \
            xargs grep -C1 -n --color=yes -P '^ \s*\t' | \
            sed $'s/\t/[TAB]/g;s/ /[SPC]/g'
    
    To find lines starting with any number of (true) spaces followed by
    tabs.
    
    The sed line at the end makes them visible in the output.  Most of these
    were clearly harmless, however, if I'm not mistaken, the one in
    include/package-ipkg.mk is part of a recipe and therefore actually
    breaks the rule.
    
    Signed-off-by: Gregory M. Turner <gmt@be-evil.net>

diff --git a/include/package-ipkg.mk b/include/package-ipkg.mk
index 14520cf..19d0bd9 100644
--- a/include/package-ipkg.mk
+++ b/include/package-ipkg.mk
@@ -166,7 +166,7 @@ ifeq ($(DUMP),)
 		echo "Architecture: $(PKGARCH)"; \
 		echo "Installed-Size: 0"; \
 		echo -n "Description: "; $(SH_FUNC) getvar $(call shvar,Package/$(1)/description) | sed -e 's,^[[:space:]]*, ,g'; \
- 	) > $$(IDIR_$(1))/CONTROL/control
+	) > $$(IDIR_$(1))/CONTROL/control
 	chmod 644 $$(IDIR_$(1))/CONTROL/control
 	$(SH_FUNC) (cd $$(IDIR_$(1))/CONTROL; \
 		$($(1)_COMMANDS) \
diff --git a/package/kernel/modules/netfilter.mk b/package/kernel/modules/netfilter.mk
index ff34664..1b36ca2 100644
--- a/package/kernel/modules/netfilter.mk
+++ b/package/kernel/modules/netfilter.mk
@@ -14,7 +14,7 @@ define KernelPackage/ipt-core
   SUBMENU:=$(NF_MENU)
   TITLE:=Netfilter core
   KCONFIG:= \
-  	CONFIG_NETFILTER=y \
+	CONFIG_NETFILTER=y \
 	CONFIG_NETFILTER_ADVANCED=y \
 	$(KCONFIG_IPT_CORE)
   FILES:=$(foreach mod,$(IPT_CORE-m),$(LINUX_DIR)/net/$(mod).ko)
@@ -296,12 +296,12 @@ define KernelPackage/ipt-tproxy
   TITLE:=Transparent proxying support
   DEPENDS+=+IPV6:kmod-ipv6
   KCONFIG:= \
-  	CONFIG_NETFILTER_TPROXY \
-  	CONFIG_NETFILTER_XT_MATCH_SOCKET \
-  	CONFIG_NETFILTER_XT_TARGET_TPROXY
+	CONFIG_NETFILTER_TPROXY \
+	CONFIG_NETFILTER_XT_MATCH_SOCKET \
+	CONFIG_NETFILTER_XT_TARGET_TPROXY
   FILES:= \
-  	$(LINUX_DIR)/net/netfilter/nf_tproxy_core.ko \
-  	$(foreach mod,$(IPT_TPROXY-m),$(LINUX_DIR)/net/$(mod).ko)
+	$(LINUX_DIR)/net/netfilter/nf_tproxy_core.ko \
+	$(foreach mod,$(IPT_TPROXY-m),$(LINUX_DIR)/net/$(mod).ko)
   AUTOLOAD:=$(call AutoLoad,50,$(notdir nf_tproxy_core $(IPT_TPROXY-m)))
   $(call AddDepends/ipt)
 endef
@@ -315,10 +315,10 @@ $(eval $(call KernelPackage,ipt-tproxy))
 define KernelPackage/ipt-tee
   TITLE:=TEE support
   KCONFIG:= \
-  	CONFIG_NETFILTER_XT_TARGET_TEE
+	CONFIG_NETFILTER_XT_TARGET_TEE
   FILES:= \
-  	$(LINUX_DIR)/net/netfilter/xt_TEE.ko \
-  	$(foreach mod,$(IPT_TEE-m),$(LINUX_DIR)/net/$(mod).ko)
+	$(LINUX_DIR)/net/netfilter/xt_TEE.ko \
+	$(foreach mod,$(IPT_TEE-m),$(LINUX_DIR)/net/$(mod).ko)
   AUTOLOAD:=$(call AutoLoad,45,$(notdir nf_tee $(IPT_TEE-m)))
   $(call AddDepends/ipt)
 endef
@@ -333,10 +333,10 @@ $(eval $(call KernelPackage,ipt-tee))
 define KernelPackage/ipt-u32
   TITLE:=U32 support
   KCONFIG:= \
-  	CONFIG_NETFILTER_XT_MATCH_U32
+	CONFIG_NETFILTER_XT_MATCH_U32
   FILES:= \
-  	$(LINUX_DIR)/net/netfilter/xt_u32.ko \
-  	$(foreach mod,$(IPT_U32-m),$(LINUX_DIR)/net/$(mod).ko)
+	$(LINUX_DIR)/net/netfilter/xt_u32.ko \
+	$(foreach mod,$(IPT_U32-m),$(LINUX_DIR)/net/$(mod).ko)
   AUTOLOAD:=$(call AutoLoad,45,$(notdir nf_tee $(IPT_U32-m)))
   $(call AddDepends/ipt)
 endef
diff --git a/package/kernel/modules/netsupport.mk b/package/kernel/modules/netsupport.mk
index 5d78027..893ec57 100644
--- a/package/kernel/modules/netsupport.mk
+++ b/package/kernel/modules/netsupport.mk
@@ -166,11 +166,11 @@ define KernelPackage/misdn
   TITLE:=mISDN (ISDN) Support
   KCONFIG:= \
 	CONFIG_ISDN=y \
-  	CONFIG_MISDN \
+	CONFIG_MISDN \
 	CONFIG_MISDN_DSP \
 	CONFIG_MISDN_L1OIP
   FILES:= \
-  	$(LINUX_DIR)/drivers/isdn/mISDN/mISDN_core.ko \
+	$(LINUX_DIR)/drivers/isdn/mISDN/mISDN_core.ko \
 	$(LINUX_DIR)/drivers/isdn/mISDN/mISDN_dsp.ko \
 	$(LINUX_DIR)/drivers/isdn/mISDN/l1oip.ko
   AUTOLOAD:=$(call AutoLoad,30,mISDN_core mISDN_dsp l1oip)
diff --git a/package/kernel/modules/other.mk b/package/kernel/modules/other.mk
index 773a2bc..279c305 100644
--- a/package/kernel/modules/other.mk
+++ b/package/kernel/modules/other.mk
@@ -593,8 +593,8 @@ define KernelPackage/cs5535-mfd
   DEPENDS:=@TARGET_x86
   KCONFIG:=CONFIG_MFD_CS5535
   FILES:= \
-  	$(LINUX_DIR)/drivers/mfd/mfd-core.ko \
-  	$(LINUX_DIR)/drivers/mfd/cs5535-mfd.ko
+	$(LINUX_DIR)/drivers/mfd/mfd-core.ko \
+	$(LINUX_DIR)/drivers/mfd/cs5535-mfd.ko
   AUTOLOAD:=$(call AutoLoad,44,mfd-core cs5535-mfd)
 endef
 
@@ -874,9 +874,9 @@ define KernelPackage/serial-8250
   TITLE:=8250 UARTs
   KCONFIG:= CONFIG_SERIAL_8250 \
 	CONFIG_SERIAL_8250_NR_UARTS=16 \
-  	CONFIG_SERIAL_8250_RUNTIME_UARTS=16 \
-  	CONFIG_SERIAL_8250_EXTENDED=y \
-  	CONFIG_SERIAL_8250_MANY_PORTS=y \
+	CONFIG_SERIAL_8250_RUNTIME_UARTS=16 \
+	CONFIG_SERIAL_8250_EXTENDED=y \
+	CONFIG_SERIAL_8250_MANY_PORTS=y \
 	CONFIG_SERIAL_8250_SHARE_IRQ=y \
 	CONFIG_SERIAL_8250_DETECT_IRQ=n \
 	CONFIG_SERIAL_8250_RSA=n
diff --git a/package/kernel/modules/usb.mk b/package/kernel/modules/usb.mk
index 1e5c7aa..4c3f2dc 100644
--- a/package/kernel/modules/usb.mk
+++ b/package/kernel/modules/usb.mk
@@ -983,11 +983,11 @@ define KernelPackage/usb-brcm47xx
   TITLE:=Support for USB on bcm47xx
   DEPENDS:=@USB_SUPPORT @TARGET_brcm47xx
   KCONFIG:= \
-  	CONFIG_USB_HCD_BCMA \
-  	CONFIG_USB_HCD_SSB
+	CONFIG_USB_HCD_BCMA \
+	CONFIG_USB_HCD_SSB
   FILES:= \
-  	$(LINUX_DIR)/drivers/usb/host/bcma-hcd.ko \
-  	$(LINUX_DIR)/drivers/usb/host/ssb-hcd.ko
+	$(LINUX_DIR)/drivers/usb/host/bcma-hcd.ko \
+	$(LINUX_DIR)/drivers/usb/host/ssb-hcd.ko
   AUTOLOAD:=$(call AutoLoad,19,bcma-hcd ssb-hcd,1)
   $(call AddDepends/usb)
 endef
diff --git a/package/kernel/modules/virtual.mk b/package/kernel/modules/virtual.mk
index 0089f93..81fd025 100644
--- a/package/kernel/modules/virtual.mk
+++ b/package/kernel/modules/virtual.mk
@@ -60,8 +60,8 @@ define KernelPackage/xen-fs
   TITLE:=Xen filesystem
   DEPENDS:=@TARGET_x86_xen_domu
   KCONFIG:= \
-  	CONFIG_XENFS \
-  	CONFIG_XEN_COMPAT_XENFS=y
+	CONFIG_XENFS \
+	CONFIG_XEN_COMPAT_XENFS=y
   FILES:=$(LINUX_DIR)/drivers/xen/xenfs/xenfs.ko
   AUTOLOAD:=$(call AutoLoad,05,xenfs)
 endef
@@ -94,28 +94,28 @@ define KernelPackage/xen-fbdev
   TITLE:=Xen virtual frame buffer
   DEPENDS:=@TARGET_x86_xen_domu
   KCONFIG:= \
-  	CONFIG_XEN_FBDEV_FRONTEND \
-  	CONFIG_FB \
-  	CONFIG_FB_DEFERRED_IO=y \
-  	CONFIG_FB_SYS_COPYAREA \
-  	CONFIG_FB_SYS_FILLRECT \
-  	CONFIG_FB_SYS_FOPS \
-  	CONFIG_FB_SYS_IMAGEBLIT \
-  	CONFIG_FIRMWARE_EDID=n
+	CONFIG_XEN_FBDEV_FRONTEND \
+	CONFIG_FB \
+	CONFIG_FB_DEFERRED_IO=y \
+	CONFIG_FB_SYS_COPYAREA \
+	CONFIG_FB_SYS_FILLRECT \
+	CONFIG_FB_SYS_FOPS \
+	CONFIG_FB_SYS_IMAGEBLIT \
+	CONFIG_FIRMWARE_EDID=n
   FILES:= \
-  	$(LINUX_DIR)/drivers/video/xen-fbfront.ko \
-  	$(LINUX_DIR)/drivers/video/fb.ko \
-  	$(LINUX_DIR)/drivers/video/syscopyarea.ko \
-  	$(LINUX_DIR)/drivers/video/sysfillrect.ko \
-  	$(LINUX_DIR)/drivers/video/fb_sys_fops.ko \
-  	$(LINUX_DIR)/drivers/video/sysimgblt.ko  	
+	$(LINUX_DIR)/drivers/video/xen-fbfront.ko \
+	$(LINUX_DIR)/drivers/video/fb.ko \
+	$(LINUX_DIR)/drivers/video/syscopyarea.ko \
+	$(LINUX_DIR)/drivers/video/sysfillrect.ko \
+	$(LINUX_DIR)/drivers/video/fb_sys_fops.ko \
+	$(LINUX_DIR)/drivers/video/sysimgblt.ko
   AUTOLOAD:=$(call AutoLoad,07, \
-  	fb \
-  	syscopyarea \
-  	sysfillrect \
-  	fb_sys_fops \
-  	sysimgblt \
-  	xen-fbfront \
+	fb \
+	syscopyarea \
+	sysfillrect \
+	fb_sys_fops \
+	sysimgblt \
+	xen-fbfront \
   )
 endef
 
diff --git a/package/mac80211/Makefile b/package/mac80211/Makefile
index 31e1ad3..75b5d3f 100644
--- a/package/mac80211/Makefile
+++ b/package/mac80211/Makefile
@@ -870,7 +870,7 @@ define KernelPackage/b43-common
   TITLE:=Generic stuff for Broadcom wireless devices
   URL:=http://linuxwireless.org/en/users/Drivers/b43
   KCONFIG:= \
-  	CONFIG_HW_RANDOM=y
+	CONFIG_HW_RANDOM=y
   DEPENDS+= +kmod-mac80211 +!(TARGET_brcm47xx||TARGET_brcm63xx):kmod-ssb
 endef
 
diff --git a/package/sierra-directip/Makefile b/package/sierra-directip/Makefile
index fc0e4ea..508986f 100644
--- a/package/sierra-directip/Makefile
+++ b/package/sierra-directip/Makefile
@@ -18,8 +18,8 @@ define KernelPackage/usb-sierrawireless-directip
   DEPENDS:=+kmod-usb-serial +kmod-usb-net
   TITLE:=Updated Sierra Wireless drivers for DirectIP
   FILES:= \
-  	$(PKG_BUILD_DIR)/sierra.ko \
-  	$(PKG_BUILD_DIR)/sierra_net.ko
+	$(PKG_BUILD_DIR)/sierra.ko \
+	$(PKG_BUILD_DIR)/sierra_net.ko
   AUTOLOAD:=$(call AutoLoad,60,sierra sierra_net)
 endef
 
diff --git a/package/wprobe/Makefile b/package/wprobe/Makefile
index de1ba6d..db740f8 100644
--- a/package/wprobe/Makefile
+++ b/package/wprobe/Makefile
@@ -33,7 +33,7 @@ $(call Package/wprobe/Default)
   TITLE:=Wireless driver probe infrastructure
   MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
   FILES:= \
-  	$(PKG_BUILD_DIR)/kernel/wprobe.ko
+	$(PKG_BUILD_DIR)/kernel/wprobe.ko
   AUTOLOAD:=$(call AutoLoad,01,wprobe)
 endef
 
diff --git a/target/imagebuilder/files/Makefile b/target/imagebuilder/files/Makefile
index b0d0698..bc4a102 100644
--- a/target/imagebuilder/files/Makefile
+++ b/target/imagebuilder/files/Makefile
@@ -78,7 +78,7 @@ define Profile
   $(1)_NAME:=$(NAME)
   $(1)_PACKAGES:=$(PACKAGES)
   PROFILE_LIST += \
-  	echo '$(1):'; [ -z '$(NAME)' ] || echo '	$(NAME)'; echo '	Packages: $(PACKAGES)';
+	echo '$(1):'; [ -z '$(NAME)' ] || echo '	$(NAME)'; echo '	Packages: $(PACKAGES)';
 endef
 
 include $(INCLUDE_DIR)/target.mk
diff --git a/target/linux/lantiq/danube/profiles/002-arcadyan.mk b/target/linux/lantiq/danube/profiles/002-arcadyan.mk
index 9d6011f..6ea8995 100644
--- a/target/linux/lantiq/danube/profiles/002-arcadyan.mk
+++ b/target/linux/lantiq/danube/profiles/002-arcadyan.mk
@@ -75,7 +75,7 @@ $(eval $(call Profile,ARV4525PW))
 define Profile/ARV7525PW
   NAME:=ARV7525PW - Speedport W303V Typ A
   PACKAGES:= kmod-rt2800-pci wpad-mini \
-  	kmod-ltq-dsl-firmware-b-danube
+	kmod-ltq-dsl-firmware-b-danube
 endef
 
 define Profile/ARV7525PW/Description
diff --git a/target/linux/lantiq/modules.mk b/target/linux/lantiq/modules.mk
index 0868e6a..62a4c3e 100644
--- a/target/linux/lantiq/modules.mk
+++ b/target/linux/lantiq/modules.mk
@@ -31,7 +31,7 @@ define KernelPackage/usb-dwc-otg
   SUBMENU:=$(USB_MENU)
   DEPENDS+=@(TARGET_lantiq_danube||TARGET_lantiq_ar9) +kmod-usb-core
   KCONFIG:=CONFIG_DWC_OTG \
-  	CONFIG_DWC_OTG_DEBUG=n \
+	CONFIG_DWC_OTG_DEBUG=n \
 	CONFIG_DWC_OTG_LANTIQ=y \
 	CONFIG_DWC_OTG_HOST_ONLY=y \
 	CONFIG_DWC_OTG_DEVICE_ONLY=n
@@ -51,7 +51,7 @@ define KernelPackage/usb-ifxhcd
   DEPENDS+=@(TARGET_lantiq_vr9||TARGET_lantiq_ar9) +kmod-usb-core
 ifeq ($(CONFIG_TARGET_lantiq_ar9),)
   KCONFIG:=CONFIG_USB_HOST_IFX \
-  	CONFIG_USB_HOST_IFX_B=y \
+	CONFIG_USB_HOST_IFX_B=y \
 	CONFIG_IFX_VR9=y \
 	CONFIG_IFX_AR9=n \
 	CONFIG_USB_HOST_IFX_FORCE_USB11=n \
@@ -60,7 +60,7 @@ ifeq ($(CONFIG_TARGET_lantiq_ar9),)
 	CONFIG_USB_HOST_IFX_UNALIGNED_ADJ=y
 else
   KCONFIG:=CONFIG_USB_HOST_IFX \
-  	CONFIG_USB_HOST_IFX_B=y \
+	CONFIG_USB_HOST_IFX_B=y \
 	CONFIG_IFX_AR9=y \
 	CONFIG_IFX_VR9=n \
 	CONFIG_USB_HOST_IFX_FORCE_USB11=n \
diff --git a/target/linux/rb532/modules.mk b/target/linux/rb532/modules.mk
index 0cbbdab..df59932 100644
--- a/target/linux/rb532/modules.mk
+++ b/target/linux/rb532/modules.mk
@@ -10,11 +10,11 @@ define KernelPackage/ata-rb532-cf
   TITLE:=RB532 Compact Flash support
   DEPENDS:=@TARGET_rb532 @BROKEN
   KCONFIG:= \
-  	CONFIG_PATA_PLATFORM \
-  	CONFIG_PATA_RB532
+	CONFIG_PATA_PLATFORM \
+	CONFIG_PATA_RB532
   FILES:=\
-  	$(LINUX_DIR)/drivers/ata/pata_platform.ko \
-  	$(LINUX_DIR)/drivers/ata/pata_rb532_cf.ko
+	$(LINUX_DIR)/drivers/ata/pata_platform.ko \
+	$(LINUX_DIR)/drivers/ata/pata_rb532_cf.ko
   AUTOLOAD:=$(call AutoLoad,41,pata_platform pata_rb532_cf,1)
   $(call AddDepends/ata)
 endef
diff --git a/target/linux/x86/Makefile b/target/linux/x86/Makefile
index 422e828..fa968e4 100644
--- a/target/linux/x86/Makefile
+++ b/target/linux/x86/Makefile
@@ -19,5 +19,5 @@ include $(INCLUDE_DIR)/target.mk
 $(eval $(call BuildTarget))
 
 $(eval $(call $(if $(CONFIG_TARGET_ROOTFS_ISO),RequireCommand,Ignore),mkisofs, \
-   	Please install mkisofs. \
+	Please install mkisofs. \
 ))

I didn't look at packages because I am lazy; presumably running the same command there would turn up a bunch more hits

Attachments (0)

Change History (3)

comment:1 Changed 5 years ago by dmcdonnell

I had numerous failed build attempts of Trunk that yielded the error:

missing separator (did you mean TAB instead of 8 spaces?). Stop.

I found this ticket and applied your patches and viola, Trunk build success :)

Thank you very much.

Hopefully the Devs will clean up the makefiles in the trunk.

comment:2 Changed 5 years ago by anonymous

As of this morning, 20 Nov, a fresh install of Trunk r34274 plus feeds, contains 31 Makefiles with lines beginning with one or more Spaces followed by Tab(s). Many of these are harmless but they can result in Build attempts failing with "missing separator (did you mean TAB instead of 8 spaces?). Stop."

The Makefiles are:

trunk/include/package-ipkg.mk
trunk/target/imagebuilder/files/Makefile
trunk/target/linux/lantiq/modules.mk
trunk/target/linux/lantiq/danube/profiles/002-arcadyan.mk
trunk/target/linux/rb532/modules.mk
trunk/target/linux/x86/modules.mk
trunk/target/linux/x86/Makefile
trunk/target/linux/brcm47xx/modules.mk
trunk/package/mac80211/Makefile
trunk/package/system/sierra-directip/Makefile
trunk/package/kernel/modules/virtual.mk
trunk/package/kernel/modules/netfilter.mk
trunk/package/kernel/modules/other.mk
trunk/package/kernel/modules/netsupport.mk
trunk/feeds/packages/net/djbdns/Makefile
trunk/feeds/packages/net/stun/Makefile
trunk/feeds/packages/net/elinks/Makefile
trunk/feeds/packages/net/leafnode/Makefile
trunk/feeds/packages/net/wprobe/Makefile
trunk/feeds/packages/net/freeradius2/Makefile
trunk/feeds/packages/net/tcptraceroute/Makefile
trunk/feeds/packages/net/openser/Makefile
trunk/feeds/packages/lang/python-mimms/Makefile
trunk/feeds/packages/lang/python-webpy/Makefile
trunk/feeds/packages/lang/python-pydaemon/Makefile
trunk/feeds/packages/lang/python-flup/Makefile
trunk/feeds/packages/lang/python-rsfile/Makefile
trunk/feeds/packages/lang/python-pyosc/Makefile
trunk/feeds/packages/multimedia/minidlna/Makefile
trunk/feeds/packages/libs/xmpp4r/Makefile
trunk/feeds/packages/libs/slang2/Makefile

comment:3 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.