2002-01-11 12:33:07 +00:00
#! /bin/echo This file must be sourced inside csh using: source
1998-04-06 03:01:59 +00:00
#
2002-05-02 15:07:49 +00:00
# @configure_input@
1998-04-06 03:01:59 +00:00
#
# Shell initialization for the GNUstep environment.
#
2002-02-24 15:45:14 +00:00
# Copyright (C) 1998-2002 Free Software Foundation, Inc.
1998-04-06 03:01:59 +00:00
#
# Author: Scott Christley <scottc@net-community.com>
2002-02-24 15:45:14 +00:00
# Author: Adam Fedor <fedor@gnu.org>
# Author: Richard Frith-Macdonald <rfm@gnu.org>
# Author: Nicola Pero <n.pero@mi.flashnet.it>
1998-04-06 03:01:59 +00:00
#
# 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
#
2001-01-30 18:29:36 +00:00
setenv GNUSTEP_ROOT @GNUSTEP_ROOT@
setenv GNUSTEP_SYSTEM_ROOT @prefix@
2000-12-05 16:11:55 +00:00
setenv GNUSTEP_FLATTENED @GNUSTEP_FLATTENED@
1999-04-23 02:54:45 +00:00
if ( ! ${ ?LIBRARY_COMBO } ) then
setenv LIBRARY_COMBO @ac_cv_library_combo@
endif
1998-04-06 03:01:59 +00:00
2001-02-19 15:28:19 +00:00
setenv GNUSTEP_LOCAL_ROOT @GNUSTEP_LOCAL_ROOT@
setenv GNUSTEP_NETWORK_ROOT @GNUSTEP_NETWORK_ROOT@
1998-04-06 03:01:59 +00:00
2001-03-14 18:57:02 +00:00
setenv GNUSTEP_MAKEFILES ${ GNUSTEP_SYSTEM_ROOT } /Makefiles
1998-09-03 14:35:49 +00:00
1998-04-06 03:01:59 +00:00
#
# Determine the host information
#
1999-09-09 02:56:20 +00:00
if ( ! ${ ?GNUSTEP_HOST } ) then
2000-02-19 00:40:47 +00:00
pushd /tmp > /dev/null
2000-02-21 22:01:08 +00:00
setenv GNUSTEP_HOST ` ${ GNUSTEP_MAKEFILES } /config.guess`
setenv GNUSTEP_HOST ` ${ GNUSTEP_MAKEFILES } /config.sub ${ GNUSTEP_HOST } `
2000-02-19 00:40:47 +00:00
popd > /dev/null
1999-09-09 02:56:20 +00:00
endif
1998-04-06 03:01:59 +00:00
2001-03-15 01:03:24 +00:00
if ( ! ${ ?GNUSTEP_HOST_CPU } ) then
setenv GNUSTEP_HOST_CPU ` ${ GNUSTEP_MAKEFILES } /cpu.sh ${ GNUSTEP_HOST } `
setenv GNUSTEP_HOST_CPU ` ${ GNUSTEP_MAKEFILES } /clean_cpu.sh ${ GNUSTEP_HOST_CPU } `
endif
if ( ! ${ ?GNUSTEP_HOST_VENDOR } ) then
setenv GNUSTEP_HOST_VENDOR ` ${ GNUSTEP_MAKEFILES } /vendor.sh ${ GNUSTEP_HOST } `
setenv GNUSTEP_HOST_VENDOR ` ${ GNUSTEP_MAKEFILES } /clean_vendor.sh ${ GNUSTEP_HOST_VENDOR } `
endif
if ( ! ${ ?GNUSTEP_HOST_OS } ) then
setenv GNUSTEP_HOST_OS ` ${ GNUSTEP_MAKEFILES } /os.sh ${ GNUSTEP_HOST } `
setenv GNUSTEP_HOST_OS ` ${ GNUSTEP_MAKEFILES } /clean_os.sh ${ GNUSTEP_HOST_OS } `
endif
1998-04-06 03:01:59 +00:00
2002-03-05 16:43:24 +00:00
if ( "${GNUSTEP_FLATTENED}" == "" ) then
setenv GNUSTEP_USER_ROOT ` ${ GNUSTEP_MAKEFILES } /${ GNUSTEP_HOST_CPU } /${ GNUSTEP_HOST_OS } /user_home user`
else
setenv GNUSTEP_USER_ROOT ` ${ GNUSTEP_MAKEFILES } /user_home user`
endif
2002-03-01 12:26:54 +00:00
1998-04-06 03:01:59 +00:00
#
# Add the GNUstep tools directories to the path
#
2002-06-19 03:46:08 +00:00
if ( ! ${ ?GNUSTEP_PATHLIST } ) then
setenv GNUSTEP_PATHLIST \
2000-08-07 22:06:04 +00:00
${ GNUSTEP_USER_ROOT } :${ GNUSTEP_LOCAL_ROOT } :${ GNUSTEP_NETWORK_ROOT } :${ GNUSTEP_SYSTEM_ROOT }
2000-06-13 15:14:23 +00:00
endif
1999-09-20 08:20:57 +00:00
2002-01-11 12:33:07 +00:00
set temp_path = ""
2002-06-19 03:46:08 +00:00
foreach dir ( ` /bin/sh -c 'IFS=:; for i in ${GNUSTEP_PATHLIST}; do echo $i; done' ` )
2002-01-11 12:33:07 +00:00
set temp_path = ${ temp_path } ${ dir } /Tools:
if ( "${GNUSTEP_FLATTENED}" == "" ) then
set temp_path = ${ temp_path } ${ dir } /Tools/${ GNUSTEP_HOST_CPU } /${ GNUSTEP_HOST_OS } /${ LIBRARY_COMBO } :
set temp_path = ${ temp_path } ${ dir } /Tools/${ GNUSTEP_HOST_CPU } /${ GNUSTEP_HOST_OS } :
2000-12-05 16:11:55 +00:00
endif
1999-06-02 03:16:12 +00:00
end
2002-01-11 12:33:07 +00:00
if ( ! ${ ?PATH } ) then
setenv PATH "${temp_path}"
else if ( { ( echo "$PATH" | fgrep -v "$temp_path" >/dev/null) } ) then
setenv PATH "${temp_path}${PATH}"
endif
unset temp_path dir
source ${ GNUSTEP_MAKEFILES } /ld_lib_path.csh
1998-04-06 03:01:59 +00:00
2002-06-19 03:46:08 +00:00
# FIXME/TODO - use GNUSTEP_PATHLIST here
2001-05-05 10:44:11 +00:00
set gnustep_class_path = "${GNUSTEP_USER_ROOT}/Libraries/Java:${GNUSTEP_LOCAL_ROOT}/Libraries/Java:${GNUSTEP_NETWORK_ROOT}/Libraries/Java:${GNUSTEP_SYSTEM_ROOT}/Libraries/Java"
if ( ! ${ ?CLASSPATH } ) then
setenv CLASSPATH "${gnustep_class_path}"
2002-01-11 12:33:07 +00:00
else if ( { ( echo "${CLASSPATH}" | fgrep -v "${gnustep_class_path}" >/dev/null) } ) then
2001-05-05 10:44:11 +00:00
setenv CLASSPATH "${CLASSPATH}:${gnustep_class_path}"
endif
2002-01-11 12:33:07 +00:00
unset gnustep_class_path
2001-05-05 10:44:11 +00:00
1998-04-06 03:01:59 +00:00
#
# Perform any user initialization
#
2002-01-11 12:33:07 +00:00
if ( -e "$GNUSTEP_USER_ROOT/GNUstep.csh" ) then
2002-06-29 10:37:49 +00:00
source "$GNUSTEP_USER_ROOT/GNUstep.csh"
1998-04-06 03:01:59 +00:00
endif
1998-09-03 14:35:49 +00:00
2002-01-11 12:33:07 +00:00
#
# Run 'make_services' in background if possible - updates cache of services
# and applications/file-extensions known to the applications.
#
if ( "${GNUSTEP_FLATTENED}" == "" ) then
2000-12-05 16:11:55 +00:00
set TDIR = ${ GNUSTEP_SYSTEM_ROOT } /Tools/${ GNUSTEP_HOST_CPU } /${ GNUSTEP_HOST_OS }
2002-01-11 12:33:07 +00:00
if ( -x $TDIR /$LIBRARY_COMBO /make_services ) then
2002-02-24 15:32:00 +00:00
( $TDIR /$LIBRARY_COMBO /make_services &)
2002-01-11 12:33:07 +00:00
if ( -x $TDIR /make_services ) then
2002-02-24 15:32:00 +00:00
( $TDIR /make_services &)
2000-12-05 16:11:55 +00:00
endif
endif
else
set TDIR = ${ GNUSTEP_SYSTEM_ROOT } /Tools
2002-01-11 12:33:07 +00:00
if ( -x $TDIR /make_services ) then
2002-02-24 15:32:00 +00:00
( $TDIR /make_services &)
2000-06-13 15:14:23 +00:00
endif
1999-06-27 14:33:32 +00:00
endif
1999-01-07 18:26:43 +00:00
2002-01-11 12:33:07 +00:00
unset TDIR