Skip to contentSkip to conversation

Miscellauneus patches

PATCH New Fabio Porcedda 4 participants 25 messages Mar 11, 2014 – Apr 9, 2014 Kbuild

lore
Share & tools
lore
#0 lore raw

cover Miscellauneus patches

Some miscellaneus patches.

v2:
- Add three patches
- Remove the already merged patch

Best regards

Fabio Porcedda (6):
barebox: fix coding style
Remove "dirs" dependencies
Makefile: fix coding style
luajit: needs for 32bit archictectures a 32bit host gcc
infra: add to luarocks support for top-level parallel make
Makefile: do not add the toolchain target to the TARGETS variable

 Makefile                 | 190 +++++++++++++++++++++++------------------------
 boot/barebox/barebox.mk  |  32 ++++----
 package/luajit/Config.in |   1 +
 package/pkg-luarocks.mk  |   8 +-
 package/uclibc/uclibc.mk |   2 +-
 5 files changed, 120 insertions(+), 113 deletions(-)
Signature · 1 line
1.8.3.2
#1 lore raw

PATCH 1/6 barebox: fix coding style

As stated in the buildroot user manual add just a single space before and after a '=' sign.
Break long lines.

---
 boot/barebox/barebox.mk | 32 +++++++++++++++++++-------------
 1 file changed, 19 insertions(+), 13 deletions(-)
boot/barebox/barebox.mk +19 -13
index 9324c25..f57d297 100644
@@ -4,15 +4,15 @@
 #
 ################################################################################
 
-BAREBOX_VERSION    = $(call qstrip,$(BR2_TARGET_BAREBOX_VERSION))
+BAREBOX_VERSION = $(call qstrip,$(BR2_TARGET_BAREBOX_VERSION))
 
 ifeq ($(BAREBOX_VERSION),custom)
 # Handle custom Barebox tarballs as specified by the configuration
 BAREBOX_TARBALL = $(call qstrip,$(BR2_TARGET_BAREBOX_CUSTOM_TARBALL_LOCATION))
-BAREBOX_SITE    = $(patsubst %/,%,$(dir $(BAREBOX_TARBALL)))
-BAREBOX_SOURCE  = $(notdir $(BAREBOX_TARBALL))
+BAREBOX_SITE = $(patsubst %/,%,$(dir $(BAREBOX_TARBALL)))
+BAREBOX_SOURCE = $(notdir $(BAREBOX_TARBALL))
 else ifeq ($(BR2_TARGET_BAREBOX_CUSTOM_GIT),y)
-BAREBOX_SITE        = $(call qstrip,$(BR2_TARGET_BAREBOX_CUSTOM_GIT_REPO_URL))
+BAREBOX_SITE = $(call qstrip,$(BR2_TARGET_BAREBOX_CUSTOM_GIT_REPO_URL))
 BAREBOX_SITE_METHOD = git
 else
 # Handle stable official Barebox versions
@@ -26,7 +26,8 @@ BAREBOX_LICENSE_FILES = COPYING
 
 ifneq ($(call qstrip,$(BR2_TARGET_BAREBOX_CUSTOM_PATCH_DIR)),)
 define BAREBOX_APPLY_CUSTOM_PATCHES
-	support/scripts/apply-patches.sh $(@D) $(BR2_TARGET_BAREBOX_CUSTOM_PATCH_DIR) \
+	support/scripts/apply-patches.sh $(@D) \
+		$(BR2_TARGET_BAREBOX_CUSTOM_PATCH_DIR) \
 		barebox-$(BAREBOX_VERSION)-\*.patch
 endef
 
@@ -39,25 +40,29 @@ BAREBOX_INSTALL_TARGET = NO
 endif
 
 ifeq ($(KERNEL_ARCH),i386)
-BAREBOX_ARCH=x86
+BAREBOX_ARCH = x86
 else ifeq ($(KERNEL_ARCH),powerpc)
-BAREBOX_ARCH=ppc
+BAREBOX_ARCH = ppc
 else
-BAREBOX_ARCH=$(KERNEL_ARCH)
+BAREBOX_ARCH = $(KERNEL_ARCH)
 endif
 
-BAREBOX_MAKE_FLAGS = ARCH=$(BAREBOX_ARCH) CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)"
+BAREBOX_MAKE_FLAGS = ARCH=$(BAREBOX_ARCH) CROSS_COMPILE="$(CCACHE) \
+	$(TARGET_CROSS)"
 
 
 ifeq ($(BR2_TARGET_BAREBOX_USE_DEFCONFIG),y)
-BAREBOX_SOURCE_CONFIG = $(@D)/arch/$(BAREBOX_ARCH)/configs/$(call qstrip,$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG))_defconfig
+BAREBOX_SOURCE_CONFIG = $(@D)/arch/$(BAREBOX_ARCH)/configs/$(call qstrip,\
+	$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG))_defconfig
 else ifeq ($(BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG),y)
 BAREBOX_SOURCE_CONFIG = $(BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE)
 endif
 
 define BAREBOX_CONFIGURE_CMDS
-	cp $(BAREBOX_SOURCE_CONFIG) $(@D)/arch/$(BAREBOX_ARCH)/configs/buildroot_defconfig
-	$(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D) buildroot_defconfig
+	cp $(BAREBOX_SOURCE_CONFIG) \
+		$(@D)/arch/$(BAREBOX_ARCH)/configs/buildroot_defconfig
+	$(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D) \
+		buildroot_defconfig
 endef
 
 ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y)
@@ -68,7 +73,8 @@ endef
 endif
 
 ifeq ($(BR2_TARGET_BAREBOX_CUSTOM_ENV),y)
-BAREBOX_ENV_NAME = $(notdir $(call qstrip, $(BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH)))
+BAREBOX_ENV_NAME = $(notdir $(call qstrip,\
+	$(BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH)))
 define BAREBOX_BUILD_CUSTOM_ENV
 	$(@D)/scripts/bareboxenv -s \
 		$(call qstrip, $(BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH)) \
Signature · 1 line
1.8.3.2
#2 lore raw

PATCH 1/6 barebox: fix coding style

Fabio, All,

On 2014-03-11 13:17 +0100, Fabio Porcedda spake thusly:

Quoted 1 line

Break long lines.

[--SNIP--]

boot/barebox/barebox.mk BAREBOX_INSTALL_TARGET = NO · line 51

Quoted 3 lines
boot/barebox/barebox.mk +2 -1
-BAREBOX_MAKE_FLAGS = ARCH=$(BAREBOX_ARCH) CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)"
+BAREBOX_MAKE_FLAGS = ARCH=$(BAREBOX_ARCH) CROSS_COMPILE="$(CCACHE) \
+	$(TARGET_CROSS)"

Although we have no written rule about thus, I'd rather that folded-lines assignments continue after the '=' sign, like:

BAREBOX_MAKE_FLAGS = ARCH=$(BAREBOX_ARCH) CROSS_COMPILE="$(CCACHE) \
                     $(TARGET_CROSS)"

It makes it easier to see the assignment.

boot/barebox/barebox.mk BAREBOX_INSTALL_TARGET = NO · line 56

Quoted 4 lines

ifeq ($(BR2_TARGET_BAREBOX_USE_DEFCONFIG),y)

boot/barebox/barebox.mk +2 -1
-BAREBOX_SOURCE_CONFIG = $(@D)/arch/$(BAREBOX_ARCH)/configs/$(call qstrip,$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG))_defconfig
+BAREBOX_SOURCE_CONFIG = $(@D)/arch/$(BAREBOX_ARCH)/configs/$(call qstrip,\
+	$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG))_defconfig

Ditto.

Quoted 15 lines

else ifeq ($(BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG),y) BAREBOX_SOURCE_CONFIG = $(BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE) endif

define BAREBOX_CONFIGURE_CMDS

boot/barebox/barebox.mk +4 -2
-	cp $(BAREBOX_SOURCE_CONFIG) $(@D)/arch/$(BAREBOX_ARCH)/configs/buildroot_defconfig
-	$(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D) buildroot_defconfig
+	cp $(BAREBOX_SOURCE_CONFIG) \
+		$(@D)/arch/$(BAREBOX_ARCH)/configs/buildroot_defconfig
+	$(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D) \
+		buildroot_defconfig
 endef
 
 ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y)

boot/barebox/barebox.mk endef · line 77

Quoted 6 lines
boot/barebox/barebox.mk +2 -1
@@ -68,7 +73,8 @@ endef
 endif
 
 ifeq ($(BR2_TARGET_BAREBOX_CUSTOM_ENV),y)
-BAREBOX_ENV_NAME = $(notdir $(call qstrip, $(BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH)))
+BAREBOX_ENV_NAME = $(notdir $(call qstrip,\
+	$(BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH)))

Ditto.

But I'd like the maintainer to Ack this before you resend. I have no strong opinion about it, I just find it easier to read...

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH 1/6 barebox: fix coding style

Quoted 8 lines · Yann E. MORIN

Fabio, All,

On 2014-03-11 13:17 +0100, Fabio Porcedda spake thusly:

Quoted 1 line

Break long lines.

[--SNIP--]

boot/barebox/barebox.mk BAREBOX_INSTALL_TARGET = NO · line 51

Quoted 3 lines
boot/barebox/barebox.mk +2 -1
-BAREBOX_MAKE_FLAGS = ARCH=$(BAREBOX_ARCH) CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)"
+BAREBOX_MAKE_FLAGS = ARCH=$(BAREBOX_ARCH) CROSS_COMPILE="$(CCACHE) \
+	$(TARGET_CROSS)"

Splitting a line between quotes is evil.

Quoted 8 lines

Although we have no written rule about thus, I'd rather that folded-lines assignments continue after the '=' sign, like:

BAREBOX_MAKE_FLAGS = ARCH=$(BAREBOX_ARCH) CROSS_COMPILE="$(CCACHE) \
                     $(TARGET_CROSS)"

It makes it easier to see the assignment.

Or better yet (and this is the unwritten rule that we tend to follow):

BAREBOX_MAKE_FLAGS = \
	ARCH=$(BAREBOX_ARCH) \
	CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)"
Quoted 5 lines

boot/barebox/barebox.mk BAREBOX_INSTALL_TARGET = NO · line 56

Quoted 5 lines

ifeq ($(BR2_TARGET_BAREBOX_USE_DEFCONFIG),y)

boot/barebox/barebox.mk +2 -1
-BAREBOX_SOURCE_CONFIG = $(@D)/arch/$(BAREBOX_ARCH)/configs/$(call qstrip,$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG))_defconfig
+BAREBOX_SOURCE_CONFIG = $(@D)/arch/$(BAREBOX_ARCH)/configs/$(call qstrip,\
+	$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG))_defconfig

Splitting a single path is also evil. We do usually keep the long lines
in such a case.

Quoted 16 lines

Ditto.

Quoted 13 lines

else ifeq ($(BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG),y) BAREBOX_SOURCE_CONFIG = $(BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE) endif

define BAREBOX_CONFIGURE_CMDS

boot/barebox/barebox.mk +4 -2
-	cp $(BAREBOX_SOURCE_CONFIG) $(@D)/arch/$(BAREBOX_ARCH)/configs/buildroot_defconfig
-	$(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D) buildroot_defconfig
+	cp $(BAREBOX_SOURCE_CONFIG) \
+		$(@D)/arch/$(BAREBOX_ARCH)/configs/buildroot_defconfig
+	$(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D) \
+		buildroot_defconfig
 endef
Quoted 8 lines

boot/barebox/barebox.mk endef · line 77

Quoted 8 lines

ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y)

boot/barebox/barebox.mk +2 -1
@@ -68,7 +73,8 @@ endef
 endif
 
 ifeq ($(BR2_TARGET_BAREBOX_CUSTOM_ENV),y)
-BAREBOX_ENV_NAME = $(notdir $(call qstrip, $(BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH)))
+BAREBOX_ENV_NAME = $(notdir $(call qstrip,\
+	$(BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH)))

This one is probably OK :-)

Regards,
Arnout

Quoted 9 lines

Ditto.

But I'd like the maintainer to Ack this before you resend. I have no strong opinion about it, I just find it easier to read...

Regards,
Yann E. MORIN.

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#4 lore raw

PATCH 1/6 barebox: fix coding style

Hi Arnout and Yann,
thanks for reviewing the patch.

Quoted 11 lines · Arnout Vandecappelle
Quoted 8 lines · Yann E. MORIN

Fabio, All,

On 2014-03-11 13:17 +0100, Fabio Porcedda spake thusly:

Quoted 1 line

Break long lines.

[--SNIP--]

boot/barebox/barebox.mk BAREBOX_INSTALL_TARGET = NO · line 51

Quoted 3 lines
boot/barebox/barebox.mk +2 -1
-BAREBOX_MAKE_FLAGS = ARCH=$(BAREBOX_ARCH) CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)"
+BAREBOX_MAKE_FLAGS = ARCH=$(BAREBOX_ARCH) CROSS_COMPILE="$(CCACHE) \
+    $(TARGET_CROSS)"

Splitting a line between quotes is evil.

It's a matter of code style because it works fine, doesn't it?

Quoted 8 lines
Quoted 8 lines

Although we have no written rule about thus, I'd rather that folded-lines assignments continue after the '=' sign, like:

BAREBOX_MAKE_FLAGS = ARCH=$(BAREBOX_ARCH) CROSS_COMPILE="$(CCACHE) \
                     $(TARGET_CROSS)"

It makes it easier to see the assignment.

I don't have a strong opinion about this, i'd like also to be consistent to the style used in buildroot and i was unable to find any code that follow that rule.

Quoted 5 lines

Or better yet (and this is the unwritten rule that we tend to follow):

BAREBOX_MAKE_FLAGS = \
        ARCH=$(BAREBOX_ARCH) \
        CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)"

It's nice, i will do like that.

Quoted 9 lines
Quoted 6 lines

