path: root/package/pkg-kconfig.mk
diff options
authorGravatar Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>2015-02-03 15:21:41 +0100
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-02-14 16:32:23 +0100
commit23fd6e0e6ac5520391fb2e8f6c1e92eca91d865e (patch)
treed30ebdf3fefabf704b1d8b12794eca6723c519b7 /package/pkg-kconfig.mk
parentb264b95cbcce4accfd3536d15e9902b948e5ccea (diff)
kconfig infra: support built-in config files
When the configuration file of a package is located inside of the package sources, a make dependency can only be expressed after the package has been extracted (and patched). Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: "Yann E. Morin" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/pkg-kconfig.mk')
1 files changed, 5 insertions, 1 deletions
diff --git a/package/pkg-kconfig.mk b/package/pkg-kconfig.mk
index ec58d69f55..ef724e595f 100644
--- a/package/pkg-kconfig.mk
+++ b/package/pkg-kconfig.mk
@@ -41,9 +41,13 @@ ifndef $(2)_KCONFIG_FILE
$$(error Internal error: no value specified for $(2)_KCONFIG_FILE)
+# The config file could be in-tree, so before depending on it the package should
+# be extracted (and patched) first
+$$($(2)_KCONFIG_FILE): | $(1)-patch
# The .config file is obtained by copying it from the specified source
# configuration file, after the package has been patched.
-$$($(2)_DIR)/.config: $$($(2)_KCONFIG_FILE) | $(1)-patch
+$$($(2)_DIR)/.config: $$($(2)_KCONFIG_FILE)
$$(INSTALL) -m 0644 $$($(2)_KCONFIG_FILE) $$($(2)_DIR)/.config
# In order to get a usable, consistent configuration, some fixup may be needed.