]> err.no Git - sope/blob - gnustep-make/GNUstep.csh.in
fixed inline compilation
[sope] / gnustep-make / GNUstep.csh.in
1 #! /bin/echo This file must be sourced inside csh using: source
2 #
3 #   @configure_input@
4 #
5 #   Shell initialization for the GNUstep environment.
6 #
7 #   Copyright (C) 1998-2002 Free Software Foundation, Inc.
8 #
9 #   Author:  Scott Christley <scottc@net-community.com>
10 #   Author:  Adam Fedor <fedor@gnu.org>
11 #   Author:  Richard Frith-Macdonald <rfm@gnu.org>
12 #   Author:  Nicola Pero <n.pero@mi.flashnet.it>
13 #
14 #   This file is part of the GNUstep Makefile Package.
15 #
16 #   This library is free software; you can redistribute it and/or
17 #   modify it under the terms of the GNU General Public License
18 #   as published by the Free Software Foundation; either version 2
19 #   of the License, or (at your option) any later version.
20 #   
21 #   You should have received a copy of the GNU General Public
22 #   License along with this library; see the file COPYING.LIB.
23 #   If not, write to the Free Software Foundation,
24 #   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25 #
26
27 #
28 # Set the GNUstep system root and local root
29 #
30 setenv GNUSTEP_ROOT "@GNUSTEP_ROOT@"
31 setenv GNUSTEP_SYSTEM_ROOT "@prefix@"
32 setenv GNUSTEP_FLATTENED "@GNUSTEP_FLATTENED@"
33 if ( ! ${?LIBRARY_COMBO} ) then
34   setenv LIBRARY_COMBO "@ac_cv_library_combo@"
35 endif
36
37 setenv GNUSTEP_LOCAL_ROOT "@GNUSTEP_LOCAL_ROOT@"
38 setenv GNUSTEP_NETWORK_ROOT "@GNUSTEP_NETWORK_ROOT@"
39
40 setenv GNUSTEP_MAKEFILES "${GNUSTEP_SYSTEM_ROOT}/@MAKEFILES_SUFFIX@"
41
42 if ( "@GNUSTEP_MULTI_PLATFORM@" == "" ) then
43   setenv GNUSTEP_HOST "@target@"
44   setenv GNUSTEP_HOST_CPU "@clean_target_cpu@"
45   setenv GNUSTEP_HOST_VENDOR "@clean_target_vendor@"
46   setenv GNUSTEP_HOST_OS "@clean_target_os@"
47 endif
48
49 #
50 # Determine the host information
51 #
52 if ( ! ${?GNUSTEP_HOST} ) then
53   pushd /tmp > /dev/null
54   setenv GNUSTEP_HOST `${GNUSTEP_MAKEFILES}/config.guess`
55   setenv GNUSTEP_HOST `${GNUSTEP_MAKEFILES}/config.sub ${GNUSTEP_HOST}`
56   popd > /dev/null
57 endif
58
59 if ( ! ${?GNUSTEP_HOST_CPU} ) then
60   setenv GNUSTEP_HOST_CPU `${GNUSTEP_MAKEFILES}/cpu.sh ${GNUSTEP_HOST}`
61   setenv GNUSTEP_HOST_CPU `${GNUSTEP_MAKEFILES}/clean_cpu.sh ${GNUSTEP_HOST_CPU}`
62 endif
63
64 if ( ! ${?GNUSTEP_HOST_VENDOR} ) then
65   setenv GNUSTEP_HOST_VENDOR `${GNUSTEP_MAKEFILES}/vendor.sh ${GNUSTEP_HOST}`
66   setenv GNUSTEP_HOST_VENDOR `${GNUSTEP_MAKEFILES}/clean_vendor.sh ${GNUSTEP_HOST_VENDOR}`
67 endif
68
69 if ( ! ${?GNUSTEP_HOST_OS} ) then
70   setenv GNUSTEP_HOST_OS `${GNUSTEP_MAKEFILES}/os.sh ${GNUSTEP_HOST}`
71   setenv GNUSTEP_HOST_OS `${GNUSTEP_MAKEFILES}/clean_os.sh ${GNUSTEP_HOST_OS}`
72 endif
73
74 if ( "${GNUSTEP_FLATTENED}" == "" ) then
75   setenv GNUSTEP_USER_ROOT `${GNUSTEP_MAKEFILES}/${GNUSTEP_HOST_CPU}/${GNUSTEP_HOST_OS}/user_home user`
76 else
77   setenv GNUSTEP_USER_ROOT `${GNUSTEP_MAKEFILES}/user_home user`
78 endif
79
80 #
81 # Add the GNUstep tools directories to the path
82 #
83 if ( ! ${?GNUSTEP_PATHLIST} ) then
84   setenv GNUSTEP_PATHLIST \
85          "${GNUSTEP_USER_ROOT}:${GNUSTEP_LOCAL_ROOT}:${GNUSTEP_NETWORK_ROOT}:${GNUSTEP_SYSTEM_ROOT}"
86 endif
87
88 set temp_path = ""
89 foreach dir ( `/bin/sh -c 'IFS=:; for i in ${GNUSTEP_PATHLIST}; do echo $i; done'` )
90   set temp_path="${temp_path}${dir}/Tools:"
91   if ( "${GNUSTEP_FLATTENED}" == "" ) then
92     set temp_path="${temp_path}${dir}/Tools/${GNUSTEP_HOST_CPU}/${GNUSTEP_HOST_OS}/${LIBRARY_COMBO}:"
93     set temp_path="${temp_path}${dir}/Tools/${GNUSTEP_HOST_CPU}/${GNUSTEP_HOST_OS}:"
94   endif
95 end
96
97 if ( ! ${?PATH} ) then
98   setenv PATH "${temp_path}"
99 else if ( { (echo "$PATH" | fgrep -v "$temp_path" >/dev/null) } ) then
100   setenv PATH "${temp_path}${PATH}"
101 endif
102 unset temp_path dir
103
104 source "${GNUSTEP_MAKEFILES}/ld_lib_path.csh"
105
106 # FIXME/TODO - use GNUSTEP_PATHLIST here
107 set gnustep_class_path="${GNUSTEP_USER_ROOT}/Library/Libraries/Java:${GNUSTEP_LOCAL_ROOT}/Library/Libraries/Java:${GNUSTEP_NETWORK_ROOT}/Library/Libraries/Java:${GNUSTEP_SYSTEM_ROOT}/Library/Libraries/Java"
108
109 if ( ! ${?CLASSPATH} ) then
110   setenv CLASSPATH "${gnustep_class_path}"
111 else if ( { (echo "${CLASSPATH}" | fgrep -v "${gnustep_class_path}" >/dev/null) } ) then
112   setenv CLASSPATH "${CLASSPATH}:${gnustep_class_path}"
113 endif
114
115 unset gnustep_class_path
116
117 set gnustep_guile_path="${GNUSTEP_USER_ROOT}/Libraries/Guile:${GNUSTEP_LOCAL_ROOT}/Libraries/Guile:${GNUSTEP_NETWORK_ROOT}/Libraries/Guile:${GNUSTEP_SYSTEM_ROOT}/Libraries/Guile"
118
119 if ( $?GUILE_LOAD_PATH == 0 ) then
120     setenv GUILE_LOAD_PATH "${gnustep_guile_path}"
121 else if ( { (echo "${GUILE_LOAD_PATH}" | fgrep -v "${gnustep_guile_path}" >/dev/null) } ) then
122     setenv GUILE_LOAD_PATH "${gnustep_guile_path}:${GUILE_LOAD_PATH}"
123 endif
124
125 unset gnustep_guile_path
126
127 #
128 # Perform any user initialization
129 #
130 if ( -e "$GNUSTEP_USER_ROOT/GNUstep.csh" ) then
131   source "$GNUSTEP_USER_ROOT/GNUstep.csh"
132 endif
133