boot/barebox/barebox.mk BAREBOX_INSTALL_TARGET = NO · line 56

Quoted 6 lines

ifeq ($(BR2_TARGET_BAREBOX_USE_DEFCONFIG),y)

boot/barebox/barebox.mk +2 -1
-BAREBOX_SOURCE_CONFIG = $(@D)/arch/$(BAREBOX_ARCH)/configs/$(call qstrip,$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG))_defconfig
+BAREBOX_SOURCE_CONFIG = $(@D)/arch/$(BAREBOX_ARCH)/configs/$(call qstrip,\
+    $(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG))_defconfig

Splitting a single path is also evil. We do usually keep the long lines
in such a case.

This time too it's a matter of code style, isn't it?

Quoted 29 lines
Quoted 17 lines

Ditto.

Quoted 13 lines

else ifeq ($(BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG),y) BAREBOX_SOURCE_CONFIG = $(BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE) endif

define BAREBOX_CONFIGURE_CMDS

boot/barebox/barebox.mk +4 -2
-    cp $(BAREBOX_SOURCE_CONFIG) $(@D)/arch/$(BAREBOX_ARCH)/configs/buildroot_defconfig
-    $(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D) buildroot_defconfig
+    cp $(BAREBOX_SOURCE_CONFIG) \
+            $(@D)/arch/$(BAREBOX_ARCH)/configs/buildroot_defconfig
+    $(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D) \
+            buildroot_defconfig
 endef
Quoted 8 lines

boot/barebox/barebox.mk endef · line 77

Quoted 8 lines

ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y)

boot/barebox/barebox.mk +2 -1
@@ -68,7 +73,8 @@ endef
 endif
 
 ifeq ($(BR2_TARGET_BAREBOX_CUSTOM_ENV),y)
-BAREBOX_ENV_NAME = $(notdir $(call qstrip, $(BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH)))
+BAREBOX_ENV_NAME = $(notdir $(call qstrip,\
+    $(BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH)))

This one is probably OK :-)

Quoted 11 lines

Regards,
Arnout

Quoted 8 lines

Ditto.

But I'd like the maintainer to Ack this before you resend. I have no strong opinion about it, I just find it easier to read...

Regards,
Yann E. MORIN.

Thanks

Signature · 1 line
Fabio Porcedda
#5 lore raw

PATCH 1/6 barebox: fix coding style

Quoted 9 lines · Fabio Porcedda

Hi Arnout and Yann,
thanks for reviewing the patch.

Quoted 5 lines · Arnout Vandecappelle
Quoted 4 lines · Yann E. MORIN

Fabio, All,

On 2014-03-11 13:17 +0100, Fabio Porcedda spake thusly:

Quoted 1 line

Break long lines.

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

[--SNIP--]

boot/barebox/barebox.mk BAREBOX_INSTALL_TARGET = NO · line 51

Quoted 3 lines
boot/barebox/barebox.mk +2 -1
-BAREBOX_MAKE_FLAGS = ARCH=$(BAREBOX_ARCH) CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)"
+BAREBOX_MAKE_FLAGS = ARCH=$(BAREBOX_ARCH) CROSS_COMPILE="$(CCACHE) \
+    $(TARGET_CROSS)"

Splitting a line between quotes is evil.

It's a matter of code style because it works fine, doesn't it?

Yes. It's evil in the sense of: it will come out to bite the programmer
later on.

Quoted 32 lines
Quoted 9 lines
Quoted 9 lines

Although we have no written rule about thus, I'd rather that folded-lines assignments continue after the '=' sign, like:

BAREBOX_MAKE_FLAGS = ARCH=$(BAREBOX_ARCH) CROSS_COMPILE="$(CCACHE) \
                     $(TARGET_CROSS)"

It makes it easier to see the assignment.

I don't have a strong opinion about this, i'd like also to be consistent to the style used in buildroot and i was unable to find any code that follow that rule.

Quoted 5 lines

Or better yet (and this is the unwritten rule that we tend to follow):

BAREBOX_MAKE_FLAGS = \
        ARCH=$(BAREBOX_ARCH) \
        CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)"

It's nice, i will do like that.

Quoted 9 lines
Quoted 6 lines

boot/barebox/barebox.mk BAREBOX_INSTALL_TARGET = NO · line 56

Quoted 6 lines

ifeq ($(BR2_TARGET_BAREBOX_USE_DEFCONFIG),y)

boot/barebox/barebox.mk +2 -1
-BAREBOX_SOURCE_CONFIG = $(@D)/arch/$(BAREBOX_ARCH)/configs/$(call qstrip,$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG))_defconfig
+BAREBOX_SOURCE_CONFIG = $(@D)/arch/$(BAREBOX_ARCH)/configs/$(call qstrip,\
+    $(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG))_defconfig

Splitting a single path is also evil. We do usually keep the long lines
in such a case.

Quoted 1 line

This time too it's a matter of code style, isn't it?

Yes, but this time I exaggerated - splitting a path like that is not
really evil, it's just something I would rather not see.

Quoted 30 lines
Quoted 30 lines
Quoted 18 lines

Ditto.

Quoted 13 lines

else ifeq ($(BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG),y) BAREBOX_SOURCE_CONFIG = $(BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE) endif

define BAREBOX_CONFIGURE_CMDS

boot/barebox/barebox.mk +4 -2
-    cp $(BAREBOX_SOURCE_CONFIG) $(@D)/arch/$(BAREBOX_ARCH)/configs/buildroot_defconfig
-    $(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D) buildroot_defconfig
+    cp $(BAREBOX_SOURCE_CONFIG) \
+            $(@D)/arch/$(BAREBOX_ARCH)/configs/buildroot_defconfig
+    $(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D) \
+            buildroot_defconfig
 endef
Quoted 8 lines

boot/barebox/barebox.mk endef · line 77

Quoted 8 lines

ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y)

boot/barebox/barebox.mk +2 -1
@@ -68,7 +73,8 @@ endef
 endif
 
 ifeq ($(BR2_TARGET_BAREBOX_CUSTOM_ENV),y)
-BAREBOX_ENV_NAME = $(notdir $(call qstrip, $(BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH)))
+BAREBOX_ENV_NAME = $(notdir $(call qstrip,\
+    $(BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH)))

This one is probably OK :-)

Quoted 8 lines
Quoted 8 lines

Regards,
Arnout

Quoted 5 lines

Ditto.

But I'd like the maintainer to Ack this before you resend. I have no strong opinion about it, I just find it easier to read...

That statement is still true BTW.

Regards,
Arnout

Quoted 7 lines
Quoted 3 lines
Quoted 3 lines

Regards,
Yann E. MORIN.

Thanks

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#6 lore raw

PATCH 2/6 Remove "dirs" dependencies

In reply to Fabio Porcedda

The package infrastructure add automatically the "dirs" dependency so remove it when the package infrastructure is being used.

---
 Makefile                 | 2 +-
 package/uclibc/uclibc.mk | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Makefile +1 -1
index 665865b..30d56d0 100644
@@ -625,7 +625,7 @@ target-post-image: $(TARGETS_ROOTFS) target-finalize
 toolchain-eclipse-register:
 	./support/scripts/eclipse-register-toolchain `readlink -f $(O)` $(notdir $(TARGET_CROSS)) $(BR2_ARCH)
 
-source: dirs $(TARGETS_SOURCE) $(HOST_SOURCE)
+source: $(TARGETS_SOURCE) $(HOST_SOURCE)
 
 external-deps:
 	@$(MAKE1) -Bs DL_MODE=SHOW_EXTERNAL_DEPS $(EXTRAMAKEARGS) source | sort -u
package/uclibc/uclibc.mk +1 -1
index f0fb53a..020e218 100644
@@ -542,7 +542,7 @@ define UCLIBC_INSTALL_STAGING_CMDS
 	$(UCLIBC_INSTALL_UTILS_STAGING)
 endef
 
-uclibc-menuconfig: dirs uclibc-patch
+uclibc-menuconfig: uclibc-patch
 	$(MAKE1) -C $(UCLIBC_DIR) \
 		$(UCLIBC_MAKE_FLAGS) \
 		PREFIX=$(STAGING_DIR) \
Signature · 1 line
1.8.3.2
#7 lore raw

PATCH 2/6 Remove "dirs" dependencies

Quoted 4 lines · Fabio Porcedda

The package infrastructure add automatically the "dirs" dependency so remove it when the package infrastructure is being used.

Quoted 32 lines
---
 Makefile                 | 2 +-
 package/uclibc/uclibc.mk | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Makefile +1 -1
index 665865b..30d56d0 100644
@@ -625,7 +625,7 @@ target-post-image: $(TARGETS_ROOTFS) target-finalize
 toolchain-eclipse-register:
 	./support/scripts/eclipse-register-toolchain `readlink -f $(O)` $(notdir $(TARGET_CROSS)) $(BR2_ARCH)
 
-source: dirs $(TARGETS_SOURCE) $(HOST_SOURCE)
+source: $(TARGETS_SOURCE) $(HOST_SOURCE)
 
 external-deps:
 	@$(MAKE1) -Bs DL_MODE=SHOW_EXTERNAL_DEPS $(EXTRAMAKEARGS) source | sort -u
package/uclibc/uclibc.mk +1 -1
index f0fb53a..020e218 100644
@@ -542,7 +542,7 @@ define UCLIBC_INSTALL_STAGING_CMDS
 	$(UCLIBC_INSTALL_UTILS_STAGING)
 endef
 
-uclibc-menuconfig: dirs uclibc-patch
+uclibc-menuconfig: uclibc-patch
 	$(MAKE1) -C $(UCLIBC_DIR) \
 		$(UCLIBC_MAKE_FLAGS) \
 		PREFIX=$(STAGING_DIR) \
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#8 lore raw

PATCH 3/6 Makefile: fix coding style

In reply to Fabio Porcedda

As stated in the buildroot user manual add just a single space before and after a '=' sign.

---
 Makefile | 188 +++++++++++++++++++++++++++++++--------------------------------
 1 file changed, 94 insertions(+), 94 deletions(-)
Makefile +94 -94
index 30d56d0..0420364 100644
@@ -25,10 +25,10 @@
 #--------------------------------------------------------------
 
 # Set and export the version string
-export BR2_VERSION:=2014.05-git
+export BR2_VERSION := 2014.05-git
 
 # Check for minimal make version (note: this check will break at make 10.x)
-MIN_MAKE_VERSION=3.81
+MIN_MAKE_VERSION = 3.81
 ifneq ($(firstword $(sort $(MAKE_VERSION) $(MIN_MAKE_VERSION))),$(MIN_MAKE_VERSION))
 $(error You have make '$(MAKE_VERSION)' installed. GNU make >= $(MIN_MAKE_VERSION) is required)
 endif
