infra/pkg-kconfig: incorporate oldconfig call to avoid endless rebuilds
authorThomas De Schampheleire <patrickdepinguin@gmail.com>
Tue, 5 Aug 2014 10:36:53 +0000 (12:36 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 6 Aug 2014 17:57:22 +0000 (19:57 +0200)
The configure step of the busybox package performs 'make oldconfig', which
causes the .config file to be updated. Thus, the .config file is more recent
than our stamp file .stamp_kconfig_fixup_done. On a subsequent build, our
dependency rules would kick in, and run the config fixup again, thus
kicking in the package's configure, build and install steps yet once
more, that, ad infinitum.

One solution is to modify kconfig-package to introduce an explicit touch of
the .kconfig_fixup_config_done stamp file, as post-configure hook.

Another solution, implemented by this patch, is to move the oldconfig call
from the package's .mk file to the kconfig-package infrastructure and make
sure it is done as part of the fixup commands. This way, the stamp file will
only be touched once, after the full fixup (including oldconfig) and no
endless rebuilds will occur.

Reported-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Suggested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/busybox/busybox.mk
package/pkg-kconfig.mk
package/uclibc/uclibc.mk

index db296364989f23513cb26ab08eda2e06f887c8ef..c74873210d91341daf2470e43a85ed328a19791c 100644 (file)
@@ -205,8 +205,6 @@ define BUSYBOX_KCONFIG_FIXUP_CMDS
 endef
 
 define BUSYBOX_CONFIGURE_CMDS
-       @yes "" | $(MAKE) ARCH=$(KERNEL_ARCH) CROSS_COMPILE="$(TARGET_CROSS)" \
-               -C $(@D) oldconfig
        $(BUSYBOX_NOCLOBBER_INSTALL)
 endef
 
index 8b777f1dc7a6480c97b0db6ab954681dc76a2e01..cd08c1ab98e4a4b789a73d54da557a4c41628e5c 100644 (file)
@@ -50,6 +50,8 @@ $$($(2)_DIR)/.config: $$($(2)_KCONFIG_FILE) | $(1)-patch
 # The exact rules are specified by the package .mk file.
 $$($(2)_DIR)/.stamp_kconfig_fixup_done: $$($(2)_DIR)/.config
        $$($(2)_KCONFIG_FIXUP_CMDS)
+       @yes "" | $$($(2)_MAKE_ENV) $$(MAKE) -C $$($(2)_DIR) \
+               $$($(2)_KCONFIG_OPT) oldconfig
        $$(Q)touch $$@
 
 # Before running configure, the configuration file should be present and fixed
index c7203ccb0f2dc6479a64c6fc86bd023d99312aed..c68dc5627d73ea43c92746a61e4e22b6e4d39e9b 100644 (file)
@@ -431,12 +431,6 @@ define UCLIBC_KCONFIG_FIXUP_CMDS
        $(UCLIBC_LOCALE_CONFIG)
        $(UCLIBC_WCHAR_CONFIG)
        $(UCLIBC_STRIP_CONFIG)
-       yes "" | $(MAKE1) -C $(@D) \
-               $(UCLIBC_MAKE_FLAGS) \
-               PREFIX=$(STAGING_DIR) \
-               DEVEL_PREFIX=/usr/ \
-               RUNTIME_PREFIX=$(STAGING_DIR) \
-               oldconfig
 endef
 
 define UCLIBC_CONFIGURE_CMDS