mirror of
https://github.com/libretro/libretro-super
synced 2024-11-28 11:14:11 +00:00
Fix libretro-build.sh to work with recent changes
This commit is contained in:
parent
fa4e6dc099
commit
e40e427f86
@ -243,9 +243,9 @@ build_makefile() {
|
|||||||
libretro_build_core() {
|
libretro_build_core() {
|
||||||
local opengl_type
|
local opengl_type
|
||||||
|
|
||||||
if [ -n "${LIBRETRO_LOG_CORE}" ]; then
|
if [ -n "${LIBRETRO_LOG_MODULE}" ]; then
|
||||||
printf -v log_core "$LIBRETRO_LOG_DIR/$LIBRETRO_LOG_CORE" "$1"
|
printf -v log_module "$LIBRETRO_LOG_DIR/$LIBRETRO_LOG_MODULE" "$1"
|
||||||
[ -z "$LIBRETRO_LOG_APPEND" ] && : > $log_core
|
[ -z "$LIBRETRO_LOG_APPEND" ] && : > $log_module
|
||||||
fi
|
fi
|
||||||
|
|
||||||
eval "core_name=\${libretro_${1}_name:-$1}"
|
eval "core_name=\${libretro_${1}_name:-$1}"
|
||||||
@ -278,27 +278,26 @@ libretro_build_core() {
|
|||||||
|
|
||||||
echo "Building ${1}..."
|
echo "Building ${1}..."
|
||||||
lecho "Building ${1}..."
|
lecho "Building ${1}..."
|
||||||
if [ -n "$log_core" ]; then
|
if [ -n "$log_module" ]; then
|
||||||
exec 6>&1
|
exec 6>&1
|
||||||
echo "Building ${1}..." >> $log_core
|
echo "Building ${1}..." >> $log_module
|
||||||
|
|
||||||
# TODO: Possibly a shell function for tee?
|
# TODO: Possibly a shell function for tee?
|
||||||
if [[ -n "$LIBRETRO_DEVELOPER" && -n "${cmd_tee:=$(find_tool "tee")}" ]]; then
|
if [[ -n "$LIBRETRO_DEVELOPER" && -n "${cmd_tee:=$(find_tool "tee")}" ]]; then
|
||||||
exec > >($cmd_tee -a $log_core)
|
exec > >($cmd_tee -a $log_module)
|
||||||
else
|
else
|
||||||
exec > $log_core
|
exec > $log_module
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "$core_build_rule" in
|
case "$core_build_rule" in
|
||||||
generic_makefile)
|
generic_makefile)
|
||||||
for a in configure preclean prebuild prepkg; do
|
# As of right now, only configure is used for now...
|
||||||
if [ "$(type -t libretro_${1}_build_$a 2> /dev/null)" = "function" ]; then
|
if [ "$(type -t libretro_${1}_configure 2> /dev/null)" = "function" ]; then
|
||||||
eval "core_build_$a=libretro_${1}_build_$a"
|
eval "core_configure=libretro_${1}_configure"
|
||||||
else
|
else
|
||||||
eval "core_build_$a="
|
eval "core_configure=do_nothing"
|
||||||
fi
|
fi
|
||||||
done
|
|
||||||
eval "core_build_makefile=\$libretro_${1}_build_makefile"
|
eval "core_build_makefile=\$libretro_${1}_build_makefile"
|
||||||
eval "core_build_subdir=\$libretro_${1}_build_subdir"
|
eval "core_build_subdir=\$libretro_${1}_build_subdir"
|
||||||
eval "core_build_args=\$libretro_${1}_build_args"
|
eval "core_build_args=\$libretro_${1}_build_args"
|
||||||
@ -327,7 +326,7 @@ libretro_build_core() {
|
|||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
if [ -n "$log_core" ]; then
|
if [ -n "$log_module" ]; then
|
||||||
exec 1>&6 6>&-
|
exec 1>&6 6>&-
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -365,33 +364,21 @@ summary() {
|
|||||||
local num_fail="$(numwords $build_fail)"
|
local num_fail="$(numwords $build_fail)"
|
||||||
local fmt_fail="${fmt_output:+$(echo " $build_fail" | $fmt_output)}"
|
local fmt_fail="${fmt_output:+$(echo " $build_fail" | $fmt_output)}"
|
||||||
|
|
||||||
for output in "" ${LIBRETRO_LOG_SUPER:+$log_super}; do
|
if [[ -z "$build_success" && -z "$build_fail" ]]; then
|
||||||
if [ -n "$output" ]; then
|
lsecho "No build actions performed."
|
||||||
exec 6>&1
|
return
|
||||||
exec >> $output
|
fi
|
||||||
use_color=""
|
|
||||||
fi
|
|
||||||
{
|
|
||||||
echo ""
|
|
||||||
if [[ -z "$build_success" && -z "$build_fail" ]]; then
|
|
||||||
echo "No build actions performed."
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$build_success" ]; then
|
if [ -n "$build_success" ]; then
|
||||||
echo "$(color 32)$num_success core(s)$(color) successfully processed:"
|
secho "$(color 32)$num_success core(s)$(color) successfully processed:"
|
||||||
echo "$fmt_success"
|
lecho "$num_success core(s) successfully processed:"
|
||||||
fi
|
lsecho "$fmt_success"
|
||||||
if [ -n "$build_fail" ]; then
|
fi
|
||||||
echo "$(color 31)$num_fail core(s)$(color) failed:"
|
if [ -n "$build_fail" ]; then
|
||||||
echo "$fmt_fail"
|
secho "$(color 31)$num_fail core(s)$(color) failed:"
|
||||||
fi
|
lecho "$num_fail core(s) failed:"
|
||||||
}
|
lsecho "$fmt_fail"
|
||||||
if [ -n "$output" ]; then
|
fi
|
||||||
exec 1>&6 6>&-
|
|
||||||
use_color="$want_color"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
}
|
||||||
|
|
||||||
create_dist_dir() {
|
create_dist_dir() {
|
||||||
@ -445,7 +432,6 @@ build_libretro_mame_prerule() {
|
|||||||
[ "$MAME_GIT_TINY" -eq 1 ] && mame_targets="mame mess"
|
[ "$MAME_GIT_TINY" -eq 1 ] && mame_targets="mame mess"
|
||||||
|
|
||||||
for target in $mame_targets; do
|
for target in $mame_targets; do
|
||||||
echo_cmd "$MAKE -f Makefile.libretro $extra_args platform=\"$FORMAT_COMPILER_TARGET\" \"-j$JOBS\" clean-osd" || die 'Failed to clean MAME OSD'
|
|
||||||
echo_cmd "$MAKE -f Makefile.libretro $extra_args \"TARGET=$target\" platform=\"$FORMAT_COMPILER_TARGET\" $MAME_COMPILER \"-j$JOBS\"" || die "Failed to build $target"
|
echo_cmd "$MAKE -f Makefile.libretro $extra_args \"TARGET=$target\" platform=\"$FORMAT_COMPILER_TARGET\" $MAME_COMPILER \"-j$JOBS\"" || die "Failed to build $target"
|
||||||
copy_core_to_dist "$target"
|
copy_core_to_dist "$target"
|
||||||
ret=$?
|
ret=$?
|
||||||
|
Loading…
Reference in New Issue
Block a user