/[CCFs]/ccf-setup.csh
ViewVC logotype

Annotation of /ccf-setup.csh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.14 - (hide annotations)
Wed Nov 6 09:23:09 2019 UTC (5 years ago) by ccflib
Branch: MAIN
CVS Tags: HEAD
Changes since 1.13: +47 -47 lines
File MIME type: application/x-csh
Updated to be properly configured for perl 5.10.1

1 ccflib 1.8 #! /bin/tcsh
2 ccflib 1.1 #
3     # ccf-setup.csh
4     #
5 ccflib 1.14 # (C) ESA 1999-2019
6 ccflib 1.1 #
7 ccflib 1.14 # $Id: ccf-setup.csh,v 1.13 2017/12/22 13:26:18 ccflib Exp $
8 ccflib 1.1
9    
10 ccflib 1.6 set host=`hostname | cut -d. -f1`
11 ccflib 1.5
12 ccflib 1.14 # CCF can be made on the following hosts:
13 ccflib 1.11 #
14 ccflib 1.14 # 1) user's workstations
15     # refhost is then a reference SAS builder like sasbld01n
16     # CCFLIB_HOME is set to the remote ccflib home on /xdata/ccflib
17     #
18     # 2) any SAS builder
19     # refhost is itself
20     # CCFLIB_HOME is also the ccflib home directory.
21     # There is one exception to these rules: xmac01
22     #
23     #
24 ccflib 1.7
25 ccflib 1.14 set GNUVER="7.1"
26 ccflib 1.7
27 ccflib 1.11 switch ($host)
28    
29 ccflib 1.12 case sasbld0[1-4]n:
30 ccflib 1.11 set refhost=$host
31 ccflib 1.14 setenv CCFLIB_HOME "/home/ccflib"
32 ccflib 1.11 breaksw
33 ccflib 1.7
34 ccflib 1.14 case xmac01:
35 ccflib 1.11 set refhost=$host
36     setenv CCFLIB_HOME /xdata/ccflib
37     breaksw
38 ccflib 1.7
39 ccflib 1.11 default:
40     set refhost="sasbld01n"
41 ccflib 1.14 setenv CCFLIB_HOME "/xdata/ccflib"
42 ccflib 1.10 breaksw
43 ccflib 1.1 endsw
44    
45 ccflib 1.11 if ( ! $?CCFLIB_HOME ) then
46 ccflib 1.14 echo "Error: ccf-setup.csh: Undefined $CCFLIB_HOME - Fix it!"
47 ccflib 1.12 exit 1
48 ccflib 1.11 endif
49    
50 ccflib 1.14
51 ccflib 1.7 # Define where is the CCF development software
52    
53     setenv CCFDEV ${CCFLIB_HOME}/ccfdev
54    
55 ccflib 1.8 if ( ! -d $CCFDEV ) then
56 ccflib 1.11 echo "Error: ccf-setup.csh: $CCFDEV not found! - Abort"
57 ccflib 1.12 exit 1
58 ccflib 1.7 endif
59    
60    
61     # Set the CVS access to CCF package repository
62    
63 ccflib 1.8 setenv CVSROOT ${CCFLIB_HOME}/ccfcvs
64 ccflib 1.7
65 ccflib 1.14 # Heasoft and SAS.
66     #
67     # I M P O R T A N T N O T E
68     #
69     # We are using old versions of both due to a problem with deceit in latest versions
70     #
71 ccflib 1.11 # Heasoft
72    
73 ccflib 1.9 switch ($host)
74 ccflib 1.11
75 ccflib 1.14 case xmac01:
76 ccflib 1.11
77 ccflib 1.14 setenv PATH "/sasbuild/local/xmac01/GNU_CC_CXX_4.8.5_Yosemite/perl/bin:$PATH"
78 ccflib 1.11 unsetenv PERL5LIB
79 ccflib 1.14 setenv HEADAS "/sasbuild/local/xmac01/GNU_CC_CXX_4.8.5_Yosemite/headas/architecture"
80 ccflib 1.11 if ( ! -d "$HEADAS" ) then
81 ccflib 1.14 echo "Error: ccf-setup.csh: ${HEADAS} does not exist - Abort"
82 ccflib 1.12 exit 1
83 ccflib 1.11 endif
84     source ${HEADAS}/headas-init.csh
85     breaksw
86    
87 ccflib 1.14 # Temporary fix: The SAS 16 and 16.1 deceit and ccfextseq tasks do not work
88     # We must use SAS 15 which is not depending on GNUVER
89    
90 ccflib 1.11 default:
91 ccflib 1.14 #
92     # For the old versions of Heasoft and SAS we used a different perl
93     #
94     #setenv PATH ${CCFLIB_HOME}/perl5/perlbrew/perls/perl-5.10.1/bin:${PATH}
95     setenv PATH /xdata/sasbuild/local/sasbld02/perl_5.10.1/bin:$PATH
96     if ( $?PERL5LIB ) then
97     setenv PERL5LIB /xdata/sasbuild/local/sasbld02/perl_5.10.1/lib:$PERL5LIB
98     else
99     setenv PERL5LIB /xdata/sasbuild/local/sasbld02/perl_5.10.1/lib
100     endif
101     setenv HEADAS "/xdata/sasbuild/local/sasbld02/headas/architecture"
102 ccflib 1.11 if ( ! -d $HEADAS ) then
103 ccflib 1.14 echo "Error: ccf-setup.csh: $HEADAS does not exist! - Abort"
104 ccflib 1.12 exit 1
105 ccflib 1.11 endif
106     source ${HEADAS}/headas-init.csh
107     breaksw
108    
109 ccflib 1.9 endsw
110 ccflib 1.1
111 ccflib 1.7 # SAS
112 ccflib 1.1
113 ccflib 1.12 switch ($refhost)
114 ccflib 1.11
115 ccflib 1.12 case sasbld0[1-4]n:
116 ccflib 1.11
117 ccflib 1.14 source ${CCFLIB_HOME}/local/SAS/xmmsas_20160201_1833/setsas.csh >& /dev/null
118 ccflib 1.11
119     breaksw
120    
121     case xmac01:
122    
123 ccflib 1.14 source /sasbuild/installed/xmac01/xmmsas_20160201_1833/setsas.csh >& /dev/null
124 ccflib 1.11
125     breaksw
126    
127     default:
128     echo "Please use a Linux workstation to process CCF!"
129 ccflib 1.12 exit 1
130 ccflib 1.11 breaksw
131    
132 ccflib 1.9 endsw
133 ccflib 1.1
134     setenv SAS_MEMORY_MODEL Low
135    
136 ccflib 1.7 # Add some useful perl modules
137 ccflib 1.1
138 ccflib 1.7 if ( $?PERL5LIB ) then
139 ccflib 1.10 setenv PERL5LIB ${CCFLIB_HOME}/perl:${PERL5LIB}
140 ccflib 1.7 else
141     setenv PERL5LIB ${CCFLIB_HOME}/perl
142     endif
143 ccflib 1.1
144 ccflib 1.7 # From CCFDEV/setup.csh
145 ccflib 1.1
146 ccflib 1.7 setenv PERL5LIB ${CCFDEV}/lib/perl5:${PERL5LIB}
147 ccflib 1.1
148 ccflib 1.11 # Add the scripts in $CCFLIB_HOME/bin, $CCFLIB_HOME/lib (for example uploadccf) to PATH
149 ccflib 1.1
150 ccflib 1.13 setenv PATH ${CCFLIB_HOME}/bin:${CCFLIB_HOME}/ccfdev/bin:${CCFLIB_HOME}/ccfdev/lib:${PATH}
151 ccflib 1.7
152     # Unsets MAKE if set
153    
154     if ( $?MAKE ) then
155 ccflib 1.14 echo "WARNING: ccf-setup.csh: Your environment sets MAKE=$MAKE. It will be unset !"
156 ccflib 1.7 unsetenv MAKE
157     endif
158    
159     # Show it
160    
161     echo
162 ccflib 1.10 echo "Heasoft & SAS reference information"
163     echo "==================================="
164     echo
165     echo "HEADAS = $HEADAS"
166     echo "Heasoft version = "`fversion`
167     echo
168 ccflib 1.7 echo
169     sasversion -V 2
170    
171     echo
172     echo "CCF building tools"
173     echo "=================="
174     echo
175     deceit -v
176     ccfextseq -v
177     echo
178     echo "CCF development environment"
179     echo "==========================="
180     echo
181     echo "CCFLIB_HOME = $CCFLIB_HOME"
182     echo "CCFDEV = $CCFDEV"
183     echo "CCF repository = $CVSROOT"
184     echo
185     echo "*** Ready !"
186     echo

  ViewVC Help
Powered by ViewVC 1.1.27