1998-05-23 23:35:29 +00:00
|
|
|
#! /bin/sh
|
1997-09-22 22:49:02 +00:00
|
|
|
#
|
|
|
|
# GNUstep.sh.in
|
|
|
|
#
|
|
|
|
# Shell initialization for the GNUstep environment.
|
|
|
|
#
|
|
|
|
# Copyright (C) 1997 Free Software Foundation, Inc.
|
|
|
|
#
|
|
|
|
# Author: Scott Christley <scottc@net-community.com>
|
|
|
|
#
|
|
|
|
# This file is part of the GNUstep Makefile Package.
|
|
|
|
#
|
|
|
|
# This library is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public
|
|
|
|
# License along with this library; see the file COPYING.LIB.
|
|
|
|
# If not, write to the Free Software Foundation,
|
|
|
|
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
# Set the GNUstep system root and local root
|
|
|
|
#
|
1999-10-11 15:40:37 +00:00
|
|
|
GNUSTEP_ROOT=@GNUSTEP_ROOT@
|
1997-09-22 22:49:02 +00:00
|
|
|
GNUSTEP_SYSTEM_ROOT=@prefix@
|
1999-04-23 02:54:45 +00:00
|
|
|
if [ -z "$LIBRARY_COMBO" ]; then
|
|
|
|
LIBRARY_COMBO=@ac_cv_library_combo@
|
|
|
|
fi
|
1999-10-11 15:40:37 +00:00
|
|
|
export GNUSTEP_ROOT GNUSTEP_SYSTEM_ROOT LIBRARY_COMBO
|
1997-10-28 02:34:11 +00:00
|
|
|
|
1999-10-11 15:40:37 +00:00
|
|
|
GNUSTEP_LOCAL_ROOT=$GNUSTEP_ROOT/Local
|
|
|
|
GNUSTEP_NETWORK_ROOT=$GNUSTEP_ROOT/Network
|
1997-11-13 21:28:59 +00:00
|
|
|
GNUSTEP_USER_ROOT=~/GNUstep
|
1999-10-11 15:40:37 +00:00
|
|
|
export GNUSTEP_LOCAL_ROOT GNUSTEP_NETWORK_ROOT GNUSTEP_USER_ROOT
|
1997-09-22 22:49:02 +00:00
|
|
|
|
1998-09-03 14:35:49 +00:00
|
|
|
if [ -z "$GNUSTEP_BUILD_ROOT" ]; then
|
1999-11-11 12:15:05 +00:00
|
|
|
GNUSTEP_MAKEFILES=$GNUSTEP_SYSTEM_ROOT/Makefiles
|
1998-09-03 14:35:49 +00:00
|
|
|
else
|
1999-11-11 12:15:05 +00:00
|
|
|
GNUSTEP_MAKEFILES=$GNUSTEP_BUILD_ROOT/Makefiles
|
1998-09-03 14:35:49 +00:00
|
|
|
fi
|
1999-08-01 13:32:58 +00:00
|
|
|
export GNUSTEP_MAKEFILES
|
1998-09-03 14:35:49 +00:00
|
|
|
|
1997-09-22 22:49:02 +00:00
|
|
|
#
|
|
|
|
# Determine the host information
|
|
|
|
#
|
1999-09-09 02:56:20 +00:00
|
|
|
if [ -z "$GNUSTEP_HOST" ]; then
|
2000-03-20 18:46:29 +00:00
|
|
|
# Not all OSs (e.g. FreeBSD < 4.0) have pushd/popd
|
|
|
|
tmpdir=`pwd`; cd /tmp
|
2000-02-19 00:40:47 +00:00
|
|
|
GNUSTEP_HOST=`$GNUSTEP_MAKEFILES/config.guess`
|
|
|
|
GNUSTEP_HOST=`$GNUSTEP_MAKEFILES/config.sub $GNUSTEP_HOST`
|
2000-03-20 18:46:29 +00:00
|
|
|
cd $tmpdir
|
1999-09-09 02:56:20 +00:00
|
|
|
fi
|
1998-09-03 14:35:49 +00:00
|
|
|
GNUSTEP_HOST_CPU=`$GNUSTEP_MAKEFILES/cpu.sh $GNUSTEP_HOST`
|
|
|
|
GNUSTEP_HOST_VENDOR=`$GNUSTEP_MAKEFILES/vendor.sh $GNUSTEP_HOST`
|
|
|
|
GNUSTEP_HOST_OS=`$GNUSTEP_MAKEFILES/os.sh $GNUSTEP_HOST`
|
1997-09-22 22:49:02 +00:00
|
|
|
|
|
|
|
# Clean the host
|
1998-09-03 14:35:49 +00:00
|
|
|
GNUSTEP_HOST_CPU=`$GNUSTEP_MAKEFILES/clean_cpu.sh $GNUSTEP_HOST_CPU`
|
|
|
|
GNUSTEP_HOST_VENDOR=`$GNUSTEP_MAKEFILES/clean_vendor.sh $GNUSTEP_HOST_VENDOR`
|
|
|
|
GNUSTEP_HOST_OS=`$GNUSTEP_MAKEFILES/clean_os.sh $GNUSTEP_HOST_OS`
|
1997-09-22 22:49:02 +00:00
|
|
|
|
|
|
|
export GNUSTEP_HOST GNUSTEP_HOST_CPU GNUSTEP_HOST_VENDOR GNUSTEP_HOST_OS
|
|
|
|
|
1998-09-03 14:35:49 +00:00
|
|
|
#
|
|
|
|
# the rest of this file is only executed, if the core already is installed.
|
|
|
|
#
|
|
|
|
if [ -z "$GNUSTEP_BUILD_ROOT" ]; then
|
|
|
|
|
1997-09-22 22:49:02 +00:00
|
|
|
#
|
|
|
|
# Add the GNUstep tools directories to the path
|
|
|
|
#
|
1999-06-02 03:16:12 +00:00
|
|
|
if [ -z "$GNUSTEP_PATHPREFIX_LIST" ]; then
|
2000-08-02 18:54:50 +00:00
|
|
|
GNUSTEP_PATHPREFIX_LIST=$GNUSTEP_USER_ROOT:$GNUSTEP_LOCAL_ROOT:$GNUSTEP_NETWORK_ROOT:$GNUSTEP_SYSTEM_ROOT
|
1999-06-02 03:16:12 +00:00
|
|
|
export GNUSTEP_PATHPREFIX_LIST
|
2000-06-13 15:14:23 +00:00
|
|
|
fi
|
1999-07-26 20:35:09 +00:00
|
|
|
tmp_IFS="$IFS"
|
1999-06-02 03:16:12 +00:00
|
|
|
IFS=:
|
1999-06-04 04:26:07 +00:00
|
|
|
temp_path=
|
1999-06-02 03:16:12 +00:00
|
|
|
for dir in $GNUSTEP_PATHPREFIX_LIST; do
|
2000-06-30 22:29:10 +00:00
|
|
|
temp_path=$temp_path$dir/Tools/${GNUSTEP_HOST_CPU}/${GNUSTEP_HOST_OS}/${LIBRARY_COMBO}:
|
1999-06-28 13:31:25 +00:00
|
|
|
temp_path=$temp_path$dir/Tools/${GNUSTEP_HOST_CPU}/${GNUSTEP_HOST_OS}:
|
2000-06-30 22:29:10 +00:00
|
|
|
temp_path=$temp_path$dir/Tools:
|
1999-06-02 03:16:12 +00:00
|
|
|
done
|
1999-07-26 20:35:09 +00:00
|
|
|
IFS="$tmp_IFS"
|
2000-06-13 15:14:23 +00:00
|
|
|
PATH=${temp_path}${PATH}
|
|
|
|
export PATH
|
1999-07-15 15:31:42 +00:00
|
|
|
|
1998-09-03 14:35:49 +00:00
|
|
|
. $GNUSTEP_MAKEFILES/ld_lib_path.sh
|
1997-09-22 22:49:02 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Perform any user initialization
|
|
|
|
#
|
1997-10-29 16:27:45 +00:00
|
|
|
if [ -f ~/.GNUstep/GNUstep.sh ]
|
1997-09-22 22:49:02 +00:00
|
|
|
then
|
1999-06-27 14:33:32 +00:00
|
|
|
. ~/.GNUstep/GNUstep.sh
|
1997-09-22 22:49:02 +00:00
|
|
|
fi
|
1998-09-03 14:35:49 +00:00
|
|
|
|
1999-01-07 18:26:43 +00:00
|
|
|
#
|
|
|
|
# Run 'make_services' in background if possible - updates cache of services
|
|
|
|
# and applications/file-extensions known to the applications.
|
|
|
|
#
|
2000-06-13 15:14:23 +00:00
|
|
|
TDIR=$GNUSTEP_SYSTEM_ROOT/Tools/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS
|
|
|
|
if [ -f $TDIR/$LIBRARY_COMBO/make_services ]
|
1999-06-27 14:35:36 +00:00
|
|
|
then
|
2000-06-13 15:14:23 +00:00
|
|
|
$TDIR/$LIBRARY_COMBO/make_services &
|
|
|
|
else
|
|
|
|
if [ -f $TDIR/make_services ]
|
|
|
|
then
|
|
|
|
$TDIR/make_services &
|
|
|
|
fi
|
1999-06-27 14:33:32 +00:00
|
|
|
fi
|
1999-01-07 18:26:43 +00:00
|
|
|
|
1998-09-03 14:35:49 +00:00
|
|
|
fi # [ -z "$GNUSTEP_BUILD_ROOT" ]
|
1999-11-04 08:19:28 +00:00
|
|
|
|
2000-08-02 18:54:50 +00:00
|
|
|
gnustep_class_path="$GNUSTEP_USER_ROOT/Libraries/Java:$GNUSTEP_LOCAL_ROOT/Libraries/Java:$GNUSTEP_NETWORK_ROOT/Libraries/Java:$GNUSTEP_SYSTEM_ROOT/Libraries/Java"
|
1999-11-04 08:19:28 +00:00
|
|
|
|
|
|
|
if [ -z "$CLASSPATH" ]; then
|
2000-06-21 11:24:11 +00:00
|
|
|
CLASSPATH="$gnustep_class_path"
|
1999-11-04 08:19:28 +00:00
|
|
|
else
|
2000-06-21 11:24:11 +00:00
|
|
|
if ( echo ${CLASSPATH}|fgrep -v "${gnustep_class_path}" >/dev/null ); then
|
|
|
|
CLASSPATH="$CLASSPATH:$gnustep_class_path"
|
|
|
|
fi
|
2000-06-13 15:14:23 +00:00
|
|
|
fi
|
1999-11-04 08:19:28 +00:00
|
|
|
|
1999-11-12 07:35:51 +00:00
|
|
|
export CLASSPATH
|
|
|
|
|