* [Buildroot] [PATCH 1/2] package/pkg-kconfig: Support custom $(MAKE)
@ 2020-08-04 19:00 Brandon Maier
2020-08-04 19:00 ` [Buildroot] [PATCH 2/2] boot/uboot: Fix kconfig to use $(BR2_MAKE) Brandon Maier
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Brandon Maier @ 2020-08-04 19:00 UTC (permalink / raw)
To: buildroot
The U-Boot package requires GNU Make v4.0 or later, and so all U-Boot
"make" commands must use "$(BR2_MAKE)" so they use the host-make
package. Currently pkg-kconfig is hardcoded to uses $(MAKE), so add a
way to support $(BR2_MAKE). The package infra for pkg-automake and
pkg-cmake have a similar problem, and they solved it by defining a
$(PKG)_MAKE variable, and allowing each package to override it.
Signed-off-by: Brandon Maier <brandon.maier@rockwellcollins.com>
---
package/pkg-kconfig.mk | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/package/pkg-kconfig.mk b/package/pkg-kconfig.mk
index 9d65b21ec5..45faf50e71 100644
--- a/package/pkg-kconfig.mk
+++ b/package/pkg-kconfig.mk
@@ -33,7 +33,7 @@ PKG_KCONFIG_COMMON_OPTS = \
# Macro to save the defconfig file
# $(1): the name of the package in upper-case letters
define kconfig-package-savedefconfig
- $($(1)_MAKE_ENV) $(MAKE) -C $($(1)_DIR) \
+ $($(1)_MAKE_ENV) $($(1)_MAKE) -C $($(1)_DIR) \
$(PKG_KCONFIG_COMMON_OPTS) $($(1)_KCONFIG_OPTS) savedefconfig
endef
@@ -89,6 +89,7 @@ $(2)_DEPENDENCIES += $$($(2)_KCONFIG_DEPENDENCIES)
$(call inner-generic-package,$(1),$(2),$(3),$(4))
# Default values
+$(2)_MAKE ?= $$(MAKE)
$(2)_KCONFIG_EDITORS ?= menuconfig
$(2)_KCONFIG_OPTS ?=
$(2)_KCONFIG_FIXUP_CMDS ?=
@@ -122,7 +123,7 @@ $$($(2)_KCONFIG_FILE) $$($(2)_KCONFIG_FRAGMENT_FILES): | $(1)-patch
done
$(2)_KCONFIG_MAKE = \
- $$($(2)_MAKE_ENV) $$(MAKE) -C $$($(2)_DIR) \
+ $$($(2)_MAKE_ENV) $$($(2)_MAKE) -C $$($(2)_DIR) \
$$(PKG_KCONFIG_COMMON_OPTS) $$($(2)_KCONFIG_OPTS)
# $(2)_KCONFIG_MAKE may already rely on shell expansion. As the $() syntax
@@ -226,7 +227,7 @@ $(2)_CONFIGURATOR_MAKE_ENV = \
$$(addprefix $(1)-,$$($(2)_KCONFIG_EDITORS)): $(1)-%: $$($(2)_DIR)/.kconfig_editor_%
$$($(2)_DIR)/.kconfig_editor_%: PKG=$(2)
$$($(2)_DIR)/.kconfig_editor_%: $$($(2)_DIR)/.stamp_kconfig_fixup_done
- $$($(2)_CONFIGURATOR_MAKE_ENV) $$(MAKE) -C $$($(2)_DIR) \
+ $$($(2)_CONFIGURATOR_MAKE_ENV) $$($(2)_MAKE) -C $$($(2)_DIR) \
$$(PKG_KCONFIG_COMMON_OPTS) $$($(2)_KCONFIG_OPTS) $$(*)
rm -f $$($(2)_DIR)/.stamp_{kconfig_fixup_done,configured,built}
rm -f $$($(2)_DIR)/.stamp_{target,staging,images}_installed
--
2.28.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 2/2] boot/uboot: Fix kconfig to use $(BR2_MAKE)
2020-08-04 19:00 [Buildroot] [PATCH 1/2] package/pkg-kconfig: Support custom $(MAKE) Brandon Maier
@ 2020-08-04 19:00 ` Brandon Maier
2020-08-28 14:54 ` Peter Korsgaard
2020-08-06 20:42 ` [Buildroot] [PATCH 1/2] package/pkg-kconfig: Support custom $(MAKE) Yann E. MORIN
2020-08-28 14:54 ` Peter Korsgaard
2 siblings, 1 reply; 5+ messages in thread
From: Brandon Maier @ 2020-08-04 19:00 UTC (permalink / raw)
To: buildroot
U-Boot must use $(BR2_MAKE) as it uses a Make feature from v4.0. We
already use $(BR2_MAKE) in the BUILD_CMDS, but the kconfig commands
still uses $(MAKE). Without this fix, building U-Boot with kconfig will
fail with the following cryptic error.
> Makefile:37: *** missing separator. Stop.
Signed-off-by: Brandon Maier <brandon.maier@rockwellcollins.com>
---
boot/uboot/uboot.mk | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index 8a09969de1..1831466780 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -16,6 +16,7 @@ UBOOT_INSTALL_IMAGES = YES
# u-boot 2020.01+ needs make 4.0+
UBOOT_DEPENDENCIES = $(BR2_MAKE_HOST_DEPENDENCY)
+UBOOT_MAKE = $(BR2_MAKE)
ifeq ($(UBOOT_VERSION),custom)
# Handle custom U-Boot tarballs as specified by the configuration
@@ -257,7 +258,7 @@ UBOOT_POST_PATCH_HOOKS += UBOOT_FIXUP_LIBFDT_INCLUDE
ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY),y)
define UBOOT_CONFIGURE_CMDS
$(TARGET_CONFIGURE_OPTS) \
- $(BR2_MAKE) -C $(@D) $(UBOOT_MAKE_OPTS) \
+ $(UBOOT_MAKE) -C $(@D) $(UBOOT_MAKE_OPTS) \
$(UBOOT_BOARD_NAME)_config
endef
else ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG),y)
@@ -294,7 +295,7 @@ define UBOOT_BUILD_CMDS
cp -f $(UBOOT_CUSTOM_DTS_PATH) $(@D)/arch/$(UBOOT_ARCH)/dts/
)
$(TARGET_CONFIGURE_OPTS) \
- $(BR2_MAKE) -C $(@D) $(UBOOT_MAKE_OPTS) \
+ $(UBOOT_MAKE) -C $(@D) $(UBOOT_MAKE_OPTS) \
$(UBOOT_MAKE_TARGET)
$(if $(BR2_TARGET_UBOOT_FORMAT_SD),
$(@D)/tools/mxsboot sd $(@D)/u-boot.sb $(@D)/u-boot.sd)
--
2.28.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/2] package/pkg-kconfig: Support custom $(MAKE)
2020-08-04 19:00 [Buildroot] [PATCH 1/2] package/pkg-kconfig: Support custom $(MAKE) Brandon Maier
2020-08-04 19:00 ` [Buildroot] [PATCH 2/2] boot/uboot: Fix kconfig to use $(BR2_MAKE) Brandon Maier
@ 2020-08-06 20:42 ` Yann E. MORIN
2020-08-28 14:54 ` Peter Korsgaard
2 siblings, 0 replies; 5+ messages in thread
From: Yann E. MORIN @ 2020-08-06 20:42 UTC (permalink / raw)
To: buildroot
Brandon, All,
On 2020-08-04 14:00 -0500, Brandon Maier spake thusly:
> The U-Boot package requires GNU Make v4.0 or later, and so all U-Boot
> "make" commands must use "$(BR2_MAKE)" so they use the host-make
> package. Currently pkg-kconfig is hardcoded to uses $(MAKE), so add a
> way to support $(BR2_MAKE). The package infra for pkg-automake and
> pkg-cmake have a similar problem, and they solved it by defining a
> $(PKG)_MAKE variable, and allowing each package to override it.
>
> Signed-off-by: Brandon Maier <brandon.maier@rockwellcollins.com>
Both applied to master, thanks.
Regards,
Yann E. MORIN.
> ---
> package/pkg-kconfig.mk | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/package/pkg-kconfig.mk b/package/pkg-kconfig.mk
> index 9d65b21ec5..45faf50e71 100644
> --- a/package/pkg-kconfig.mk
> +++ b/package/pkg-kconfig.mk
> @@ -33,7 +33,7 @@ PKG_KCONFIG_COMMON_OPTS = \
> # Macro to save the defconfig file
> # $(1): the name of the package in upper-case letters
> define kconfig-package-savedefconfig
> - $($(1)_MAKE_ENV) $(MAKE) -C $($(1)_DIR) \
> + $($(1)_MAKE_ENV) $($(1)_MAKE) -C $($(1)_DIR) \
> $(PKG_KCONFIG_COMMON_OPTS) $($(1)_KCONFIG_OPTS) savedefconfig
> endef
>
> @@ -89,6 +89,7 @@ $(2)_DEPENDENCIES += $$($(2)_KCONFIG_DEPENDENCIES)
> $(call inner-generic-package,$(1),$(2),$(3),$(4))
>
> # Default values
> +$(2)_MAKE ?= $$(MAKE)
> $(2)_KCONFIG_EDITORS ?= menuconfig
> $(2)_KCONFIG_OPTS ?=
> $(2)_KCONFIG_FIXUP_CMDS ?=
> @@ -122,7 +123,7 @@ $$($(2)_KCONFIG_FILE) $$($(2)_KCONFIG_FRAGMENT_FILES): | $(1)-patch
> done
>
> $(2)_KCONFIG_MAKE = \
> - $$($(2)_MAKE_ENV) $$(MAKE) -C $$($(2)_DIR) \
> + $$($(2)_MAKE_ENV) $$($(2)_MAKE) -C $$($(2)_DIR) \
> $$(PKG_KCONFIG_COMMON_OPTS) $$($(2)_KCONFIG_OPTS)
>
> # $(2)_KCONFIG_MAKE may already rely on shell expansion. As the $() syntax
> @@ -226,7 +227,7 @@ $(2)_CONFIGURATOR_MAKE_ENV = \
> $$(addprefix $(1)-,$$($(2)_KCONFIG_EDITORS)): $(1)-%: $$($(2)_DIR)/.kconfig_editor_%
> $$($(2)_DIR)/.kconfig_editor_%: PKG=$(2)
> $$($(2)_DIR)/.kconfig_editor_%: $$($(2)_DIR)/.stamp_kconfig_fixup_done
> - $$($(2)_CONFIGURATOR_MAKE_ENV) $$(MAKE) -C $$($(2)_DIR) \
> + $$($(2)_CONFIGURATOR_MAKE_ENV) $$($(2)_MAKE) -C $$($(2)_DIR) \
> $$(PKG_KCONFIG_COMMON_OPTS) $$($(2)_KCONFIG_OPTS) $$(*)
> rm -f $$($(2)_DIR)/.stamp_{kconfig_fixup_done,configured,built}
> rm -f $$($(2)_DIR)/.stamp_{target,staging,images}_installed
> --
> 2.28.0
>
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/2] package/pkg-kconfig: Support custom $(MAKE)
2020-08-04 19:00 [Buildroot] [PATCH 1/2] package/pkg-kconfig: Support custom $(MAKE) Brandon Maier
2020-08-04 19:00 ` [Buildroot] [PATCH 2/2] boot/uboot: Fix kconfig to use $(BR2_MAKE) Brandon Maier
2020-08-06 20:42 ` [Buildroot] [PATCH 1/2] package/pkg-kconfig: Support custom $(MAKE) Yann E. MORIN
@ 2020-08-28 14:54 ` Peter Korsgaard
2 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2020-08-28 14:54 UTC (permalink / raw)
To: buildroot
>>>>> "Brandon" == Brandon Maier <brandon.maier@rockwellcollins.com> writes:
> The U-Boot package requires GNU Make v4.0 or later, and so all U-Boot
> "make" commands must use "$(BR2_MAKE)" so they use the host-make
> package. Currently pkg-kconfig is hardcoded to uses $(MAKE), so add a
> way to support $(BR2_MAKE). The package infra for pkg-automake and
> pkg-cmake have a similar problem, and they solved it by defining a
> $(PKG)_MAKE variable, and allowing each package to override it.
> Signed-off-by: Brandon Maier <brandon.maier@rockwellcollins.com>
Committed to 2020.02.x and 2020.05.x, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 2/2] boot/uboot: Fix kconfig to use $(BR2_MAKE)
2020-08-04 19:00 ` [Buildroot] [PATCH 2/2] boot/uboot: Fix kconfig to use $(BR2_MAKE) Brandon Maier
@ 2020-08-28 14:54 ` Peter Korsgaard
0 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2020-08-28 14:54 UTC (permalink / raw)
To: buildroot
>>>>> "Brandon" == Brandon Maier <brandon.maier@rockwellcollins.com> writes:
> U-Boot must use $(BR2_MAKE) as it uses a Make feature from v4.0. We
> already use $(BR2_MAKE) in the BUILD_CMDS, but the kconfig commands
> still uses $(MAKE). Without this fix, building U-Boot with kconfig will
> fail with the following cryptic error.
>> Makefile:37: *** missing separator. Stop.
> Signed-off-by: Brandon Maier <brandon.maier@rockwellcollins.com>
Committed to 2020.02.x and 2020.05.x, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-08-28 14:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-04 19:00 [Buildroot] [PATCH 1/2] package/pkg-kconfig: Support custom $(MAKE) Brandon Maier
2020-08-04 19:00 ` [Buildroot] [PATCH 2/2] boot/uboot: Fix kconfig to use $(BR2_MAKE) Brandon Maier
2020-08-28 14:54 ` Peter Korsgaard
2020-08-06 20:42 ` [Buildroot] [PATCH 1/2] package/pkg-kconfig: Support custom $(MAKE) Yann E. MORIN
2020-08-28 14:54 ` Peter Korsgaard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.