mirror of
https://github.com/gnustep/tools-make.git
synced 2025-04-23 22:33:28 +00:00
Update for new config file
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@22053 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
13b221dbff
commit
b94811c970
3 changed files with 39 additions and 48 deletions
|
@ -1,3 +1,10 @@
|
|||
2005-11-21 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
opentool.in:
|
||||
openapp.in:
|
||||
Changed to use new GNUstep.conf configuration file to obtain the
|
||||
directories to search.
|
||||
|
||||
2005-10-28 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* configure.ac: Set up a sensible default location for GNUstep.conf
|
||||
|
|
15
openapp.in
15
openapp.in
|
@ -32,6 +32,9 @@ if [ -z "$1" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
. @GNUSTEP_CONFIG_FILE@
|
||||
. $GNUSTEP_SYSTEM_ROOT/Library/Makefiles/GNUstep.sh
|
||||
|
||||
if [ -z "$GNUSTEP_FLATTENED" ]; then
|
||||
GNUSTEP_FLATTENED=@GNUSTEP_FLATTENED@
|
||||
fi
|
||||
|
@ -82,8 +85,6 @@ case "$app" in
|
|||
*) app_list="$app.app:$app.debug:$app.profile"; appname="$app";
|
||||
esac
|
||||
|
||||
old_IFS="$IFS"
|
||||
IFS=:
|
||||
case "$app" in
|
||||
/*) # An absolute path.
|
||||
for appdir in $app_list; do
|
||||
|
@ -102,14 +103,7 @@ case "$app" in
|
|||
fi
|
||||
done;;
|
||||
*) # A path that should be searched into the GNUstep paths
|
||||
if [ -n "$GNUSTEP_PATHLIST" ]; then
|
||||
SPATH="$GNUSTEP_PATHLIST"
|
||||
else
|
||||
SPATH="$PATH"
|
||||
fi
|
||||
SPATH=".:$SPATH"
|
||||
|
||||
for dir in $SPATH; do
|
||||
for dir in "$GNUSTEP_USER_ROOT" "$GNUSTEP_LOCAL_ROOT" "$GNUSTEP_NETWORK_ROOT" "$GNUSTEP_SYSTEM_ROOT"; do
|
||||
for appdir in $app_list; do
|
||||
# First, search in $dir/Applications/any_path_here/$appdir
|
||||
#echo "$dir/Applications/"'*'"/$appdir"
|
||||
|
@ -139,7 +133,6 @@ case "$app" in
|
|||
done
|
||||
done;;
|
||||
esac
|
||||
IFS="$old_IFS"
|
||||
unset app_list
|
||||
unset appdir
|
||||
|
||||
|
|
65
opentool.in
65
opentool.in
|
@ -25,18 +25,15 @@
|
|||
# is not specified. The arguments passed after the tool name are passed
|
||||
# unmodified to the tool.
|
||||
|
||||
if [ -z "$GNUSTEP_PATHLIST" ]; then
|
||||
echo "The GNUSTEP_PATHLIST environment variable is missing."
|
||||
echo "Did you forget to set up your environment using GNUstep.sh ?"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo usage: `basename "$0"` [--library-combo=...] tool [arguments...]
|
||||
echo `basename "$0"` --help for help
|
||||
exit 1
|
||||
fi
|
||||
|
||||
. @GNUSTEP_CONFIG_FILE@
|
||||
. $GNUSTEP_SYSTEM_ROOT/Library/Makefiles/GNUstep.sh
|
||||
|
||||
if [ -z "$EXEEXT" ]; then
|
||||
EXEEXT=@EXEEXT@
|
||||
fi
|
||||
|
@ -112,8 +109,7 @@ case "$tool" in
|
|||
if [ -z "$full_toolname" ]; then
|
||||
|
||||
# Local tool not found - Search for an installed one
|
||||
# we search in GNUSTEP_PATHLIST, which means we
|
||||
# search in the order in:
|
||||
# we search in the order in:
|
||||
# GNUSTEP_USER_ROOT
|
||||
# GNUSTEP_LOCAL_ROOT
|
||||
# GNUSTEP_NETWORK_ROOT
|
||||
|
@ -124,39 +120,34 @@ case "$tool" in
|
|||
# subdirectory, then the top-level directory.
|
||||
# (For flattened systems we skip the first two options.
|
||||
#
|
||||
if [ -n "$GNUSTEP_PATHLIST" ]; then
|
||||
SPATH="$GNUSTEP_PATHLIST"
|
||||
IFS=:
|
||||
for dir in $SPATH; do
|
||||
tmpdir="$dir/Tools"
|
||||
if [ -z "$GNUSTEP_FLATTENED" ]; then
|
||||
tmpgnudir="$dir/Tools/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS"
|
||||
tmplibdir="$tmpgnudir/$LIBRARY_COMBO"
|
||||
# echo "$tmplibdir/$tool";
|
||||
if [ -x "$tmplibdir/$tool" ]; then
|
||||
# echo "Found: $tmplibdir/$tool";
|
||||
full_toolname="$tmplibdir/$tool"
|
||||
break;
|
||||
fi
|
||||
if [ -x "$tmpgnudir/$tool" ]; then
|
||||
# echo "Found: $tmpgnudir/$tool";
|
||||
full_toolname="$tmpgnudir/$tool"
|
||||
break;
|
||||
fi
|
||||
fi
|
||||
# echo "$tmpdir/$tool";
|
||||
if [ -x "$tmpdir/$tool" ]; then
|
||||
# echo "Found: $tmpdir/$tool";
|
||||
full_toolname="$tmpdir/$tool"
|
||||
for dir in "$GNUSTEP_USER_ROOT" "$GNUSTEP_LOCAL_ROOT" "$GNUSTEP_NETWORK_ROOT" "$GNUSTEP_SYSTEM_ROOT" ; do
|
||||
tmpdir="$dir/Tools"
|
||||
if [ -z "$GNUSTEP_FLATTENED" ]; then
|
||||
tmpgnudir="$dir/Tools/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS"
|
||||
tmplibdir="$tmpgnudir/$LIBRARY_COMBO"
|
||||
# echo "$tmplibdir/$tool";
|
||||
if [ -x "$tmplibdir/$tool" ]; then
|
||||
# echo "Found: $tmplibdir/$tool";
|
||||
full_toolname="$tmplibdir/$tool"
|
||||
break;
|
||||
fi
|
||||
if [ -x "$tmpgnudir/$tool" ]; then
|
||||
# echo "Found: $tmpgnudir/$tool";
|
||||
full_toolname="$tmpgnudir/$tool"
|
||||
break;
|
||||
fi
|
||||
fi
|
||||
# echo "$tmpdir/$tool";
|
||||
if [ -x "$tmpdir/$tool" ]; then
|
||||
# echo "Found: $tmpdir/$tool";
|
||||
full_toolname="$tmpdir/$tool"
|
||||
break;
|
||||
fi
|
||||
done
|
||||
unset tmpdir
|
||||
unset tmpgnudir
|
||||
unset tmplibdir
|
||||
IFS=" "
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -165,5 +156,5 @@ if [ -z "$full_toolname" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
IFS=" "
|
||||
exec "$full_toolname" "$@"
|
||||
"$full_toolname" "$@"
|
||||
|
||||
|
|
Loading…
Reference in a new issue