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

Annotation of /ccf-setup.csh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (hide annotations)
Mon Feb 20 14:12:08 2017 UTC (7 years, 9 months ago) by ccflib
Branch: MAIN
Changes since 1.9: +44 -31 lines
File MIME type: application/x-csh
Adapted to run local SAS 15 version in local/SAS/xmmsas_20160201_1833. PERL5LIB and HEASOFT adapted to this version

1 ccflib 1.8 #! /bin/tcsh
2 ccflib 1.1 #
3     # ccf-setup.csh
4     #
5     # Setup to build CCF from user's home
6     #
7 ccflib 1.10 # $Id: ccf-setup.csh,v 1.9 2016/03/18 15:59:21 ccflib Exp $
8 ccflib 1.1
9    
10 ccflib 1.6 set host=`hostname | cut -d. -f1`
11 ccflib 1.5
12 ccflib 1.7 # Identify machine OS name and kernel type
13    
14     set osname=`uname -s`
15    
16     set cputype=`uname -m`
17    
18 ccflib 1.10 # Select where to work and define CCFLIB_HOME accordingly
19 ccflib 1.7
20 ccflib 1.5 switch ($host)
21 ccflib 1.10 case sas[bld,dmz]0[1,2]:
22     echo "${host} can not be used to build CCFs"
23     echo "Please login instead either on sasbld01n/sasbld02n or use your own Linux WS"
24     case sasbld0[1,2]n:
25     set kernelbits="64"
26     set refhost=${host}
27     set GNUVER="6.2"
28     setenv CCFLIB_HOME "/home/ccflib"
29     breaksw
30     case sasbld12:
31     set kernelbits="64"
32     set refhost=${host}
33     set GNUVER="6.2"
34     setenv CCFLIB_HOME "/home/ccflib"
35     breaksw
36 ccflib 1.9 case xvsoc01:
37 ccflib 1.10 set kernelbits="32"
38     set refhost="xvsoc01"
39 ccflib 1.9 setenv CCFLIB_HOME "/data/xmm/ccflib"
40     breaksw
41 ccflib 1.1 default :
42 ccflib 1.10 set kernelbits="64"
43     set refhost="sasbld01n"
44     set GNUVER="6.2"
45     cd /ccfbuild >& /dev/null
46     if ( $status != 0 ) then
47     setenv CCFLIB_HOME "/xdata/ccflib"
48     else
49     setenv CCFLIB_HOME "/ccfbuild"
50     endif
51     breaksw
52 ccflib 1.1 endsw
53    
54 ccflib 1.7 # Define where is the CCF development software
55    
56     setenv CCFDEV ${CCFLIB_HOME}/ccfdev
57    
58 ccflib 1.8 if ( ! -d $CCFDEV ) then
59     echo "ccf-setup.csh: $CCFDEV not found! - Abort"
60     return
61 ccflib 1.7 endif
62    
63    
64     # Set the CVS access to CCF package repository
65    
66 ccflib 1.8 setenv CVSROOT ${CCFLIB_HOME}/ccfcvs
67 ccflib 1.7
68     # Heasoft
69 ccflib 1.9 switch ($host)
70     case xvsoc01:
71     setenv LHEASOFT=1
72     breaksw
73     default:
74 ccflib 1.10 #setenv HEADAS "/sasbuild/local/${refhost}/GNU_CC_CXX_${GNUVER}/headas/architecture"
75     setenv PATH ${CCFLIB_HOME}/perl5/perlbrew/perls/perl-5.18.4/bin:${PATH}
76     unsetenv PERL5LIB
77     setenv HEADAS "/sasbuild/local/sasbld11/headas/architecture"
78 ccflib 1.9 if ( ! -d $HEADAS ) then
79     echo "ccf-setup.csh: $HEADAS does not exist! - Abort"
80     return
81     endif
82     source ${HEADAS}/headas-init.csh
83     breaksw
84     endsw
85 ccflib 1.1
86 ccflib 1.7 # SAS
87 ccflib 1.1
88 ccflib 1.9 switch ($host)
89     case xvsoc01:
90     setenv SAS_DIR ${CCFLIB_HOME}/xmmsas_20020413_2031
91     setenv SAS_PATH ${SAS_DIR}
92     source $SAS_DIR/sas-setup.csh
93     breaksw
94     default:
95 ccflib 1.10 #/sas/bin/confsas
96     #source $HOME/setsas.csh > /dev/null
97     source ${CCFLIB_HOME}/local/SAS/xmmsas_20160201_1833/setsas.csh > /dev/null
98 ccflib 1.9 breaksw
99     endsw
100 ccflib 1.1
101     setenv SAS_MEMORY_MODEL Low
102    
103 ccflib 1.7 # Add some useful perl modules
104 ccflib 1.1
105 ccflib 1.7 if ( $?PERL5LIB ) then
106 ccflib 1.10 setenv PERL5LIB ${CCFLIB_HOME}/perl:${PERL5LIB}
107 ccflib 1.7 else
108     setenv PERL5LIB ${CCFLIB_HOME}/perl
109     endif
110 ccflib 1.1
111 ccflib 1.7 # From CCFDEV/setup.csh
112 ccflib 1.1
113 ccflib 1.7 setenv PERL5LIB ${CCFDEV}/lib/perl5:${PERL5LIB}
114 ccflib 1.1
115     # Add the scripts in $CCFLIB_HOME/bin to PATH
116    
117 ccflib 1.10 setenv PATH ${CCFLIB_HOME}/bin:${PATH}
118 ccflib 1.7
119     # Unsets MAKE if set
120    
121     if ( $?MAKE ) then
122     echo "ccf-setup.csh, WARNING: Your environment sets MAKE=$MAKE. It will be unset"
123     unsetenv MAKE
124     endif
125    
126     # Show it
127    
128     echo
129 ccflib 1.10 echo "Heasoft & SAS reference information"
130     echo "==================================="
131     echo
132     echo "HEADAS = $HEADAS"
133     echo "Heasoft version = "`fversion`
134     echo
135 ccflib 1.7 echo
136     sasversion -V 2
137    
138     echo
139     echo "CCF building tools"
140     echo "=================="
141     echo
142     deceit -v
143     ccfextseq -v
144     echo
145     echo "CCF development environment"
146     echo "==========================="
147     echo
148     echo "CCFLIB_HOME = $CCFLIB_HOME"
149     echo "CCFDEV = $CCFDEV"
150     echo "CCF repository = $CVSROOT"
151     echo
152     echo "*** Ready !"
153     echo

  ViewVC Help
Powered by ViewVC 1.1.27