On Apple, look for the executable in the new location

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@18803 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2004-03-08 14:02:12 +00:00
parent ee70d63293
commit b7baafc270
2 changed files with 33 additions and 32 deletions

View file

@ -183,14 +183,17 @@ appname="$appname$EXEEXT"
. "$GNUSTEP_SYSTEM_ROOT/@MAKEFILES_SUFFIX@/ld_lib_path.sh"
if [ "$LIBRARY_COMBO" = nx-nx-nx -a "$GNUSTEP_HOST_OS" = nextstep4 ]; then
if [ ! -f "$full_appname/$appname" ]; then
if [ "$LIBRARY_COMBO" = "apple-apple-apple" ]; then
if [ ! -f "$full_appname/Contents/MacOS/$appname" ]; then
echo "$full_appname application does not have a binary for this kind of machine and operating system."
exit 1
fi
# Support for GDBbundle under OPENSTEP
"$GDB" -connect TextEdit $gdbargs "$full_appname/$appname" "$corearg"
if [ -z "$corearg" ]; then
"$GDB" "$full_appname/Contents/MacOS/$appname"
else
"$GDB" "$full_appname/Contents/MacOS/$appname" "$corearg"
fi
else
# Determine if the application has a binary for this operating system
@ -204,31 +207,25 @@ else
exit 1
fi
if [ -z "$GNUSTEP_FLATTENED" ]; then
file_appname="$full_appname/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS/$LIBRARY_COMBO/$appname"
else
file_appname="$full_appname/$appname"
fi
#Support for GDBbundle under OPENSTEP
if [ $GNUSTEP_HOST_OS = nextstep4 ]; then
"$GDB" -connect TextEdit "$file_appname" "$corearg"
if [ -z "$GNUSTEP_FLATTENED" ]; then
file_appname="$full_appname/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS/$LIBRARY_COMBO/$appname"
else
# Old versions of gdb don't support --args, so we only use it if
# 'gdb --help' lists it.
args=
if (gdb --help | grep -e --args > /dev/null); then
args="--args"
fi
if [ -z "$corearg" ]; then
# Arguments passed to debugapp are passed over to the
# application, in the same way as it happens for openapp.
"$GDB" $args "$file_appname" "$@"
else
"$GDB" "$file_appname" "$corearg"
fi
file_appname="$full_appname/$appname"
fi
# Old versions of gdb don't support --args, so we only use it if
# 'gdb --help' lists it.
args=
if (gdb --help | grep -e --args > /dev/null); then
args="--args"
fi
if [ -z "$corearg" ]; then
# Arguments passed to debugapp are passed over to the
# application, in the same way as it happens for openapp.
"$GDB" $args "$file_appname" "$@"
else
"$GDB" "$file_appname" "$corearg"
fi
fi

View file

@ -168,15 +168,19 @@ if [ -n "$GNUSTEP_FLATTENED" ]; then
fi
case "$LIBRARY_COMBO" in
apple-*) app_executable="$full_appname/Contents/MacOS/$appname";;
*) app_executable="$full_appname/$appname";;
esac
if [ ! -f "$full_appname/$appname" ]; then
echo "Could not find $full_appname/$appname executable/script"
if [ ! -f "$app_executable" ]; then
echo "Could not find $app_executable executable/script"
exit 1
fi
if [ -n "$only_find" ]; then
echo "$full_appname/$appname"
echo "$app_executable"
exit 0
fi
exec "$full_appname/$appname" "$@"
exec "$app_executable" "$@"