Commit 23fd6e0e authored by Thomas De Schampheleire's avatar Thomas De Schampheleire Committed by Thomas Petazzoni
Browse files

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: default avatarThomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: default avatar"Yann E. Morin" <yann.morin.1998@free.fr>
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
parent b264b95c
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -41,9 +41,13 @@ ifndef $(2)_KCONFIG_FILE
$$(error Internal error: no value specified for $(2)_KCONFIG_FILE)
endif

# 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.