@@ -59,33 +59,33 @@ export HOSTARCH := $(shell uname -m | \
 #	make BR2_JLEVEL= -j$((`getconf _NPROCESSORS_ONLN`+1))
 
 # absolute path
-TOPDIR:=$(shell pwd)
-CONFIG_CONFIG_IN=Config.in
-CONFIG=support/kconfig
-DATE:=$(shell date +%Y%m%d)
+TOPDIR := $(shell pwd)
+CONFIG_CONFIG_IN = Config.in
+CONFIG = support/kconfig
+DATE := $(shell date +%Y%m%d)
 
 # Compute the full local version string so packages can use it as-is
 # Need to export it, so it can be got from environment in children (eg. mconf)
-export BR2_VERSION_FULL:=$(BR2_VERSION)$(shell $(TOPDIR)/support/scripts/setlocalversion)
+export BR2_VERSION_FULL := $(BR2_VERSION)$(shell $(TOPDIR)/support/scripts/setlocalversion)
 
-noconfig_targets:=menuconfig nconfig gconfig xconfig config oldconfig randconfig \
+noconfig_targets := menuconfig nconfig gconfig xconfig config oldconfig randconfig \
 	defconfig %_defconfig allyesconfig allnoconfig silentoldconfig release \
 	randpackageconfig allyespackageconfig allnopackageconfig \
 	source-check print-version olddefconfig
 
 # Strip quotes and then whitespaces
-qstrip=$(strip $(subst ",,$(1)))
+qstrip = $(strip $(subst ",,$(1)))
 #"))
 
 # Variables for use in Make constructs
-comma:=,
-empty:=
-space:=$(empty) $(empty)
+comma := ,
+empty :=
+space := $(empty) $(empty)
 
 ifneq ("$(origin O)", "command line")
-O:=output
-CONFIG_DIR:=$(TOPDIR)
-NEED_WRAPPER=
+O := output
+CONFIG_DIR := $(TOPDIR)
+NEED_WRAPPER =
 else
 # other packages might also support Linux-style out of tree builds
 # with the O=<dir> syntax (E.G. Busybox does). As make automatically
@@ -97,18 +97,18 @@ MAKEOVERRIDES =
 # of the origin function (command line -> environment).
 # Unfortunately some packages don't look at origin (E.G. uClibc 0.9.31+)
 # To really make O go away, we have to override it.
-override O:=$(O)
-CONFIG_DIR:=$(O)
+override O := $(O)
+CONFIG_DIR := $(O)
 # we need to pass O= everywhere we call back into the toplevel makefile
 EXTRAMAKEARGS = O=$(O)
-NEED_WRAPPER=y
+NEED_WRAPPER = y
 endif
 
 # bash prints the name of the directory on 'cd <dir>' if CDPATH is
 # set, so unset it here to not cause problems. Notice that the export
 # line doesn't affect the environment of $(shell ..) calls, so
 # explictly throw away any output from 'cd' here.
-export CDPATH:=
+export CDPATH :=
 BASE_DIR := $(shell mkdir -p $(O) && cd $(O) >/dev/null && pwd)
 $(if $(BASE_DIR),, $(error output directory "$(O)" does not exist))
 
@@ -150,27 +150,27 @@ endif
 # Avoids doing the $(or...) everytime
 _BR2_GRAPH_OUT := $(or $(BR2_GRAPH_OUT),pdf)
 
-BUILD_DIR:=$(BASE_DIR)/build
-STAMP_DIR:=$(BASE_DIR)/stamps
-BINARIES_DIR:=$(BASE_DIR)/images
-TARGET_DIR:=$(BASE_DIR)/target
+BUILD_DIR := $(BASE_DIR)/build
+STAMP_DIR := $(BASE_DIR)/stamps
+BINARIES_DIR := $(BASE_DIR)/images
+TARGET_DIR := $(BASE_DIR)/target
 # initial definition so that 'make clean' works for most users, even without
 # .config. HOST_DIR will be overwritten later when .config is included.
-HOST_DIR:=$(BASE_DIR)/host
-
-LEGAL_INFO_DIR=$(BASE_DIR)/legal-info
-REDIST_SOURCES_DIR_TARGET=$(LEGAL_INFO_DIR)/sources
-REDIST_SOURCES_DIR_HOST=$(LEGAL_INFO_DIR)/host-sources
-LICENSE_FILES_DIR_TARGET=$(LEGAL_INFO_DIR)/licenses
-LICENSE_FILES_DIR_HOST=$(LEGAL_INFO_DIR)/host-licenses
-LEGAL_MANIFEST_CSV_TARGET=$(LEGAL_INFO_DIR)/manifest.csv
-LEGAL_MANIFEST_CSV_HOST=$(LEGAL_INFO_DIR)/host-manifest.csv
-LEGAL_LICENSES_TXT_TARGET=$(LEGAL_INFO_DIR)/licenses.txt
-LEGAL_LICENSES_TXT_HOST=$(LEGAL_INFO_DIR)/host-licenses.txt
-LEGAL_WARNINGS=$(LEGAL_INFO_DIR)/.warnings
-LEGAL_REPORT=$(LEGAL_INFO_DIR)/README
-
-BR2_CONFIG=$(CONFIG_DIR)/.config
+HOST_DIR := $(BASE_DIR)/host
+
+LEGAL_INFO_DIR = $(BASE_DIR)/legal-info
+REDIST_SOURCES_DIR_TARGET = $(LEGAL_INFO_DIR)/sources
+REDIST_SOURCES_DIR_HOST = $(LEGAL_INFO_DIR)/host-sources
+LICENSE_FILES_DIR_TARGET = $(LEGAL_INFO_DIR)/licenses
+LICENSE_FILES_DIR_HOST = $(LEGAL_INFO_DIR)/host-licenses
+LEGAL_MANIFEST_CSV_TARGET = $(LEGAL_INFO_DIR)/manifest.csv
+LEGAL_MANIFEST_CSV_HOST = $(LEGAL_INFO_DIR)/host-manifest.csv
+LEGAL_LICENSES_TXT_TARGET = $(LEGAL_INFO_DIR)/licenses.txt
+LEGAL_LICENSES_TXT_HOST = $(LEGAL_INFO_DIR)/host-licenses.txt
+LEGAL_WARNINGS = $(LEGAL_INFO_DIR)/.warnings
+LEGAL_REPORT = $(LEGAL_INFO_DIR)/README
+
+BR2_CONFIG = $(CONFIG_DIR)/.config
 
 # Pull in the user's configuration file
 ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
@@ -181,22 +181,22 @@ endif
 # Use 'make V=1' to see the full commands
 ifdef V
   ifeq ("$(origin V)", "command line")
-    KBUILD_VERBOSE=$(V)
+    KBUILD_VERBOSE = $(V)
   endif
 endif
 ifndef KBUILD_VERBOSE
-  KBUILD_VERBOSE=0
+  KBUILD_VERBOSE = 0
 endif
 
 ifeq ($(KBUILD_VERBOSE),1)
-  quiet=
-  Q=
+  quiet =
+  Q =
 ifndef VERBOSE
-  VERBOSE=1
+  VERBOSE = 1
 endif
 else
-  quiet=quiet_
-  Q=@
+  quiet = quiet_
+  Q = @
 endif
 
 # we want bash as shell
@@ -205,56 +205,56 @@ SHELL:=$(shell if [ -x "$$BASH" ]; then echo $$BASH; \
 	else echo sh; fi; fi)
 
 # kconfig uses CONFIG_SHELL
-CONFIG_SHELL:=$(SHELL)
+CONFIG_SHELL := $(SHELL)
 
 export SHELL CONFIG_SHELL quiet Q KBUILD_VERBOSE VERBOSE
 
 ifndef HOSTAR
-HOSTAR:=ar
+HOSTAR := ar
 endif
 ifndef HOSTAS
 HOSTAS:=as
 endif
 ifndef HOSTCC
-HOSTCC:=gcc
-HOSTCC:=$(shell which $(HOSTCC) || type -p $(HOSTCC) || echo gcc)
+HOSTCC := gcc
+HOSTCC := $(shell which $(HOSTCC) || type -p $(HOSTCC) || echo gcc)
 endif
 HOSTCC_NOCCACHE:=$(HOSTCC)
 ifndef HOSTCXX
-HOSTCXX:=g++
-HOSTCXX:=$(shell which $(HOSTCXX) || type -p $(HOSTCXX) || echo g++)
+HOSTCXX := g++
+HOSTCXX := $(shell which $(HOSTCXX) || type -p $(HOSTCXX) || echo g++)
 endif
-HOSTCXX_NOCCACHE:=$(HOSTCXX)
+HOSTCXX_NOCCACHE := $(HOSTCXX)
 ifndef HOSTFC
-HOSTFC:=gfortran
+HOSTFC := gfortran
 endif
 ifndef HOSTCPP
 HOSTCPP:=cpp
 endif
 ifndef HOSTLD
-HOSTLD:=ld
+HOSTLD := ld
 endif
 ifndef HOSTLN
-HOSTLN:=ln
+HOSTLN := ln
 endif
 ifndef HOSTNM
-HOSTNM:=nm
+HOSTNM := nm
 endif
 ifndef HOSTOBJCOPY
-HOSTOBJCOPY:=objcopy
+HOSTOBJCOPY := objcopy
 endif
 ifndef HOSTRANLIB
-HOSTRANLIB:=ranlib
-endif
-HOSTAR:=$(shell which $(HOSTAR) || type -p $(HOSTAR) || echo ar)
-HOSTAS:=$(shell which $(HOSTAS) || type -p $(HOSTAS) || echo as)
-HOSTFC:=$(shell which $(HOSTLD) || type -p $(HOSTLD) || echo || which g77 || type -p g77 || echo gfortran)
-HOSTCPP:=$(shell which $(HOSTCPP) || type -p $(HOSTCPP) || echo cpp)
-HOSTLD:=$(shell which $(HOSTLD) || type -p $(HOSTLD) || echo ld)
-HOSTLN:=$(shell which $(HOSTLN) || type -p $(HOSTLN) || echo ln)
-HOSTNM:=$(shell which $(HOSTNM) || type -p $(HOSTNM) || echo nm)
-HOSTOBJCOPY:=$(shell which $(HOSTOBJCOPY) || type -p $(HOSTOBJCOPY) || echo objcopy)
-HOSTRANLIB:=$(shell which $(HOSTRANLIB) || type -p $(HOSTRANLIB) || echo ranlib)
+HOSTRANLIB := ranlib
+endif
+HOSTAR := $(shell which $(HOSTAR) || type -p $(HOSTAR) || echo ar)
+HOSTAS := $(shell which $(HOSTAS) || type -p $(HOSTAS) || echo as)
+HOSTFC := $(shell which $(HOSTLD) || type -p $(HOSTLD) || echo || which g77 || type -p g77 || echo gfortran)
+HOSTCPP := $(shell which $(HOSTCPP) || type -p $(HOSTCPP) || echo cpp)
+HOSTLD := $(shell which $(HOSTLD) || type -p $(HOSTLD) || echo ld)
+HOSTLN := $(shell which $(HOSTLN) || type -p $(HOSTLN) || echo ln)
+HOSTNM := $(shell which $(HOSTNM) || type -p $(HOSTNM) || echo nm)
+HOSTOBJCOPY := $(shell which $(HOSTOBJCOPY) || type -p $(HOSTOBJCOPY) || echo objcopy)
+HOSTRANLIB := $(shell which $(HOSTRANLIB) || type -p $(HOSTRANLIB) || echo ranlib)
 
 export HOSTAR HOSTAS HOSTCC HOSTCXX HOSTFC HOSTLD
 export HOSTCC_NOCCACHE HOSTCXX_NOCCACHE
@@ -291,7 +291,7 @@ unexport CONFIG_SITE
 unexport QMAKESPEC
 unexport TERMINFO
 
-GNU_HOST_NAME:=$(shell support/gnuconfig/config.guess)
+GNU_HOST_NAME := $(shell support/gnuconfig/config.guess)
 
 ################################################################################
 #
@@ -300,15 +300,15 @@ GNU_HOST_NAME:=$(shell support/gnuconfig/config.guess)
 #
 ################################################################################
 
-TARGETS:= toolchain
+TARGETS := toolchain
 
 # silent mode requested?
-QUIET:=$(if $(findstring s,$(MAKEFLAGS)),-q)
+QUIET := $(if $(findstring s,$(MAKEFLAGS)),-q)
 
 # Strip off the annoying quoting
-ARCH:=$(call qstrip,$(BR2_ARCH))
+ARCH := $(call qstrip,$(BR2_ARCH))
 
-KERNEL_ARCH:=$(shell echo "$(ARCH)" | sed -e "s/-.*//" \
+KERNEL_ARCH := $(shell echo "$(ARCH)" | sed -e "s/-.*//" \
 	-e s/i.86/i386/ -e s/sun4u/sparc64/ \
 	-e s/arcle/arc/ \
 	-e s/arceb/arc/ \
@@ -320,28 +320,28 @@ KERNEL_ARCH:=$(shell echo "$(ARCH)" | sed -e "s/-.*//" \
 	-e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
 	-e s/sh.*/sh/)
 
-ZCAT:=$(call qstrip,$(BR2_ZCAT))
-BZCAT:=$(call qstrip,$(BR2_BZCAT))
-XZCAT:=$(call qstrip,$(BR2_XZCAT))
-TAR_OPTIONS=$(call qstrip,$(BR2_TAR_OPTIONS)) -xf
+ZCAT := $(call qstrip,$(BR2_ZCAT))
+BZCAT := $(call qstrip,$(BR2_BZCAT))
+XZCAT := $(call qstrip,$(BR2_XZCAT))
+TAR_OPTIONS = $(call qstrip,$(BR2_TAR_OPTIONS)) -xf
 
 # packages compiled for the host go here
-HOST_DIR:=$(call qstrip,$(BR2_HOST_DIR))
+HOST_DIR := $(call qstrip,$(BR2_HOST_DIR))
 
 # locales to generate
-GENERATE_LOCALE=$(call qstrip,$(BR2_GENERATE_LOCALE))
+GENERATE_LOCALE = $(call qstrip,$(BR2_GENERATE_LOCALE))
 
-TARGET_SKELETON=$(TOPDIR)/system/skeleton
+TARGET_SKELETON = $(TOPDIR)/system/skeleton
 
 # Location of a file giving a big fat warning that output/target
 # should not be used as the root filesystem.
-TARGET_DIR_WARNING_FILE=$(TARGET_DIR)/THIS_IS_NOT_YOUR_ROOT_FILESYSTEM
+TARGET_DIR_WARNING_FILE = $(TARGET_DIR)/THIS_IS_NOT_YOUR_ROOT_FILESYSTEM
 
 ifeq ($(BR2_CCACHE),y)
-CCACHE:=$(HOST_DIR)/usr/bin/ccache
+CCACHE := $(HOST_DIR)/usr/bin/ccache
 BR_CACHE_DIR = $(call qstrip,$(BR2_CCACHE_DIR))
 export BR_CACHE_DIR
-HOSTCC  := $(CCACHE) $(HOSTCC)
+HOSTCC := $(CCACHE) $(HOSTCC)
 HOSTCXX := $(CCACHE) $(HOSTCXX)
 endif
 
@@ -394,23 +394,23 @@ include system/system.mk
 include $(BR2_EXTERNAL)/external.mk
 
 ifeq ($(BR2_ENABLE_LOCALE_PURGE),y)
-TARGETS+=target-purgelocales
+TARGETS += target-purgelocales
 endif
 
 ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
 ifneq ($(GENERATE_LOCALE),)
-TARGETS+=target-generatelocales
+TARGETS += target-generatelocales
 endif
 endif
 
 ifeq ($(BR2_ECLIPSE_REGISTER),y)
-TARGETS+=toolchain-eclipse-register
+TARGETS += toolchain-eclipse-register
 endif
 
 include fs/common.mk
 
-TARGETS_SOURCE:=$(patsubst %,%-source,$(TARGETS))
-TARGETS_DIRCLEAN:=$(patsubst %,%-dirclean,$(TARGETS))
+TARGETS_SOURCE := $(patsubst %,%-source,$(TARGETS))
+TARGETS_DIRCLEAN := $(patsubst %,%-dirclean,$(TARGETS))
 
 # host-* dependencies have to be handled specially, as those aren't
 # visible in Kconfig and hence not added to a variable like TARGETS.
@@ -430,7 +430,7 @@ HOST_DEPS = $(sort $(foreach dep,\
 		$($(dep))))
 HOST_SOURCE += $(addsuffix -source,$(sort $(TARGETS_HOST_DEPS) $(HOST_DEPS)))
 
-TARGETS_LEGAL_INFO:=$(patsubst %,%-legal-info,\
+TARGETS_LEGAL_INFO := $(patsubst %,%-legal-info,\
 		$(TARGETS) $(TARGETS_HOST_DEPS) $(HOST_DEPS))))
 
 dirs: $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
@@ -483,7 +483,7 @@ $(STAGING_DIR):
 	@ln -snf $(STAGING_DIR) $(BASE_DIR)/staging
 
 ifeq ($(BR2_ROOTFS_SKELETON_CUSTOM),y)
-TARGET_SKELETON=$(BR2_ROOTFS_SKELETON_CUSTOM_PATH)
+TARGET_SKELETON = $(BR2_ROOTFS_SKELETON_CUSTOM_PATH)
 endif
 
 RSYNC_VCS_EXCLUSIONS = \
@@ -577,8 +577,8 @@ endif
 		$(USER_HOOKS_EXTRA_ENV) $(s) $(TARGET_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
 
 ifeq ($(BR2_ENABLE_LOCALE_PURGE),y)
-LOCALE_WHITELIST=$(BUILD_DIR)/locales.nopurge
-LOCALE_NOPURGE=$(call qstrip,$(BR2_ENABLE_LOCALE_WHITELIST))
+LOCALE_WHITELIST = $(BUILD_DIR)/locales.nopurge
+LOCALE_NOPURGE = $(call qstrip,$(BR2_ENABLE_LOCALE_WHITELIST))
 
 target-purgelocales:
 	rm -f $(LOCALE_WHITELIST)
@@ -682,7 +682,7 @@ endif # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
 # configuration
 # ---------------------------------------------------------------------------
 
-HOSTCFLAGS=$(CFLAGS_FOR_BUILD)
+HOSTCFLAGS = $(CFLAGS_FOR_BUILD)
 export HOSTCFLAGS
 
 $(BUILD_DIR)/buildroot-config/%onf:
@@ -911,7 +911,7 @@ endif
 	@echo 'See docs/README, or generate the Buildroot manual for further details'
 	@echo
 
-release: OUT=buildroot-$(BR2_VERSION)
+release: OUT = buildroot-$(BR2_VERSION)
 
 # Create release tarballs. We need to fiddle a bit to add the generated
 # documentation to the git output
Signature · 1 line
1.8.3.2
#9 lore raw

PATCH 3/6 Makefile: fix coding style

Quoted 4 lines · Fabio Porcedda

As stated in the buildroot user manual add just a single space before and after a '=' sign.

Reviewing this patch leads to a few more opportunities, though. So these
are commented below.

Quoted 9 lines
---
 Makefile | 188 +++++++++++++++++++++++++++++++--------------------------------
 1 file changed, 94 insertions(+), 94 deletions(-)
Makefile +0 -0
index 30d56d0..0420364 100644

Makefile line 28

Quoted 5 lines
Makefile +1 -1
@@ -25,10 +25,10 @@
 #--------------------------------------------------------------
 
 # Set and export the version string
-export BR2_VERSION:=2014.05-git
+export BR2_VERSION := 2014.05-git

No reason for := here.

Quoted 8 lines
Makefile +1 -1
 # Check for minimal make version (note: this check will break at make 10.x)
-MIN_MAKE_VERSION=3.81
+MIN_MAKE_VERSION = 3.81
 ifneq ($(firstword $(sort $(MAKE_VERSION) $(MIN_MAKE_VERSION))),$(MIN_MAKE_VERSION))
 $(error You have make '$(MAKE_VERSION)' installed. GNU make >= $(MIN_MAKE_VERSION) is required)
 endif

Makefile export HOSTARCH := $(shell uname -m | \ · line 64

Quoted 10 lines
Makefile +3 -4
@@ -59,33 +59,33 @@ export HOSTARCH := $(shell uname -m | \
 #	make BR2_JLEVEL= -j$((`getconf _NPROCESSORS_ONLN`+1))
 
 # absolute path
-TOPDIR:=$(shell pwd)
-CONFIG_CONFIG_IN=Config.in
-CONFIG=support/kconfig
-DATE:=$(shell date +%Y%m%d)
+TOPDIR := $(shell pwd)
+CONFIG_CONFIG_IN = Config.in
+CONFIG = support/kconfig

Actually, this is used in just one place so perhaps it can be removed.

Makefile export HOSTARCH := $(shell uname -m | \ · line 65

Quoted 1 line
Makefile +1 -0
+DATE := $(shell date +%Y%m%d)

Same here.

Quoted 22 lines
Makefile +4 -6
 # Compute the full local version string so packages can use it as-is
 # Need to export it, so it can be got from environment in children (eg. mconf)
-export BR2_VERSION_FULL:=$(BR2_VERSION)$(shell $(TOPDIR)/support/scripts/setlocalversion)
+export BR2_VERSION_FULL := $(BR2_VERSION)$(shell $(TOPDIR)/support/scripts/setlocalversion)
 
-noconfig_targets:=menuconfig nconfig gconfig xconfig config oldconfig randconfig \
+noconfig_targets := menuconfig nconfig gconfig xconfig config oldconfig randconfig \
 	defconfig %_defconfig allyesconfig allnoconfig silentoldconfig release \
 	randpackageconfig allyespackageconfig allnopackageconfig \
 	source-check print-version olddefconfig
 
 # Strip quotes and then whitespaces
-qstrip=$(strip $(subst ",,$(1)))
+qstrip = $(strip $(subst ",,$(1)))
 #"))
 
 # Variables for use in Make constructs
-comma:=,
-empty:=
-space:=$(empty) $(empty)
+comma := ,

Makefile export HOSTARCH := $(shell uname -m | \ · line 88

Quoted 10 lines
Makefile +5 -3
+empty :=
+space := $(empty) $(empty)
 
 ifneq ("$(origin O)", "command line")
-O:=output
-CONFIG_DIR:=$(TOPDIR)
-NEED_WRAPPER=
+O := output
+CONFIG_DIR := $(TOPDIR)
+NEED_WRAPPER =

No need to define NEED_WRAPPER to empty.

Quoted 28 lines
Makefile +4 -4
 else
 # other packages might also support Linux-style out of tree builds
 # with the O=<dir> syntax (E.G. Busybox does). As make automatically
@@ -97,18 +97,18 @@ MAKEOVERRIDES =
 # of the origin function (command line -> environment).
 # Unfortunately some packages don't look at origin (E.G. uClibc 0.9.31+)
 # To really make O go away, we have to override it.
-override O:=$(O)
-CONFIG_DIR:=$(O)
+override O := $(O)
+CONFIG_DIR := $(O)
 # we need to pass O= everywhere we call back into the toplevel makefile
 EXTRAMAKEARGS = O=$(O)
-NEED_WRAPPER=y
+NEED_WRAPPER = y
 endif
 
 # bash prints the name of the directory on 'cd <dir>' if CDPATH is
 # set, so unset it here to not cause problems. Notice that the export
 # line doesn't affect the environment of $(shell ..) calls, so
 # explictly throw away any output from 'cd' here.
-export CDPATH:=
+export CDPATH :=
 BASE_DIR := $(shell mkdir -p $(O) && cd $(O) >/dev/null && pwd)
 $(if $(BASE_DIR),, $(error output directory "$(O)" does not exist))
 
@@ -150,27 +150,27 @@ endif
 # Avoids doing the $(or...) everytime

Makefile endif · line 156

Quoted 10 lines
Makefile +4 -4
 _BR2_GRAPH_OUT := $(or $(BR2_GRAPH_OUT),pdf)
 
-BUILD_DIR:=$(BASE_DIR)/build
-STAMP_DIR:=$(BASE_DIR)/stamps
-BINARIES_DIR:=$(BASE_DIR)/images
-TARGET_DIR:=$(BASE_DIR)/target
+BUILD_DIR := $(BASE_DIR)/build
+STAMP_DIR := $(BASE_DIR)/stamps
+BINARIES_DIR := $(BASE_DIR)/images
+TARGET_DIR := $(BASE_DIR)/target

All these don't need :=

Quoted 8 lines
Makefile +0 -6
 # initial definition so that 'make clean' works for most users, even without
 # .config. HOST_DIR will be overwritten later when .config is included.
-HOST_DIR:=$(BASE_DIR)/host
-
-LEGAL_INFO_DIR=$(BASE_DIR)/legal-info
-REDIST_SOURCES_DIR_TARGET=$(LEGAL_INFO_DIR)/sources
-REDIST_SOURCES_DIR_HOST=$(LEGAL_INFO_DIR)/host-sources
-LICENSE_FILES_DIR_TARGET=$(LEGAL_INFO_DIR)/licenses

Makefile endif · line 159

Quoted 10 lines
Makefile +1 -9
-LICENSE_FILES_DIR_HOST=$(LEGAL_INFO_DIR)/host-licenses
-LEGAL_MANIFEST_CSV_TARGET=$(LEGAL_INFO_DIR)/manifest.csv
-LEGAL_MANIFEST_CSV_HOST=$(LEGAL_INFO_DIR)/host-manifest.csv
-LEGAL_LICENSES_TXT_TARGET=$(LEGAL_INFO_DIR)/licenses.txt
-LEGAL_LICENSES_TXT_HOST=$(LEGAL_INFO_DIR)/host-licenses.txt
-LEGAL_WARNINGS=$(LEGAL_INFO_DIR)/.warnings
-LEGAL_REPORT=$(LEGAL_INFO_DIR)/README
-
-BR2_CONFIG=$(CONFIG_DIR)/.config
+HOST_DIR := $(BASE_DIR)/host

Neither does this one.

Quoted 25 lines
Makefile +15 -1
+
+LEGAL_INFO_DIR = $(BASE_DIR)/legal-info
+REDIST_SOURCES_DIR_TARGET = $(LEGAL_INFO_DIR)/sources
+REDIST_SOURCES_DIR_HOST = $(LEGAL_INFO_DIR)/host-sources
+LICENSE_FILES_DIR_TARGET = $(LEGAL_INFO_DIR)/licenses
+LICENSE_FILES_DIR_HOST = $(LEGAL_INFO_DIR)/host-licenses
+LEGAL_MANIFEST_CSV_TARGET = $(LEGAL_INFO_DIR)/manifest.csv
+LEGAL_MANIFEST_CSV_HOST = $(LEGAL_INFO_DIR)/host-manifest.csv
+LEGAL_LICENSES_TXT_TARGET = $(LEGAL_INFO_DIR)/licenses.txt
+LEGAL_LICENSES_TXT_HOST = $(LEGAL_INFO_DIR)/host-licenses.txt
+LEGAL_WARNINGS = $(LEGAL_INFO_DIR)/.warnings
+LEGAL_REPORT = $(LEGAL_INFO_DIR)/README
+
+BR2_CONFIG = $(CONFIG_DIR)/.config
 
 # Pull in the user's configuration file
 ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
@@ -181,22 +181,22 @@ endif
 # Use 'make V=1' to see the full commands
 ifdef V
   ifeq ("$(origin V)", "command line")
-    KBUILD_VERBOSE=$(V)
+    KBUILD_VERBOSE = $(V)
   endif
 endif

Makefile endif · line 193

Quoted 10 lines
Makefile +3 -3
 ifndef KBUILD_VERBOSE
-  KBUILD_VERBOSE=0
+  KBUILD_VERBOSE = 0
 endif
 
 ifeq ($(KBUILD_VERBOSE),1)
-  quiet=
-  Q=
+  quiet =
+  Q =

These are not needed.

Makefile endif · line 198

Quoted 8 lines
Makefile +2 -3
 ifndef VERBOSE
-  VERBOSE=1
+  VERBOSE = 1
 endif
 else
-  quiet=quiet_
-  Q=@
+  quiet = quiet_

quiet is not used. It is exported though, which is probably a bad idea
anyway.

Makefile SHELL:=$(shell if [ -x "$$BASH" ]; then echo $$BASH; \ · line 210

Quoted 12 lines
Makefile +2 -1
+  Q = @
 endif
 
 # we want bash as shell
@@ -205,56 +205,56 @@ SHELL:=$(shell if [ -x "$$BASH" ]; then echo $$BASH; \
 	else echo sh; fi; fi)
 
 # kconfig uses CONFIG_SHELL
-CONFIG_SHELL:=$(SHELL)
+CONFIG_SHELL := $(SHELL)
 
 export SHELL CONFIG_SHELL quiet Q KBUILD_VERBOSE VERBOSE

CONFIG_SHELL should be passed with the rest of the kconfig environment,
not exported.

Makefile SHELL:=$(shell if [ -x "$$BASH" ]; then echo $$BASH; \ · line 213

Quoted 4 lines
Makefile +1 -1
 ifndef HOSTAR
-HOSTAR:=ar
+HOSTAR := ar

No := needed.

Makefile SHELL:=$(shell if [ -x "$$BASH" ]; then echo $$BASH; \ · line 216

Quoted 3 lines
Makefile +0 -0
 endif
 ifndef HOSTAS
 HOSTAS:=as

Same here.

Quoted 6 lines
Makefile +2 -2
 endif
 ifndef HOSTCC
-HOSTCC:=gcc
-HOSTCC:=$(shell which $(HOSTCC) || type -p $(HOSTCC) || echo gcc)
+HOSTCC := gcc
+HOSTCC := $(shell which $(HOSTCC) || type -p $(HOSTCC) || echo gcc)

Makefile SHELL:=$(shell if [ -x "$$BASH" ]; then echo $$BASH; \ · line 227

Quoted 10 lines
Makefile +3 -3
 endif
 HOSTCC_NOCCACHE:=$(HOSTCC)
 ifndef HOSTCXX
-HOSTCXX:=g++
-HOSTCXX:=$(shell which $(HOSTCXX) || type -p $(HOSTCXX) || echo g++)
+HOSTCXX := g++
+HOSTCXX := $(shell which $(HOSTCXX) || type -p $(HOSTCXX) || echo g++)
 endif
-HOSTCXX_NOCCACHE:=$(HOSTCXX)
+HOSTCXX_NOCCACHE := $(HOSTCXX)

Here := is needed!

Makefile SHELL:=$(shell if [ -x "$$BASH" ]; then echo $$BASH; \ · line 229

Quoted 3 lines
Makefile +1 -1
 ifndef HOSTFC
-HOSTFC:=gfortran
+HOSTFC := gfortran

No :=

Makefile SHELL:=$(shell if [ -x "$$BASH" ]; then echo $$BASH; \ · line 232

Quoted 3 lines
Makefile +0 -0
 endif
 ifndef HOSTCPP
 HOSTCPP:=cpp

Idem.

Makefile SHELL:=$(shell if [ -x "$$BASH" ]; then echo $$BASH; \ · line 235

Quoted 4 lines
Makefile +1 -1
 endif
 ifndef HOSTLD
-HOSTLD:=ld
+HOSTLD := ld

Idem. Etc. etc.

Quoted 49 lines
Makefile +15 -15
 endif
 ifndef HOSTLN
-HOSTLN:=ln
+HOSTLN := ln
 endif
 ifndef HOSTNM
-HOSTNM:=nm
+HOSTNM := nm
 endif
 ifndef HOSTOBJCOPY
-HOSTOBJCOPY:=objcopy
+HOSTOBJCOPY := objcopy
 endif
 ifndef HOSTRANLIB
-HOSTRANLIB:=ranlib
-endif
-HOSTAR:=$(shell which $(HOSTAR) || type -p $(HOSTAR) || echo ar)
-HOSTAS:=$(shell which $(HOSTAS) || type -p $(HOSTAS) || echo as)
-HOSTFC:=$(shell which $(HOSTLD) || type -p $(HOSTLD) || echo || which g77 || type -p g77 || echo gfortran)
-HOSTCPP:=$(shell which $(HOSTCPP) || type -p $(HOSTCPP) || echo cpp)
-HOSTLD:=$(shell which $(HOSTLD) || type -p $(HOSTLD) || echo ld)
-HOSTLN:=$(shell which $(HOSTLN) || type -p $(HOSTLN) || echo ln)
-HOSTNM:=$(shell which $(HOSTNM) || type -p $(HOSTNM) || echo nm)
-HOSTOBJCOPY:=$(shell which $(HOSTOBJCOPY) || type -p $(HOSTOBJCOPY) || echo objcopy)
-HOSTRANLIB:=$(shell which $(HOSTRANLIB) || type -p $(HOSTRANLIB) || echo ranlib)
+HOSTRANLIB := ranlib
+endif
+HOSTAR := $(shell which $(HOSTAR) || type -p $(HOSTAR) || echo ar)
+HOSTAS := $(shell which $(HOSTAS) || type -p $(HOSTAS) || echo as)
+HOSTFC := $(shell which $(HOSTLD) || type -p $(HOSTLD) || echo || which g77 || type -p g77 || echo gfortran)
+HOSTCPP := $(shell which $(HOSTCPP) || type -p $(HOSTCPP) || echo cpp)
+HOSTLD := $(shell which $(HOSTLD) || type -p $(HOSTLD) || echo ld)
+HOSTLN := $(shell which $(HOSTLN) || type -p $(HOSTLN) || echo ln)
+HOSTNM := $(shell which $(HOSTNM) || type -p $(HOSTNM) || echo nm)
+HOSTOBJCOPY := $(shell which $(HOSTOBJCOPY) || type -p $(HOSTOBJCOPY) || echo objcopy)
+HOSTRANLIB := $(shell which $(HOSTRANLIB) || type -p $(HOSTRANLIB) || echo ranlib)
 
 export HOSTAR HOSTAS HOSTCC HOSTCXX HOSTFC HOSTLD
 export HOSTCC_NOCCACHE HOSTCXX_NOCCACHE
@@ -291,7 +291,7 @@ unexport CONFIG_SITE
 unexport QMAKESPEC
 unexport TERMINFO
 
-GNU_HOST_NAME:=$(shell support/gnuconfig/config.guess)
+GNU_HOST_NAME := $(shell support/gnuconfig/config.guess)
 
 ################################################################################
 #

Makefile GNU_HOST_NAME:=$(shell support/gnuconfig/config.guess) · line 303

Quoted 5 lines
Makefile +1 -1
@@ -300,15 +300,15 @@ GNU_HOST_NAME:=$(shell support/gnuconfig/config.guess)
 #
 ################################################################################
 
-TARGETS:= toolchain
+TARGETS := toolchain

Since TARGETS is only updated with +=, no := is needed here either.

Makefile GNU_HOST_NAME:=$(shell support/gnuconfig/config.guess) · line 308

Quoted 6 lines
Makefile +1 -1
 # silent mode requested?
-QUIET:=$(if $(findstring s,$(MAKEFLAGS)),-q)
+QUIET := $(if $(findstring s,$(MAKEFLAGS)),-q)
 
 # Strip off the annoying quoting

This comment is redundant.

Makefile GNU_HOST_NAME:=$(shell support/gnuconfig/config.guess) · line 309

Quoted 2 lines
Makefile +1 -1
-ARCH:=$(call qstrip,$(BR2_ARCH))
+ARCH := $(call qstrip,$(BR2_ARCH))

No :=

Quoted 7 lines
Makefile +1 -1
-KERNEL_ARCH:=$(shell echo "$(ARCH)" | sed -e "s/-.*//" \
+KERNEL_ARCH := $(shell echo "$(ARCH)" | sed -e "s/-.*//" \
 	-e s/i.86/i386/ -e s/sun4u/sparc64/ \
 	-e s/arcle/arc/ \
 	-e s/arceb/arc/ \

Makefile KERNEL_ARCH:=$(shell echo "$(ARCH)" | sed -e "s/-.*//" \ · line 325

Quoted 10 lines
Makefile +3 -4
@@ -320,28 +320,28 @@ KERNEL_ARCH:=$(shell echo "$(ARCH)" | sed -e "s/-.*//" \
 	-e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
 	-e s/sh.*/sh/)
 
-ZCAT:=$(call qstrip,$(BR2_ZCAT))
-BZCAT:=$(call qstrip,$(BR2_BZCAT))
-XZCAT:=$(call qstrip,$(BR2_XZCAT))
-TAR_OPTIONS=$(call qstrip,$(BR2_TAR_OPTIONS)) -xf
+ZCAT := $(call qstrip,$(BR2_ZCAT))
+BZCAT := $(call qstrip,$(BR2_BZCAT))
+XZCAT := $(call qstrip,$(BR2_XZCAT))

Dito.

Makefile KERNEL_ARCH:=$(shell echo "$(ARCH)" | sed -e "s/-.*//" \ · line 329

Quoted 5 lines
Makefile +2 -1
+TAR_OPTIONS = $(call qstrip,$(BR2_TAR_OPTIONS)) -xf
 
 # packages compiled for the host go here
-HOST_DIR:=$(call qstrip,$(BR2_HOST_DIR))
+HOST_DIR := $(call qstrip,$(BR2_HOST_DIR))

Dito

Quoted 39 lines
Makefile +7 -7
 # locales to generate
-GENERATE_LOCALE=$(call qstrip,$(BR2_GENERATE_LOCALE))
+GENERATE_LOCALE = $(call qstrip,$(BR2_GENERATE_LOCALE))
 
-TARGET_SKELETON=$(TOPDIR)/system/skeleton
+TARGET_SKELETON = $(TOPDIR)/system/skeleton
 
 # Location of a file giving a big fat warning that output/target
 # should not be used as the root filesystem.
-TARGET_DIR_WARNING_FILE=$(TARGET_DIR)/THIS_IS_NOT_YOUR_ROOT_FILESYSTEM
+TARGET_DIR_WARNING_FILE = $(TARGET_DIR)/THIS_IS_NOT_YOUR_ROOT_FILESYSTEM
 
 ifeq ($(BR2_CCACHE),y)
-CCACHE:=$(HOST_DIR)/usr/bin/ccache
+CCACHE := $(HOST_DIR)/usr/bin/ccache
 BR_CACHE_DIR = $(call qstrip,$(BR2_CCACHE_DIR))
 export BR_CACHE_DIR
-HOSTCC  := $(CCACHE) $(HOSTCC)
+HOSTCC := $(CCACHE) $(HOSTCC)
 HOSTCXX := $(CCACHE) $(HOSTCXX)
 endif
 
@@ -394,23 +394,23 @@ include system/system.mk
 include $(BR2_EXTERNAL)/external.mk
 
 ifeq ($(BR2_ENABLE_LOCALE_PURGE),y)
-TARGETS+=target-purgelocales
+TARGETS += target-purgelocales
 endif
 
 ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
 ifneq ($(GENERATE_LOCALE),)
-TARGETS+=target-generatelocales
+TARGETS += target-generatelocales
 endif
 endif
 
 ifeq ($(BR2_ECLIPSE_REGISTER),y)

Makefile include system/system.mk · line 413

Quoted 10 lines
Makefile +3 -3
-TARGETS+=toolchain-eclipse-register
+TARGETS += toolchain-eclipse-register
 endif
 
 include fs/common.mk
 
-TARGETS_SOURCE:=$(patsubst %,%-source,$(TARGETS))
-TARGETS_DIRCLEAN:=$(patsubst %,%-dirclean,$(TARGETS))
+TARGETS_SOURCE := $(patsubst %,%-source,$(TARGETS))
+TARGETS_DIRCLEAN := $(patsubst %,%-dirclean,$(TARGETS))

No need for :=

Makefile HOST_DEPS = $(sort $(foreach dep,\ · line 434

Quoted 10 lines
Makefile +1 -1
 # host-* dependencies have to be handled specially, as those aren't
 # visible in Kconfig and hence not added to a variable like TARGETS.
@@ -430,7 +430,7 @@ HOST_DEPS = $(sort $(foreach dep,\
 		$($(dep))))
 HOST_SOURCE += $(addsuffix -source,$(sort $(TARGETS_HOST_DEPS) $(HOST_DEPS)))
 
-TARGETS_LEGAL_INFO:=$(patsubst %,%-legal-info,\
+TARGETS_LEGAL_INFO := $(patsubst %,%-legal-info,\
 		$(TARGETS) $(TARGETS_HOST_DEPS) $(HOST_DEPS))))

Dito.

Makefile $(STAGING_DIR): · line 486

Quoted 8 lines
Makefile +1 -1
 dirs: $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
@@ -483,7 +483,7 @@ $(STAGING_DIR):
 	@ln -snf $(STAGING_DIR) $(BASE_DIR)/staging
 
 ifeq ($(BR2_ROOTFS_SKELETON_CUSTOM),y)
-TARGET_SKELETON=$(BR2_ROOTFS_SKELETON_CUSTOM_PATH)
+TARGET_SKELETON = $(BR2_ROOTFS_SKELETON_CUSTOM_PATH)

Missing qstrip.

Regards,
Arnout

Quoted 33 lines
Makefile +4 -4
 endif
 
 RSYNC_VCS_EXCLUSIONS = \
@@ -577,8 +577,8 @@ endif
 		$(USER_HOOKS_EXTRA_ENV) $(s) $(TARGET_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
 
 ifeq ($(BR2_ENABLE_LOCALE_PURGE),y)
-LOCALE_WHITELIST=$(BUILD_DIR)/locales.nopurge
-LOCALE_NOPURGE=$(call qstrip,$(BR2_ENABLE_LOCALE_WHITELIST))
+LOCALE_WHITELIST = $(BUILD_DIR)/locales.nopurge
+LOCALE_NOPURGE = $(call qstrip,$(BR2_ENABLE_LOCALE_WHITELIST))
 
 target-purgelocales:
 	rm -f $(LOCALE_WHITELIST)
@@ -682,7 +682,7 @@ endif # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
 # configuration
 # ---------------------------------------------------------------------------
 
-HOSTCFLAGS=$(CFLAGS_FOR_BUILD)
+HOSTCFLAGS = $(CFLAGS_FOR_BUILD)
 export HOSTCFLAGS
 
 $(BUILD_DIR)/buildroot-config/%onf:
@@ -911,7 +911,7 @@ endif
 	@echo 'See docs/README, or generate the Buildroot manual for further details'
 	@echo
 
-release: OUT=buildroot-$(BR2_VERSION)
+release: OUT = buildroot-$(BR2_VERSION)
 
 # Create release tarballs. We need to fiddle a bit to add the generated
 # documentation to the git output
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#10 lore raw

PATCH 3/6 Makefile: fix coding style

Quoted 475 lines · Arnout Vandecappelle
Quoted 4 lines · Fabio Porcedda

As stated in the buildroot user manual add just a single space before and after a '=' sign.

Reviewing this patch leads to a few more opportunities, though. So these
are commented below.

Quoted 9 lines
---
 Makefile | 188 +++++++++++++++++++++++++++++++--------------------------------
 1 file changed, 94 insertions(+), 94 deletions(-)
Makefile +0 -0
index 30d56d0..0420364 100644

Makefile line 28

Quoted 5 lines
Makefile +1 -1
@@ -25,10 +25,10 @@
 #--------------------------------------------------------------
 
 # Set and export the version string
-export BR2_VERSION:=2014.05-git
+export BR2_VERSION := 2014.05-git

No reason for := here.

Quoted 8 lines
Makefile +1 -1
 # Check for minimal make version (note: this check will break at make 10.x)
-MIN_MAKE_VERSION=3.81
+MIN_MAKE_VERSION = 3.81
 ifneq ($(firstword $(sort $(MAKE_VERSION) $(MIN_MAKE_VERSION))),$(MIN_MAKE_VERSION))
 $(error You have make '$(MAKE_VERSION)' installed. GNU make >= $(MIN_MAKE_VERSION) is required)
 endif

Makefile export HOSTARCH := $(shell uname -m | \ · line 64

Quoted 10 lines
Makefile +3 -4
@@ -59,33 +59,33 @@ export HOSTARCH := $(shell uname -m | \
 #    make BR2_JLEVEL= -j$((`getconf _NPROCESSORS_ONLN`+1))
 
 # absolute path
-TOPDIR:=$(shell pwd)
-CONFIG_CONFIG_IN=Config.in
-CONFIG=support/kconfig
-DATE:=$(shell date +%Y%m%d)
+TOPDIR := $(shell pwd)
+CONFIG_CONFIG_IN = Config.in
+CONFIG = support/kconfig

Actually, this is used in just one place so perhaps it can be removed.

Makefile export HOSTARCH := $(shell uname -m | \ · line 65

Quoted 1 line
Makefile +1 -0
+DATE := $(shell date +%Y%m%d)

Same here.

Quoted 22 lines
Makefile +4 -6
 # Compute the full local version string so packages can use it as-is
 # Need to export it, so it can be got from environment in children (eg. mconf)
-export BR2_VERSION_FULL:=$(BR2_VERSION)$(shell $(TOPDIR)/support/scripts/setlocalversion)
+export BR2_VERSION_FULL := $(BR2_VERSION)$(shell $(TOPDIR)/support/scripts/setlocalversion)
 
-noconfig_targets:=menuconfig nconfig gconfig xconfig config oldconfig randconfig \
+noconfig_targets := menuconfig nconfig gconfig xconfig config oldconfig randconfig \
      defconfig %_defconfig allyesconfig allnoconfig silentoldconfig release \
      randpackageconfig allyespackageconfig allnopackageconfig \
      source-check print-version olddefconfig
 
 # Strip quotes and then whitespaces
-qstrip=$(strip $(subst ",,$(1)))
+qstrip = $(strip $(subst ",,$(1)))
 #"))
 
 # Variables for use in Make constructs
-comma:=,
-empty:=
-space:=$(empty) $(empty)
+comma := ,

Makefile export HOSTARCH := $(shell uname -m | \ · line 88

Quoted 10 lines
Makefile +5 -3
+empty :=
+space := $(empty) $(empty)
 
 ifneq ("$(origin O)", "command line")
-O:=output
-CONFIG_DIR:=$(TOPDIR)
-NEED_WRAPPER=
+O := output
+CONFIG_DIR := $(TOPDIR)
+NEED_WRAPPER =

No need to define NEED_WRAPPER to empty.

Quoted 28 lines
Makefile +4 -4
 else
 # other packages might also support Linux-style out of tree builds
 # with the O=<dir> syntax (E.G. Busybox does). As make automatically
@@ -97,18 +97,18 @@ MAKEOVERRIDES =
 # of the origin function (command line -> environment).
 # Unfortunately some packages don't look at origin (E.G. uClibc 0.9.31+)
 # To really make O go away, we have to override it.
-override O:=$(O)
-CONFIG_DIR:=$(O)
+override O := $(O)
+CONFIG_DIR := $(O)
 # we need to pass O= everywhere we call back into the toplevel makefile
 EXTRAMAKEARGS = O=$(O)
-NEED_WRAPPER=y
+NEED_WRAPPER = y
 endif
 
 # bash prints the name of the directory on 'cd <dir>' if CDPATH is
 # set, so unset it here to not cause problems. Notice that the export
 # line doesn't affect the environment of $(shell ..) calls, so
 # explictly throw away any output from 'cd' here.
-export CDPATH:=
+export CDPATH :=
 BASE_DIR := $(shell mkdir -p $(O) && cd $(O) >/dev/null && pwd)
 $(if $(BASE_DIR),, $(error output directory "$(O)" does not exist))
 
@@ -150,27 +150,27 @@ endif
 # Avoids doing the $(or...) everytime

Makefile endif · line 156

Quoted 10 lines
Makefile +4 -4
 _BR2_GRAPH_OUT := $(or $(BR2_GRAPH_OUT),pdf)
 
-BUILD_DIR:=$(BASE_DIR)/build
-STAMP_DIR:=$(BASE_DIR)/stamps
-BINARIES_DIR:=$(BASE_DIR)/images
-TARGET_DIR:=$(BASE_DIR)/target
+BUILD_DIR := $(BASE_DIR)/build
+STAMP_DIR := $(BASE_DIR)/stamps
+BINARIES_DIR := $(BASE_DIR)/images
+TARGET_DIR := $(BASE_DIR)/target

All these don't need :=

Quoted 8 lines
Makefile +0 -6
 # initial definition so that 'make clean' works for most users, even without
 # .config. HOST_DIR will be overwritten later when .config is included.
-HOST_DIR:=$(BASE_DIR)/host
-
-LEGAL_INFO_DIR=$(BASE_DIR)/legal-info
-REDIST_SOURCES_DIR_TARGET=$(LEGAL_INFO_DIR)/sources
-REDIST_SOURCES_DIR_HOST=$(LEGAL_INFO_DIR)/host-sources
-LICENSE_FILES_DIR_TARGET=$(LEGAL_INFO_DIR)/licenses

Makefile endif · line 159

Quoted 10 lines
Makefile +1 -9
-LICENSE_FILES_DIR_HOST=$(LEGAL_INFO_DIR)/host-licenses
-LEGAL_MANIFEST_CSV_TARGET=$(LEGAL_INFO_DIR)/manifest.csv
-LEGAL_MANIFEST_CSV_HOST=$(LEGAL_INFO_DIR)/host-manifest.csv
-LEGAL_LICENSES_TXT_TARGET=$(LEGAL_INFO_DIR)/licenses.txt
-LEGAL_LICENSES_TXT_HOST=$(LEGAL_INFO_DIR)/host-licenses.txt
-LEGAL_WARNINGS=$(LEGAL_INFO_DIR)/.warnings
-LEGAL_REPORT=$(LEGAL_INFO_DIR)/README
-
-BR2_CONFIG=$(CONFIG_DIR)/.config
+HOST_DIR := $(BASE_DIR)/host

Neither does this one.

Quoted 25 lines
Makefile +15 -1
+
+LEGAL_INFO_DIR = $(BASE_DIR)/legal-info
+REDIST_SOURCES_DIR_TARGET = $(LEGAL_INFO_DIR)/sources
+REDIST_SOURCES_DIR_HOST = $(LEGAL_INFO_DIR)/host-sources
+LICENSE_FILES_DIR_TARGET = $(LEGAL_INFO_DIR)/licenses
+LICENSE_FILES_DIR_HOST = $(LEGAL_INFO_DIR)/host-licenses
+LEGAL_MANIFEST_CSV_TARGET = $(LEGAL_INFO_DIR)/manifest.csv
+LEGAL_MANIFEST_CSV_HOST = $(LEGAL_INFO_DIR)/host-manifest.csv
+LEGAL_LICENSES_TXT_TARGET = $(LEGAL_INFO_DIR)/licenses.txt
+LEGAL_LICENSES_TXT_HOST = $(LEGAL_INFO_DIR)/host-licenses.txt
+LEGAL_WARNINGS = $(LEGAL_INFO_DIR)/.warnings
+LEGAL_REPORT = $(LEGAL_INFO_DIR)/README
+
+BR2_CONFIG = $(CONFIG_DIR)/.config
 
 # Pull in the user's configuration file
 ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
@@ -181,22 +181,22 @@ endif
 # Use 'make V=1' to see the full commands
 ifdef V
   ifeq ("$(origin V)", "command line")
-    KBUILD_VERBOSE=$(V)
+    KBUILD_VERBOSE = $(V)
   endif
 endif

Makefile endif · line 193

Quoted 10 lines
Makefile +3 -3
 ifndef KBUILD_VERBOSE
-  KBUILD_VERBOSE=0
+  KBUILD_VERBOSE = 0
 endif
 
 ifeq ($(KBUILD_VERBOSE),1)
-  quiet=
-  Q=
+  quiet =
+  Q =

These are not needed.

Makefile endif · line 198

Quoted 8 lines
Makefile +2 -3
 ifndef VERBOSE
-  VERBOSE=1
+  VERBOSE = 1
 endif
 else
-  quiet=quiet_
-  Q=@
+  quiet = quiet_

quiet is not used. It is exported though, which is probably a bad idea
anyway.

Makefile SHELL:=$(shell if [ -x "$$BASH" ]; then echo $$BASH; \ · line 210

Quoted 12 lines
Makefile +2 -1
+  Q = @
 endif
 
 # we want bash as shell
@@ -205,56 +205,56 @@ SHELL:=$(shell if [ -x "$$BASH" ]; then echo $$BASH; \
      else echo sh; fi; fi)
 
 # kconfig uses CONFIG_SHELL
-CONFIG_SHELL:=$(SHELL)
+CONFIG_SHELL := $(SHELL)
 
 export SHELL CONFIG_SHELL quiet Q KBUILD_VERBOSE VERBOSE

CONFIG_SHELL should be passed with the rest of the kconfig environment,
not exported.

Makefile SHELL:=$(shell if [ -x "$$BASH" ]; then echo $$BASH; \ · line 213

Quoted 4 lines
Makefile +1 -1
 ifndef HOSTAR
-HOSTAR:=ar
+HOSTAR := ar

No := needed.

Makefile SHELL:=$(shell if [ -x "$$BASH" ]; then echo $$BASH; \ · line 216

Quoted 3 lines
Makefile +0 -0
 endif
 ifndef HOSTAS
 HOSTAS:=as

Same here.

Quoted 6 lines
Makefile +2 -2
 endif
 ifndef HOSTCC
-HOSTCC:=gcc
-HOSTCC:=$(shell which $(HOSTCC) || type -p $(HOSTCC) || echo gcc)
+HOSTCC := gcc
+HOSTCC := $(shell which $(HOSTCC) || type -p $(HOSTCC) || echo gcc)

Makefile SHELL:=$(shell if [ -x "$$BASH" ]; then echo $$BASH; \ · line 227

Quoted 10 lines
Makefile +3 -3
 endif
 HOSTCC_NOCCACHE:=$(HOSTCC)
 ifndef HOSTCXX
-HOSTCXX:=g++
-HOSTCXX:=$(shell which $(HOSTCXX) || type -p $(HOSTCXX) || echo g++)
+HOSTCXX := g++
+HOSTCXX := $(shell which $(HOSTCXX) || type -p $(HOSTCXX) || echo g++)
 endif
-HOSTCXX_NOCCACHE:=$(HOSTCXX)
+HOSTCXX_NOCCACHE := $(HOSTCXX)

Here := is needed!

Makefile SHELL:=$(shell if [ -x "$$BASH" ]; then echo $$BASH; \ · line 229

Quoted 3 lines
Makefile +1 -1
 ifndef HOSTFC
-HOSTFC:=gfortran
+HOSTFC := gfortran

No :=

Makefile SHELL:=$(shell if [ -x "$$BASH" ]; then echo $$BASH; \ · line 232

Quoted 3 lines
Makefile +0 -0
 endif
 ifndef HOSTCPP
 HOSTCPP:=cpp

Idem.

Makefile SHELL:=$(shell if [ -x "$$BASH" ]; then echo $$BASH; \ · line 235

Quoted 4 lines
Makefile +1 -1
 endif
 ifndef HOSTLD
-HOSTLD:=ld
+HOSTLD := ld

Idem. Etc. etc.

Quoted 49 lines
Makefile +15 -15
 endif
 ifndef HOSTLN
-HOSTLN:=ln
+HOSTLN := ln
 endif
 ifndef HOSTNM
-HOSTNM:=nm
+HOSTNM := nm
 endif
 ifndef HOSTOBJCOPY
-HOSTOBJCOPY:=objcopy
+HOSTOBJCOPY := objcopy
 endif
 ifndef HOSTRANLIB
-HOSTRANLIB:=ranlib
-endif
-HOSTAR:=$(shell which $(HOSTAR) || type -p $(HOSTAR) || echo ar)
-HOSTAS:=$(shell which $(HOSTAS) || type -p $(HOSTAS) || echo as)
-HOSTFC:=$(shell which $(HOSTLD) || type -p $(HOSTLD) || echo || which g77 || type -p g77 || echo gfortran)
-HOSTCPP:=$(shell which $(HOSTCPP) || type -p $(HOSTCPP) || echo cpp)
-HOSTLD:=$(shell which $(HOSTLD) || type -p $(HOSTLD) || echo ld)
-HOSTLN:=$(shell which $(HOSTLN) || type -p $(HOSTLN) || echo ln)
-HOSTNM:=$(shell which $(HOSTNM) || type -p $(HOSTNM) || echo nm)
-HOSTOBJCOPY:=$(shell which $(HOSTOBJCOPY) || type -p $(HOSTOBJCOPY) || echo objcopy)
-HOSTRANLIB:=$(shell which $(HOSTRANLIB) || type -p $(HOSTRANLIB) || echo ranlib)
+HOSTRANLIB := ranlib
+endif
+HOSTAR := $(shell which $(HOSTAR) || type -p $(HOSTAR) || echo ar)
+HOSTAS := $(shell which $(HOSTAS) || type -p $(HOSTAS) || echo as)
+HOSTFC := $(shell which $(HOSTLD) || type -p $(HOSTLD) || echo || which g77 || type -p g77 || echo gfortran)
+HOSTCPP := $(shell which $(HOSTCPP) || type -p $(HOSTCPP) || echo cpp)
+HOSTLD := $(shell which $(HOSTLD) || type -p $(HOSTLD) || echo ld)
+HOSTLN := $(shell which $(HOSTLN) || type -p $(HOSTLN) || echo ln)
+HOSTNM := $(shell which $(HOSTNM) || type -p $(HOSTNM) || echo nm)
+HOSTOBJCOPY := $(shell which $(HOSTOBJCOPY) || type -p $(HOSTOBJCOPY) || echo objcopy)
+HOSTRANLIB := $(shell which $(HOSTRANLIB) || type -p $(HOSTRANLIB) || echo ranlib)
 
 export HOSTAR HOSTAS HOSTCC HOSTCXX HOSTFC HOSTLD
 export HOSTCC_NOCCACHE HOSTCXX_NOCCACHE
@@ -291,7 +291,7 @@ unexport CONFIG_SITE
 unexport QMAKESPEC
 unexport TERMINFO
 
-GNU_HOST_NAME:=$(shell support/gnuconfig/config.guess)
+GNU_HOST_NAME := $(shell support/gnuconfig/config.guess)
 
 ################################################################################
 #

Makefile GNU_HOST_NAME:=$(shell support/gnuconfig/config.guess) · line 303

Quoted 5 lines
Makefile +1 -1
@@ -300,15 +300,15 @@ GNU_HOST_NAME:=$(shell support/gnuconfig/config.guess)
 #
 ################################################################################
 
-TARGETS:= toolchain
+TARGETS := toolchain

Since TARGETS is only updated with +=, no := is needed here either.

Makefile GNU_HOST_NAME:=$(shell support/gnuconfig/config.guess) · line 308

Quoted 6 lines
Makefile +1 -1
 # silent mode requested?
-QUIET:=$(if $(findstring s,$(MAKEFLAGS)),-q)
+QUIET := $(if $(findstring s,$(MAKEFLAGS)),-q)
 
 # Strip off the annoying quoting

This comment is redundant.

Makefile GNU_HOST_NAME:=$(shell support/gnuconfig/config.guess) · line 309

Quoted 2 lines
Makefile +1 -1
-ARCH:=$(call qstrip,$(BR2_ARCH))
+ARCH := $(call qstrip,$(BR2_ARCH))

No :=

Quoted 7 lines
Makefile +1 -1
-KERNEL_ARCH:=$(shell echo "$(ARCH)" | sed -e "s/-.*//" \
+KERNEL_ARCH := $(shell echo "$(ARCH)" | sed -e "s/-.*//" \
      -e s/i.86/i386/ -e s/sun4u/sparc64/ \
      -e s/arcle/arc/ \
      -e s/arceb/arc/ \

Makefile KERNEL_ARCH:=$(shell echo "$(ARCH)" | sed -e "s/-.*//" \ · line 325

Quoted 10 lines
Makefile +3 -4
@@ -320,28 +320,28 @@ KERNEL_ARCH:=$(shell echo "$(ARCH)" | sed -e "s/-.*//" \
      -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
      -e s/sh.*/sh/)
 
-ZCAT:=$(call qstrip,$(BR2_ZCAT))
-BZCAT:=$(call qstrip,$(BR2_BZCAT))
-XZCAT:=$(call qstrip,$(BR2_XZCAT))
-TAR_OPTIONS=$(call qstrip,$(BR2_TAR_OPTIONS)) -xf
+ZCAT := $(call qstrip,$(BR2_ZCAT))
+BZCAT := $(call qstrip,$(BR2_BZCAT))
+XZCAT := $(call qstrip,$(BR2_XZCAT))

Dito.

Makefile KERNEL_ARCH:=$(shell echo "$(ARCH)" | sed -e "s/-.*//" \ · line 329

Quoted 5 lines
Makefile +2 -1
+TAR_OPTIONS = $(call qstrip,$(BR2_TAR_OPTIONS)) -xf
 
 # packages compiled for the host go here
-HOST_DIR:=$(call qstrip,$(BR2_HOST_DIR))
+HOST_DIR := $(call qstrip,$(BR2_HOST_DIR))

Dito

Quoted 39 lines
Makefile +7 -7
 # locales to generate
-GENERATE_LOCALE=$(call qstrip,$(BR2_GENERATE_LOCALE))
+GENERATE_LOCALE = $(call qstrip,$(BR2_GENERATE_LOCALE))
 
-TARGET_SKELETON=$(TOPDIR)/system/skeleton
+TARGET_SKELETON = $(TOPDIR)/system/skeleton
 
 # Location of a file giving a big fat warning that output/target
 # should not be used as the root filesystem.
-TARGET_DIR_WARNING_FILE=$(TARGET_DIR)/THIS_IS_NOT_YOUR_ROOT_FILESYSTEM
+TARGET_DIR_WARNING_FILE = $(TARGET_DIR)/THIS_IS_NOT_YOUR_ROOT_FILESYSTEM
 
 ifeq ($(BR2_CCACHE),y)
-CCACHE:=$(HOST_DIR)/usr/bin/ccache
+CCACHE := $(HOST_DIR)/usr/bin/ccache
 BR_CACHE_DIR = $(call qstrip,$(BR2_CCACHE_DIR))
 export BR_CACHE_DIR
-HOSTCC  := $(CCACHE) $(HOSTCC)
+HOSTCC := $(CCACHE) $(HOSTCC)
 HOSTCXX := $(CCACHE) $(HOSTCXX)
 endif
 
@@ -394,23 +394,23 @@ include system/system.mk
 include $(BR2_EXTERNAL)/external.mk
 
 ifeq ($(BR2_ENABLE_LOCALE_PURGE),y)
-TARGETS+=target-purgelocales
+TARGETS += target-purgelocales
 endif
 
 ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
 ifneq ($(GENERATE_LOCALE),)
-TARGETS+=target-generatelocales
+TARGETS += target-generatelocales
 endif
 endif
 
 ifeq ($(BR2_ECLIPSE_REGISTER),y)

Makefile include system/system.mk · line 413

Quoted 10 lines
Makefile +3 -3
-TARGETS+=toolchain-eclipse-register
+TARGETS += toolchain-eclipse-register
 endif
 
 include fs/common.mk
 
-TARGETS_SOURCE:=$(patsubst %,%-source,$(TARGETS))
-TARGETS_DIRCLEAN:=$(patsubst %,%-dirclean,$(TARGETS))
+TARGETS_SOURCE := $(patsubst %,%-source,$(TARGETS))
+TARGETS_DIRCLEAN := $(patsubst %,%-dirclean,$(TARGETS))

No need for :=

Makefile HOST_DEPS = $(sort $(foreach dep,\ · line 434

Quoted 10 lines
Makefile +1 -1
 # host-* dependencies have to be handled specially, as those aren't
 # visible in Kconfig and hence not added to a variable like TARGETS.
@@ -430,7 +430,7 @@ HOST_DEPS = $(sort $(foreach dep,\
              $($(dep))))
 HOST_SOURCE += $(addsuffix -source,$(sort $(TARGETS_HOST_DEPS) $(HOST_DEPS)))
 
-TARGETS_LEGAL_INFO:=$(patsubst %,%-legal-info,\
+TARGETS_LEGAL_INFO := $(patsubst %,%-legal-info,\
              $(TARGETS) $(TARGETS_HOST_DEPS) $(HOST_DEPS))))

Dito.

Makefile $(STAGING_DIR): · line 486

Quoted 8 lines
Makefile +1 -1
 dirs: $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
@@ -483,7 +483,7 @@ $(STAGING_DIR):
      @ln -snf $(STAGING_DIR) $(BASE_DIR)/staging
 
 ifeq ($(BR2_ROOTFS_SKELETON_CUSTOM),y)
-TARGET_SKELETON=$(BR2_ROOTFS_SKELETON_CUSTOM_PATH)
+TARGET_SKELETON = $(BR2_ROOTFS_SKELETON_CUSTOM_PATH)

Missing qstrip.

Regards,
Arnout

Quoted 27 lines
Makefile +3 -3
 endif
 
 RSYNC_VCS_EXCLUSIONS = \
@@ -577,8 +577,8 @@ endif
              $(USER_HOOKS_EXTRA_ENV) $(s) $(TARGET_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
 
 ifeq ($(BR2_ENABLE_LOCALE_PURGE),y)
-LOCALE_WHITELIST=$(BUILD_DIR)/locales.nopurge
-LOCALE_NOPURGE=$(call qstrip,$(BR2_ENABLE_LOCALE_WHITELIST))
+LOCALE_WHITELIST = $(BUILD_DIR)/locales.nopurge
+LOCALE_NOPURGE = $(call qstrip,$(BR2_ENABLE_LOCALE_WHITELIST))
 
 target-purgelocales:
      rm -f $(LOCALE_WHITELIST)
@@ -682,7 +682,7 @@ endif # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
 # configuration
 # ---------------------------------------------------------------------------
 
-HOSTCFLAGS=$(CFLAGS_FOR_BUILD)
+HOSTCFLAGS = $(CFLAGS_FOR_BUILD)
 export HOSTCFLAGS
 
 $(BUILD_DIR)/buildroot-config/%onf:
@@ -911,7 +911,7 @@ endif
      @echo 'See docs/README, or generate the Buildroot manual for further details'
      @echo
 
Quoted 6 lines

Makefile endif · line 917

Quoted 6 lines
Makefile +1 -1
-release: OUT=buildroot-$(BR2_VERSION)
+release: OUT = buildroot-$(BR2_VERSION)
 
 # Create release tarballs. We need to fiddle a bit to add the generated
 # documentation to the git output

Hi Arnout,
thanks for reviewing.
I will work on your suggestions after this patch is merged because if possible i want to avoid the pain to rebase endless other patches over this one.

Hi Peter,
any chance for this patch to being merged?
it's already acked and it's one month old.

The rebased patch is:
http://patchwork.ozlabs.org/patch/337436/

Thanks and best regards

Signature · 1 line
Fabio Porcedda
#11 lore raw

PATCH 4/6 luajit: needs for 32bit archictectures a 32bit host gcc

In reply to Fabio Porcedda

For 32 bit archictectures the luajit package needs a host compiler able to generate 32 bit code using the "-m32" option so check if that option is supported.

Cc Yann E. MORIN <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Fran?ois Perrad <[email protected]>
---
 package/luajit/Config.in | 1 +
 1 file changed, 1 insertion(+)
package/luajit/Config.in +1 -0
index 9c4ecc3..dd93609 100644
@@ -4,6 +4,7 @@ config BR2_PACKAGE_LUAJIT
 	# Luajit is only available for some target architectures, and
 	# has some complexity wrt 32/64. See luajit.mk for details.
 	depends on BR2_i386 || (BR2_x86_64 && BR2_HOSTARCH='x86_64') || BR2_powerpc || BR2_arm || BR2_armeb
+	select BR2_HOSTARCH_NEEDS_IA32_COMPILER if !BR2_ARCH_IS_64
 	help
 	  LuaJIT implements the full set of language features defined
 	  by Lua 5.1. The virtual machine (VM) is API- and
Signature · 1 line
1.8.3.2
#12 lore raw

PATCH 4/6 luajit: needs for 32bit archictectures a 32bit host gcc

2014-03-11 13:17 GMT+01:00 Fabio Porcedda <[email protected]>:

Quoted 5 lines

For 32 bit archictectures the luajit package needs a host compiler able to generate 32 bit code using the "-m32" option so check if that option is supported.

Quoted 22 lines
Cc Yann E. MORIN <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Fran?ois Perrad <[email protected]>
---
 package/luajit/Config.in | 1 +
 1 file changed, 1 insertion(+)
package/luajit/Config.in +1 -1
index 9c4ecc3..dd93609 100644
@@ -4,6 +4,7 @@ config BR2_PACKAGE_LUAJIT
        # Luajit is only available for some target architectures, and
        # has some complexity wrt 32/64. See luajit.mk for details.
        depends on BR2_i386 || (BR2_x86_64 && BR2_HOSTARCH='x86_64') || BR2_powerpc || BR2_arm || BR2_armeb
+       select BR2_HOSTARCH_NEEDS_IA32_COMPILER if !BR2_ARCH_IS_64
        help
          LuaJIT implements the full set of language features defined
          by Lua 5.1. The virtual machine (VM) is API- and
--

1.8.3.2

#13 lore raw

PATCH 5/6 infra: add to luarocks support for top-level parallel make

In reply to Fabio Porcedda

The host-luarock dependency is not always satisfied for the extract phase because the %-extract target is not anymore in the dependency chain.
To be sure that the dependency is satfied add the dependency to the stamp file $(%_TARGET_EXTRACT) instead of the %-extract target.

---
 package/pkg-luarocks.mk | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
package/pkg-luarocks.mk +4 -4
index bdda022..7010381 100644
@@ -43,10 +43,6 @@ $(2)_SITE		?= $(call qstrip,$(BR2_LUAROCKS_MIRROR))
 # a target package, and can just add the required dependencies
 $(2)_DEPENDENCIES	+= host-luarocks luainterpreter
 
-# $(2)_DEPENDENCIES are handled for configure step (too late)
-# but host-luarocks is required to do the extract
-$(1)-extract: host-luarocks
-
 #
 # Extract step
 #
@@ -71,6 +67,10 @@ endif
 # make targets
 $(call inner-generic-package,$(1),$(2),$(3),$(4))
 
+# $(2)_DEPENDENCIES are handled for configure step (too late)
+# but host-luarocks is required to do the extract
+$$($(2)_TARGET_EXTRACT): | host-luarocks
+
 endef
 
 ################################################################################
Signature · 1 line
1.8.3.2
#14 lore raw

PATCH 5/6 infra: add to luarocks support for top-level parallel make

2014-03-11 13:17 GMT+01:00 Fabio Porcedda <[email protected]>:

Quoted 4 lines

The host-luarock dependency is not always satisfied for the extract phase because the %-extract target is not anymore in the dependency chain.
To be sure that the dependency is satfied add the dependency to the

typo: satisfied

Quoted 41 lines

stamp file $(%_TARGET_EXTRACT) instead of the %-extract target.

---
 package/pkg-luarocks.mk | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
package/pkg-luarocks.mk +4 -5
index bdda022..7010381 100644
@@ -43,10 +43,6 @@ $(2)_SITE            ?= $(call qstrip,$(BR2_LUAROCKS_MIRROR))
 # a target package, and can just add the required dependencies
 $(2)_DEPENDENCIES      += host-luarocks luainterpreter
 
-# $(2)_DEPENDENCIES are handled for configure step (too late)
-# but host-luarocks is required to do the extract
-$(1)-extract: host-luarocks
-
 #
 # Extract step
 #
@@ -71,6 +67,10 @@ endif
 # make targets
 $(call inner-generic-package,$(1),$(2),$(3),$(4))
 
+# $(2)_DEPENDENCIES are handled for configure step (too late)
+# but host-luarocks is required to do the extract
+$$($(2)_TARGET_EXTRACT): | host-luarocks
+
 endef
 
 ################################################################################
--

1.8.3.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#15 lore raw

PATCH 5/6 infra: add to luarocks support for top-level parallel make

Quoted 7 lines · Fran?ois Perrad

2014-03-11 13:17 GMT+01:00 Fabio Porcedda <[email protected]>:

Quoted 4 lines

The host-luarock dependency is not always satisfied for the extract phase because the %-extract target is not anymore in the dependency chain.
To be sure that the dependency is satfied add the dependency to the

typo: satisfied

I've corrected the type, thanks.

Regards

Signature · 1 line
Fabio Porcedda
#16 lore raw

PATCH 6/6 Makefile: do not add the toolchain target to the TARGETS variable

In reply to Fabio Porcedda

Do not add the toolchain target to the TARGETS variable because now the toolchain target is a dependency added automatically so it is not necessary to add it anymore.

---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
index 0420364..481f779 100644
@@ -300,7 +300,7 @@ GNU_HOST_NAME := $(shell support/gnuconfig/config.guess)
 #
 ################################################################################
 
-TARGETS := toolchain
+TARGETS :=
 
 # silent mode requested?
 QUIET := $(if $(findstring s,$(MAKEFLAGS)),-q)
Signature · 1 line
1.8.3.2
#17 lore raw

PATCH 6/6 Makefile: do not add the toolchain target to the TARGETS variable

Quoted 3 lines · Fabio Porcedda

Do not add the toolchain target to the TARGETS variable because now the toolchain target is a dependency added automatically so it is not necessary to add it anymore.

I disagree with this one. When you run make, you expect buildroot to
build the toolchain even if no target package is selected. One use case I can think of: when preparing an internal toolchain for use as an external toolchain in later builds.

Regards,
Arnout

Quoted 20 lines
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
index 0420364..481f779 100644
@@ -300,7 +300,7 @@ GNU_HOST_NAME := $(shell support/gnuconfig/config.guess)
 #
 ################################################################################
 
-TARGETS := toolchain
+TARGETS :=
 
 # silent mode requested?
 QUIET := $(if $(findstring s,$(MAKEFLAGS)),-q)
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#18 lore raw

PATCH 6/6 Makefile: do not add the toolchain target to the TARGETS variable

Quoted 9 lines · Arnout Vandecappelle
Quoted 3 lines · Fabio Porcedda

Do not add the toolchain target to the TARGETS variable because now the toolchain target is a dependency added automatically so it is not necessary to add it anymore.

I disagree with this one. When you run make, you expect buildroot to
build the toolchain even if no target package is selected. One use case I can think of: when preparing an internal toolchain for use as an external toolchain in later builds.

Take in account that the "toolchain" target is always built because is a dependency of the "busybox" package that is always build and cannot be disabled and
the "toolchain-buildroot" and "toolchain-external" are always enabled in the Config.in.

I was thinking that the "toolchain" target is a package that uses tha package infrastructure, what about using the Config.in:

toolchain/Config.in +4 -0
index 44f3ac6..94a0c7d 100644
@@ -1,5 +1,9 @@
 menu "Toolchain"
 
+config BR2_TOOLCHAIN
+       bool
+       default y
+
 # Should be selected for glibc or eglibc
 config BR2_TOOLCHAIN_USES_GLIBC
        bool
Makefile +1 -1
index 384693a..3df9144 100644
@@ -299,7 +299,7 @@ GNU_HOST_NAME:=$(shell support/gnuconfig/config.guess)
 #
 ################################################################################
 
-TARGETS:= toolchain
+TARGETS :=
 
 # silent mode requested?
 QUIET:=$(if $(findstring s,$(MAKEFLAGS)),-q)

I think this is more coherent to other always enabled packages like busybox and toolchain-*.

Best regards

Signature · 1 line
Fabio Porcedda
#19 lore raw

PATCH 6/6 Makefile: do not add the toolchain target to the TARGETS variable

Quoted 11 lines · Fabio Porcedda
Quoted 9 lines · Arnout Vandecappelle
Quoted 3 lines · Fabio Porcedda

Do not add the toolchain target to the TARGETS variable because now the toolchain target is a dependency added automatically so it is not necessary to add it anymore.

I disagree with this one. When you run make, you expect buildroot to
build the toolchain even if no target package is selected. One use case I can think of: when preparing an internal toolchain for use as an external toolchain in later builds.

Quoted 5 lines

Take in account that the "toolchain" target is always built because is a dependency of the "busybox" package that is always build and cannot be disabled and
the "toolchain-buildroot" and "toolchain-external" are always enabled in the Config.in.

busybox can be disabled (if you set the init system to "none").

toolchain, toolchain-buildroot and toolchain-external are not added to
TARGETS because BR2_PACKAGE_TOOLCHAIN... is not defined.

Quoted 9 lines

I was thinking that the "toolchain" target is a package that uses tha package infrastructure, what about using the Config.in:

toolchain/Config.in +0 -0
index 44f3ac6..94a0c7d 100644

toolchain/Config.in line 5

Quoted 5 lines
toolchain/Config.in +3 -0
@@ -1,5 +1,9 @@
 menu "Toolchain"
 
+config BR2_TOOLCHAIN
+       bool
+       default y

That would indeed be an option (it would have to be
BR2_PACKAGE_TOOLCHAIN, but that's a minor detail). I'm not sure, however, if this is better than TARGETS := toolchain in the Makefile.

Actually, I am in favour of adding blind options for everything that
uses the package infrastructure. That will allow us to do things like checking select/DEPENDENCIES consistency, and generally makes things more consistent.

Regards,
Arnout

Quoted 24 lines
toolchain/Config.in +1 -0
+
 # Should be selected for glibc or eglibc
 config BR2_TOOLCHAIN_USES_GLIBC
        bool
Makefile +1 -1
index 384693a..3df9144 100644
@@ -299,7 +299,7 @@ GNU_HOST_NAME:=$(shell support/gnuconfig/config.guess)
 #
 ################################################################################
 
-TARGETS:= toolchain
+TARGETS :=
 
 # silent mode requested?
 QUIET:=$(if $(findstring s,$(MAKEFLAGS)),-q)

I think this is more coherent to other always enabled packages like busybox and toolchain-*.

Best regards

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#20 lore raw

PATCH 6/6 Makefile: do not add the toolchain target to the TARGETS variable

Fabio, Arnout, All,

On 2014-03-19 12:46 +0100, Arnout Vandecappelle spake thusly:

Quoted 1 line · Fabio Porcedda

[--SNIP--]

Quoted 7 lines
Quoted 5 lines

Take in account that the "toolchain" target is always built because is a dependency of the "busybox" package that is always build and cannot be disabled and
the "toolchain-buildroot" and "toolchain-external" are always enabled in the Config.in.

busybox can be disabled (if you set the init system to "none").

Indeed, and I very often uses that when I want to just test a single package I'm adding.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#21 lore raw

PATCH 6/6 Makefile: do not add the toolchain target to the TARGETS variable

Quoted 11 lines · Yann E. MORIN

Fabio, Arnout, All,

On 2014-03-19 12:46 +0100, Arnout Vandecappelle spake thusly:

Quoted 1 line · Fabio Porcedda

[--SNIP--]

Quoted 6 lines
Quoted 5 lines

Take in account that the "toolchain" target is always built because is a dependency of the "busybox" package that is always build and cannot be disabled and
the "toolchain-buildroot" and "toolchain-external" are always enabled in the Config.in.

Quoted 4 lines
Quoted 1 line

busybox can be disabled (if you set the init system to "none").

Indeed, and I very often uses that when I want to just test a single package I'm adding.

Good idea, next time i will test a package i will do that.

Thanks

Signature · 1 line
Fabio Porcedda
#22 lore raw

PATCH 6/6 Makefile: do not add the toolchain target to the TARGETS variable

In reply to Arnout Vandecappelle
Quoted 12 lines · Arnout Vandecappelle
Quoted 11 lines · Fabio Porcedda
Quoted 9 lines · Arnout Vandecappelle
Quoted 3 lines · Fabio Porcedda

Do not add the toolchain target to the TARGETS variable because now the toolchain target is a dependency added automatically so it is not necessary to add it anymore.

I disagree with this one. When you run make, you expect buildroot to
build the toolchain even if no target package is selected. One use case I can think of: when preparing an internal toolchain for use as an external toolchain in later builds.

Quoted 7 lines
Quoted 5 lines

Take in account that the "toolchain" target is always built because is a dependency of the "busybox" package that is always build and cannot be disabled and
the "toolchain-buildroot" and "toolchain-external" are always enabled in the Config.in.

busybox can be disabled (if you set the init system to "none").

I didn't know that, great!

Quoted 2 lines

toolchain, toolchain-buildroot and toolchain-external are not added to
TARGETS because BR2_PACKAGE_TOOLCHAIN... is not defined.

They are added to targets, just use this command to check it:

$ make defconfig && make show-targets

toolchain-buildroot toolchain busybox target-generic-securetty target-generic-hostname target-generic-issue target-root-passwd target-generic-getty-busybox target-generic-do-remount-rw rootfs-tar

Quoted 11 lines
Quoted 11 lines

I was thinking that the "toolchain" target is a package that uses tha package infrastructure, what about using the Config.in:

toolchain/Config.in +0 -0
index 44f3ac6..94a0c7d 100644
@@ -1,5 +1,9 @@
 menu "Toolchain"
 
Quoted 7 lines

toolchain/Config.in line 5

Quoted 3 lines
toolchain/Config.in +3 -0
+config BR2_TOOLCHAIN
+       bool
+       default y

That would indeed be an option (it would have to be
BR2_PACKAGE_TOOLCHAIN, but that's a minor detail). I'm not sure, however, if this is better than TARGETS := toolchain in the Makefile.

I've not used the PACKAGE prefix because it's not used at all for the toolchain config options, like the BR2_TOOLCHAIN_BUILDROOT option.

Quoted 5 lines

Actually, I am in favour of adding blind options for everything that
uses the package infrastructure. That will allow us to do things like checking select/DEPENDENCIES consistency, and generally makes things more consistent.

In next revision of the patch i will send the proposed patch.

Thanks and regards

Signature · 1 line
Fabio Porcedda
#23 lore raw

PATCH 6/6 Makefile: do not add the toolchain target to the TARGETS variable

Quoted 1 line · Fabio Porcedda

On Wed, Mar 19, 2014 at 12:46 PM, Arnout Vandecappelle <[email protected]> wrote:

[snip]

Quoted 30 lines
Quoted 2 lines

toolchain, toolchain-buildroot and toolchain-external are not added to
TARGETS because BR2_PACKAGE_TOOLCHAIN... is not defined.

They are added to targets, just use this command to check it:

$ make defconfig && make show-targets

toolchain-buildroot toolchain busybox target-generic-securetty target-generic-hostname target-generic-issue target-root-passwd target-generic-getty-busybox target-generic-do-remount-rw rootfs-tar

Quoted 11 lines
Quoted 11 lines

I was thinking that the "toolchain" target is a package that uses tha package infrastructure, what about using the Config.in:

toolchain/Config.in +0 -0
index 44f3ac6..94a0c7d 100644
@@ -1,5 +1,9 @@
 menu "Toolchain"
 
Quoted 7 lines

toolchain/Config.in line 5

Quoted 3 lines
toolchain/Config.in +3 -0
+config BR2_TOOLCHAIN
+       bool
+       default y

That would indeed be an option (it would have to be
BR2_PACKAGE_TOOLCHAIN, but that's a minor detail). I'm not sure, however, if this is better than TARGETS := toolchain in the Makefile.

Quoted 2 lines

I've not used the PACKAGE prefix because it's not used at all for the toolchain config options, like the BR2_TOOLCHAIN_BUILDROOT option.

Yeah, I forgot about this condition in pkg-generic.mk:

else ifneq ($(filter toolchain/%,$(pkgdir)),)
$(2)_KCONFIG_VAR = BR2_$(2)

Quoted 8 lines
Quoted 6 lines

Actually, I am in favour of adding blind options for everything that
uses the package infrastructure. That will allow us to do things like checking select/DEPENDENCIES consistency, and generally makes things more consistent.

In next revision of the patch i will send the proposed patch.

Can you mention in the commit log this second advantage?

But first, Peter, (and other buildroot maintainers as well), do you
agree that it would be a good idea to have blind Kconfig symbols for everything that uses the package infrastructure?

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#24 lore raw

cover Miscellauneus patches

In reply to Fabio Porcedda
Quoted 23 lines · Fabio Porcedda

Some miscellaneus patches.

v2:
- Add three patches
- Remove the already merged patch

Best regards

Fabio Porcedda (6):
barebox: fix coding style
Remove "dirs" dependencies
Makefile: fix coding style
luajit: needs for 32bit archictectures a 32bit host gcc
infra: add to luarocks support for top-level parallel make
Makefile: do not add the toolchain target to the TARGETS variable

 Makefile                 | 190 +++++++++++++++++++++++------------------------
 boot/barebox/barebox.mk  |  32 ++++----
 package/luajit/Config.in |   1 +
 package/pkg-luarocks.mk  |   8 +-
 package/uclibc/uclibc.mk |   2 +-
 5 files changed, 120 insertions(+), 113 deletions(-)
Quoted 3 lines

--
1.8.3.2

I've forgotten to add the V2 subfix to the patchset.

Regards

Signature · 1 line
Fabio Porcedda