$(2)_KCONFIG_OPTS ?=
$(2)_KCONFIG_FIXUP_CMDS ?=
-# FOO_KCONFIG_FILE is required
-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
# already called above, so we can effectively use this variable.
ifeq ($$($$($(2)_KCONFIG_VAR)),y)
+# FOO_KCONFIG_FILE is required
+ifndef $(2)_KCONFIG_FILE
+$$(error Internal error: no value specified for $(2)_KCONFIG_FILE)
+endif
+
# Configuration editors (menuconfig, ...)
$$(addprefix $(1)-,$$($(2)_KCONFIG_EDITORS)): $$($(2)_DIR)/.stamp_kconfig_fixup_done
$$($(2)_MAKE_ENV) $$(MAKE) -C $$($(2)_DIR) \