mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-17 23:44:22 +00:00
CONFIGURE: add warning for building WIP/unstable engines
Also, If any unstable/wip engine is enabled, #define TAINTED_BUILD
This commit is contained in:
parent
d8d16e0231
commit
daf277f146
84
configure
vendored
84
configure
vendored
@ -65,8 +65,12 @@ get_var() {
|
||||
# Add an engine: id name build subengines
|
||||
add_engine() {
|
||||
_engines="${_engines} ${1}"
|
||||
if test "${3}" == "no" ; then
|
||||
set_var _wip_engines "${_wip_engines} ${1}"
|
||||
fi
|
||||
set_var _engine_${1}_name "${2}"
|
||||
set_var _engine_${1}_build "${3}"
|
||||
set_var _engine_${1}_build_default "${3}"
|
||||
set_var _engine_${1}_subengines "${4}"
|
||||
for sub in ${4}; do
|
||||
set_var _engine_${sub}_sub "yes"
|
||||
@ -176,6 +180,7 @@ _sdlpath="$PATH"
|
||||
_nasmpath="$PATH"
|
||||
NASMFLAGS=""
|
||||
NASM=""
|
||||
_tainted_build=no
|
||||
# The following variables are automatically detected, and should not
|
||||
# be modified otherwise. Consider them read-only.
|
||||
_posix=no
|
||||
@ -423,6 +428,11 @@ get_engine_build() {
|
||||
get_var _engine_$1_build
|
||||
}
|
||||
|
||||
# Was this engine set to be built by default?
|
||||
get_engine_build_default() {
|
||||
get_var _engine_$1_build_default
|
||||
}
|
||||
|
||||
# Get the subengines
|
||||
get_engine_subengines() {
|
||||
get_var _engine_$1_subengines
|
||||
@ -542,12 +552,19 @@ prepare_engine_build_strings() {
|
||||
if test -n "$string" ; then
|
||||
_engines_skipped="${_engines_skipped}#$string@"
|
||||
fi
|
||||
|
||||
string=`get_engine_build_string $1 wip`
|
||||
if test -n "$string" ; then
|
||||
_engines_built_wip="${_engines_built_wip}#$string@"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
# Get the string about building an engine
|
||||
get_engine_build_string() {
|
||||
engine_string=""
|
||||
engine_build=`get_engine_build $1`
|
||||
engine_build_default=`get_engine_build_default $1`
|
||||
show=no
|
||||
|
||||
# Check if the current engine should be shown for the current status
|
||||
@ -563,6 +580,14 @@ get_engine_build_string() {
|
||||
fi
|
||||
done
|
||||
fi
|
||||
# Test for enabled wip sub-engines
|
||||
if test $2 = wip ; then
|
||||
for subeng in `get_engine_subengines $1` ; do
|
||||
if test `get_engine_build $subeng` != no -a `get_engine_build_default $subeng` = no ; then
|
||||
show=yes
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
# Convert static/dynamic to yes to ease the check of subengines
|
||||
@ -570,13 +595,18 @@ get_engine_build_string() {
|
||||
engine_build=yes
|
||||
fi
|
||||
|
||||
# Check if it is a wip engine
|
||||
if test "$2" = "wip" -a "$engine_build" != "no" -a "$engine_build_default" = no; then
|
||||
show=yes
|
||||
fi
|
||||
|
||||
# The engine should be shown, build the string
|
||||
if test $show = yes ; then
|
||||
build_string_func=get_${1}_build_string
|
||||
if ( type $build_string_func | grep function ) 2> /dev/null > /dev/null ; then
|
||||
engine_string=`$build_string_func $1 $engine_build`
|
||||
engine_string=`$build_string_func $1 $engine_build $2`
|
||||
else
|
||||
engine_string=`get_subengines_build_string $1 $engine_build`
|
||||
engine_string=`get_subengines_build_string $1 $engine_build "" $2`
|
||||
fi
|
||||
|
||||
engine_string="`get_engine_name $1` $engine_string"
|
||||
@ -588,14 +618,29 @@ get_engine_build_string() {
|
||||
# Get the string about building subengines
|
||||
get_subengines_build_string() {
|
||||
all=yes
|
||||
parent_engine=$1
|
||||
subengine_string=$3
|
||||
for subeng in `get_engine_subengines $1` ; do
|
||||
if test `get_engine_build $subeng` = $2 ; then
|
||||
parent_status=$4
|
||||
parent_engine_build_default=`get_engine_build_default $parent_engine`
|
||||
|
||||
for subeng in `get_engine_subengines $parent_engine` ; do
|
||||
subengine_build=`get_engine_build $subeng`
|
||||
subengine_build_default=`get_engine_build_default $subeng`
|
||||
if test \( $subengine_build = $2 -a "$parent_status" != wip \) -o \( "$parent_status" = wip -a $subengine_build != no -a "$subengine_build_default" = no \) ; then
|
||||
subengine_string="$subengine_string [`get_engine_name $subeng`]"
|
||||
else
|
||||
all=no
|
||||
fi
|
||||
|
||||
# handle engines that are on by default and have a single subengine that is off by default
|
||||
if test "$parent_status" = wip ; then
|
||||
if test $parent_engine_build_default = yes -a subengine ; then
|
||||
all=no
|
||||
fi
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
if test $2 != no ; then
|
||||
if test -n "$subengine_string" ; then
|
||||
if test $all = yes ; then
|
||||
@ -610,19 +655,19 @@ get_subengines_build_string() {
|
||||
# Engine specific build strings
|
||||
get_scumm_build_string() {
|
||||
if test `get_engine_build $1` != no ; then
|
||||
if test $2 != no ; then
|
||||
if test $2 != no -a "$3" != wip ; then
|
||||
base="[v0-v6 games]"
|
||||
fi
|
||||
get_subengines_build_string $1 $2 "$base"
|
||||
get_subengines_build_string $1 $2 "$base" $3
|
||||
fi
|
||||
}
|
||||
|
||||
get_saga_build_string() {
|
||||
if test `get_engine_build $1` != no ; then
|
||||
if test $2 != no ; then
|
||||
if test $2 != no -a "$3" != wip; then
|
||||
base="[ITE]"
|
||||
fi
|
||||
get_subengines_build_string $1 $2 "$base"
|
||||
get_subengines_build_string $1 $2 "$base" $3
|
||||
fi
|
||||
}
|
||||
|
||||
@ -3258,6 +3303,23 @@ for engine in $_engines; do
|
||||
fi
|
||||
done
|
||||
|
||||
#
|
||||
# Detection of WIP/unstable engines
|
||||
#
|
||||
for engine in $_engines; do
|
||||
engine_build=`get_engine_build $engine`
|
||||
engine_build_default=`get_engine_build_default $engine`
|
||||
engine_wip=false
|
||||
if test $engine_build != no -a $engine_build_default = no ; then
|
||||
engine_wip=true
|
||||
set_var _tainted_build "yes"
|
||||
fi
|
||||
engine_wip_defname="ENGINE_WIP_`echo $engine | tr '[a-z]' '[A-Z]'`"
|
||||
add_line_to_config_h "#define $engine_wip_defname $engine_wip"
|
||||
done
|
||||
|
||||
add_to_config_h_if_yes `get_var _tainted_build` '#define TAINTED_BUILD'
|
||||
|
||||
#
|
||||
# Show which engines ("frontends") are to be built
|
||||
#
|
||||
@ -3283,6 +3345,12 @@ if test -n "$_engines_skipped" ; then
|
||||
s/#/ /g'
|
||||
fi
|
||||
|
||||
if test -n "$_engines_built_wip" ; then
|
||||
echo "WARNING: This ScummVM build contains the following UNSTABLE engines:"
|
||||
echo $_engines_built_wip | sed 's/@/\
|
||||
/g
|
||||
s/#/ /g'
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "Creating config.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user