aboutsummaryrefslogtreecommitdiff
path: root/boot
diff options
context:
space:
mode:
authorGravatar Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>2014-10-07 09:06:03 +0200
committerGravatar Peter Korsgaard <peter@korsgaard.com>2014-10-07 15:00:28 +0200
commitf268f7131b9e0ef90f1135461a719d9f5292853e (patch)
tree957b4b8ef578d19836969841ec1a4af01bc520a4 /boot
parentcf197b2d18b5ac4fabd0a16e58f6800b42bbff45 (diff)
downloadbuildroot-f268f7131b9e0ef90f1135461a719d9f5292853e.tar.gz
buildroot-f268f7131b9e0ef90f1135461a719d9f5292853e.tar.bz2
.mk files: bulk aligment and whitespace cleanup of assignments
The Buildroot coding style defines one space around make assignments and does not align the assignment symbols. This patch does a bulk fix of offending packages. The package infrastructures (or more in general assignments to calculated variable names, like $(2)_FOO) are not touched. Alignment of line continuation characters (\) is kept as-is. The sed command used to do this replacement is: find * -name "*.mk" | xargs sed -i \ -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*$#\1 \2#' -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*\([^\\]\+\)$#\1 \2 \3#' -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*\([^\\ \t]\+\s*\\\)\s*$#\1 \2 \3#' -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\(\s*\\\)#\1 \2\3#' Brief explanation of this command: ^\([A-Z0-9a-z_]\+\) a regular variable at the beginning of the line \([?:+]\?=\) any assignment character =, :=, ?=, += \([^\\]\+\) any string not containing a line continuation \([^\\ \t]\+\s*\\\) string, optional whitespace, followed by a line continuation character \(\s*\\\) optional whitespace, followed by a line continuation character Hence, the first subexpression handles empty assignments, the second handles regular assignments, the third handles regular assignments with line continuation, and the fourth empty assignments with line continuation. This expression was tested on following test text: (initial tab not included) FOO = spaces before FOO = spaces before and after FOO = tab before FOO = tab and spaces before FOO = tab after FOO = tab and spaces after FOO = spaces and tab after FOO = \ FOO = bar \ FOO = bar space \ FOO = \ GENIMAGE_DEPENDENCIES = host-pkgconf libconfuse FOO += spaces before FOO ?= spaces before and after FOO := FOO = FOO = FOO = FOO = $(MAKE1) CROSS_COMPILE=$(TARGET_CROSS) -C AT91BOOTSTRAP3_DEFCONFIG = \ AXEL_DISABLE_I18N=--i18n=0 After this bulk change, following manual fixups were done: - fix line continuation alignment in cegui06 and spice (the sed expression leaves the number of whitespace between the value and line continuation character intact, but the whitespace before that could have changed, causing misalignment. - qt5base was reverted, as this package uses extensive alignment which actually makes the code more readable. Finally, the end result was manually reviewed. Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Cc: Yann E. Morin <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'boot')
-rw-r--r--boot/boot-wrapper-aarch64/boot-wrapper-aarch64.mk10
-rw-r--r--boot/grub/grub.mk4
-rw-r--r--boot/syslinux/syslinux.mk4
-rw-r--r--boot/uboot/uboot.mk44
-rw-r--r--boot/xloader/xloader.mk4
5 files changed, 33 insertions, 33 deletions
diff --git a/boot/boot-wrapper-aarch64/boot-wrapper-aarch64.mk b/boot/boot-wrapper-aarch64/boot-wrapper-aarch64.mk
index a9d69a9b6c..c56bdeeeab 100644
--- a/boot/boot-wrapper-aarch64/boot-wrapper-aarch64.mk
+++ b/boot/boot-wrapper-aarch64/boot-wrapper-aarch64.mk
@@ -4,11 +4,11 @@
#
################################################################################
-BOOT_WRAPPER_AARCH64_VERSION = 4266507a84f8c06452109d38e0350d4759740694
-BOOT_WRAPPER_AARCH64_SITE = git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/boot-wrapper-aarch64.git
-BOOT_WRAPPER_AARCH64_LICENSE = BSD3c
-BOOT_WRAPPER_AARCH64_LICENSE_FILES = LICENSE.txt
-BOOT_WRAPPER_AARCH64_DEPENDENCIES = linux
+BOOT_WRAPPER_AARCH64_VERSION = 4266507a84f8c06452109d38e0350d4759740694
+BOOT_WRAPPER_AARCH64_SITE = git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/boot-wrapper-aarch64.git
+BOOT_WRAPPER_AARCH64_LICENSE = BSD3c
+BOOT_WRAPPER_AARCH64_LICENSE_FILES = LICENSE.txt
+BOOT_WRAPPER_AARCH64_DEPENDENCIES = linux
BOOT_WRAPPER_AARCH64_INSTALL_IMAGES = YES
# The Git repository does not have the generated configure script and
diff --git a/boot/grub/grub.mk b/boot/grub/grub.mk
index f01b02d305..0331e33c42 100644
--- a/boot/grub/grub.mk
+++ b/boot/grub/grub.mk
@@ -6,8 +6,8 @@
GRUB_VERSION = 0.97
GRUB_SOURCE = grub_$(GRUB_VERSION).orig.tar.gz
-GRUB_PATCH = grub_$(GRUB_VERSION)-67.diff.gz
-GRUB_SITE = http://snapshot.debian.org/archive/debian/20130129T225227Z/pool/main/g/grub
+GRUB_PATCH = grub_$(GRUB_VERSION)-67.diff.gz
+GRUB_SITE = http://snapshot.debian.org/archive/debian/20130129T225227Z/pool/main/g/grub
GRUB_LICENSE = GPLv2+
GRUB_LICENSE_FILES = COPYING
diff --git a/boot/syslinux/syslinux.mk b/boot/syslinux/syslinux.mk
index 18f2243105..8ef53f9229 100644
--- a/boot/syslinux/syslinux.mk
+++ b/boot/syslinux/syslinux.mk
@@ -5,8 +5,8 @@
################################################################################
SYSLINUX_VERSION = 6.02
-SYSLINUX_SOURCE = syslinux-$(SYSLINUX_VERSION).tar.xz
-SYSLINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/boot/syslinux
+SYSLINUX_SOURCE = syslinux-$(SYSLINUX_VERSION).tar.xz
+SYSLINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/boot/syslinux
SYSLINUX_LICENSE = GPLv2+
SYSLINUX_LICENSE_FILES = COPYING
diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index 532ac8b97e..0c6c96c429 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -4,7 +4,7 @@
#
################################################################################
-UBOOT_VERSION = $(call qstrip,$(BR2_TARGET_UBOOT_VERSION))
+UBOOT_VERSION = $(call qstrip,$(BR2_TARGET_UBOOT_VERSION))
UBOOT_BOARD_NAME = $(call qstrip,$(BR2_TARGET_UBOOT_BOARDNAME))
UBOOT_LICENSE = GPLv2+
@@ -15,48 +15,48 @@ UBOOT_INSTALL_IMAGES = YES
ifeq ($(UBOOT_VERSION),custom)
# Handle custom U-Boot tarballs as specified by the configuration
UBOOT_TARBALL = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION))
-UBOOT_SITE = $(patsubst %/,%,$(dir $(UBOOT_TARBALL)))
-UBOOT_SOURCE = $(notdir $(UBOOT_TARBALL))
+UBOOT_SITE = $(patsubst %/,%,$(dir $(UBOOT_TARBALL)))
+UBOOT_SOURCE = $(notdir $(UBOOT_TARBALL))
else ifeq ($(BR2_TARGET_UBOOT_CUSTOM_GIT),y)
-UBOOT_SITE = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_REPO_URL))
+UBOOT_SITE = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_REPO_URL))
UBOOT_SITE_METHOD = git
else ifeq ($(BR2_TARGET_UBOOT_CUSTOM_HG),y)
-UBOOT_SITE = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_REPO_URL))
+UBOOT_SITE = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_REPO_URL))
UBOOT_SITE_METHOD = hg
else
# Handle stable official U-Boot versions
-UBOOT_SITE = ftp://ftp.denx.de/pub/u-boot
-UBOOT_SOURCE = u-boot-$(UBOOT_VERSION).tar.bz2
+UBOOT_SITE = ftp://ftp.denx.de/pub/u-boot
+UBOOT_SOURCE = u-boot-$(UBOOT_VERSION).tar.bz2
endif
ifeq ($(BR2_TARGET_UBOOT_FORMAT_ELF),y)
-UBOOT_BIN = u-boot
+UBOOT_BIN = u-boot
else ifeq ($(BR2_TARGET_UBOOT_FORMAT_KWB),y)
-UBOOT_BIN = u-boot.kwb
-UBOOT_MAKE_TARGET = $(UBOOT_BIN)
+UBOOT_BIN = u-boot.kwb
+UBOOT_MAKE_TARGET = $(UBOOT_BIN)
else ifeq ($(BR2_TARGET_UBOOT_FORMAT_AIS),y)
-UBOOT_BIN = u-boot.ais
-UBOOT_MAKE_TARGET = $(UBOOT_BIN)
+UBOOT_BIN = u-boot.ais
+UBOOT_MAKE_TARGET = $(UBOOT_BIN)
else ifeq ($(BR2_TARGET_UBOOT_FORMAT_LDR),y)
-UBOOT_BIN = u-boot.ldr
+UBOOT_BIN = u-boot.ldr
else ifeq ($(BR2_TARGET_UBOOT_FORMAT_NAND_BIN),y)
-UBOOT_BIN = u-boot-nand.bin
+UBOOT_BIN = u-boot-nand.bin
else ifeq ($(BR2_TARGET_UBOOT_FORMAT_IMG),y)
-UBOOT_BIN = u-boot.img
+UBOOT_BIN = u-boot.img
else ifeq ($(BR2_TARGET_UBOOT_FORMAT_IMX),y)
-UBOOT_BIN = u-boot.imx
+UBOOT_BIN = u-boot.imx
else ifeq ($(BR2_TARGET_UBOOT_FORMAT_SB),y)
-UBOOT_BIN = u-boot.sb
-UBOOT_MAKE_TARGET = $(UBOOT_BIN)
+UBOOT_BIN = u-boot.sb
+UBOOT_MAKE_TARGET = $(UBOOT_BIN)
UBOOT_DEPENDENCIES += host-elftosb
else ifeq ($(BR2_TARGET_UBOOT_FORMAT_CUSTOM),y)
-UBOOT_BIN = $(call qstrip,$(BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME))
+UBOOT_BIN = $(call qstrip,$(BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME))
else
-UBOOT_BIN = u-boot.bin
-UBOOT_BIN_IFT = $(UBOOT_BIN).ift
+UBOOT_BIN = u-boot.bin
+UBOOT_BIN_IFT = $(UBOOT_BIN).ift
endif
-UBOOT_ARCH=$(KERNEL_ARCH)
+UBOOT_ARCH = $(KERNEL_ARCH)
UBOOT_CONFIGURE_OPTS += CONFIG_NOSOFTFLOAT=1
UBOOT_MAKE_OPTS += \
diff --git a/boot/xloader/xloader.mk b/boot/xloader/xloader.mk
index 00c63b1efb..90d5fa2fcf 100644
--- a/boot/xloader/xloader.mk
+++ b/boot/xloader/xloader.mk
@@ -4,8 +4,8 @@
#
################################################################################
-XLOADER_VERSION = 6f3a26101303051e0f91b6213735b68ce804e94e
-XLOADER_SITE = git://gitorious.org/x-loader/x-loader.git
+XLOADER_VERSION = 6f3a26101303051e0f91b6213735b68ce804e94e
+XLOADER_SITE = git://gitorious.org/x-loader/x-loader.git
XLOADER_BOARD_NAME = $(call qstrip,$(BR2_TARGET_XLOADER_BOARDNAME))
XLOADER_LICENSE = GPLv2+