mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-04-15 15:06:36 +00:00
Add an ability to mark a configuration as invalid
... so that the build will fail early and predictably. Signed-off-by: Alexey Neyman <stilor@att.net>
This commit is contained in:
parent
cc3686ec2f
commit
31002a0c0a
@ -38,6 +38,9 @@ config CONFIG_VERSION
|
||||
default "0" if VCHECK = "load" || VCHECK = "save"
|
||||
default CONFIG_VERSION_CURRENT
|
||||
|
||||
config INVALID_CONFIGURATION
|
||||
bool
|
||||
|
||||
if VCHECK = "warning"
|
||||
comment "*************************************************************************"
|
||||
comment "Loaded configuration was generated by a previous version of crosstool-NG."
|
||||
|
@ -276,6 +276,25 @@ config @@fork|@@_VERY_OLD
|
||||
#!end-foreach
|
||||
|
||||
endchoice
|
||||
|
||||
# A flag indicating that no valid selections exist for the version.
|
||||
# This may happen if there are conflicting requirements set by
|
||||
# the host system and/or other packages.
|
||||
config @@fork|@@_NO_VERSIONS
|
||||
def_bool y
|
||||
select INVALID_CONFIGURATION
|
||||
depends on !@@fork|@@_VERY_NEW
|
||||
#!foreach version
|
||||
depends on !@@fork|@@_V_@@ver_sel|@@
|
||||
#!end-foreach
|
||||
depends on !@@fork|@@_VERY_OLD
|
||||
|
||||
if @@fork|@@_NO_VERSIONS
|
||||
comment "WARNING!"
|
||||
comment "| The @@master@@ package has no viable versions"
|
||||
comment "| due to conflicting constraints."
|
||||
endif
|
||||
|
||||
#!end-if
|
||||
|
||||
#!if [ -n "@@versionlocked@@" ]
|
||||
|
@ -32,6 +32,8 @@ if [ -z "${CT_ALLOW_BUILD_AS_ROOT_SURE}" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
CT_TestAndAbort "Invalid configuration. Run 'ct-ng menuconfig' and check which options select INVALID_CONFIGURATION." -n "${CT_INVALID_CONFIGURATION}"
|
||||
|
||||
# If we want an interactive debug-shell, we must ensure these FDs
|
||||
# are indeed connected to a terminal (and not redirected in any way).
|
||||
if [ "${CT_DEBUG_INTERACTIVE}" = "y" -a ! \( -t 0 -a -t 6 -a -t 2 \) ]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user