1 |
#! /bin/csh |
2 |
# |
3 |
# ccf-setup.csh |
4 |
# |
5 |
# Setup to build CCF from user's home |
6 |
# |
7 |
# $Id: ccf-setup.csh,v 1.6 2014/12/11 16:56:54 ccflib Exp $ |
8 |
|
9 |
|
10 |
set host=`hostname | cut -d. -f1` |
11 |
|
12 |
# Identify machine OS name and kernel type |
13 |
|
14 |
set osname=`uname -s` |
15 |
|
16 |
set cputype=`uname -m` |
17 |
|
18 |
switch ($cputype) |
19 |
case i[3,4,5,6]86: |
20 |
set kernelbits=32 |
21 |
set refhost="sasbld01" |
22 |
breaksw |
23 |
case x86_64: |
24 |
set kernelbits=64 |
25 |
set refhost="sasbld02" |
26 |
breaksw |
27 |
endsw |
28 |
|
29 |
# Define CCFLIB_HOME |
30 |
|
31 |
switch ($host) |
32 |
case sasbld01: |
33 |
setenv CCFLIB_HOME "/home/ccflib" |
34 |
breaksw |
35 |
default : |
36 |
setenv CCFLIB_HOME "/ccfbuild" |
37 |
breaksw |
38 |
endsw |
39 |
|
40 |
# Define where is the CCF development software |
41 |
|
42 |
setenv CCFDEV ${CCFLIB_HOME}/ccfdev |
43 |
|
44 |
if ( ! -d "${CCFDEV}" ) then |
45 |
echo "ccf-setup.csh: ${CCFDEV} not found! - Abort" |
46 |
return |
47 |
endif |
48 |
|
49 |
|
50 |
# Set the CVS access to CCF package repository |
51 |
|
52 |
setenv CVSROOT ${CCFLIB_HOME/ccfcvs |
53 |
|
54 |
# Heasoft |
55 |
|
56 |
setenv HEADAS "/sasbuild/local/${refhost}/headas/architecture" |
57 |
if ( ! -d "${HEADAS}" ) then |
58 |
echo "ccf-setup.csh: ${HEADAS} does not exist! - Abort" |
59 |
return |
60 |
endif |
61 |
source ${HEADAS}/headas-init.csh |
62 |
|
63 |
# SAS |
64 |
|
65 |
if ( ! -f "$HOME/setsas.csh" ) then |
66 |
/sas/bin/confsas |
67 |
endif |
68 |
|
69 |
source $HOME/setsas.csh |
70 |
|
71 |
setenv SAS_MEMORY_MODEL Low |
72 |
|
73 |
# Add some useful perl modules |
74 |
|
75 |
if ( $?PERL5LIB ) then |
76 |
setenv PERL5LIB ${CCFLIB_HOME}/perl\:$PERL5LIB |
77 |
else |
78 |
setenv PERL5LIB ${CCFLIB_HOME}/perl |
79 |
endif |
80 |
|
81 |
# From CCFDEV/setup.csh |
82 |
|
83 |
setenv PERL5LIB ${CCFDEV}/lib/perl5:${PERL5LIB} |
84 |
|
85 |
# Add the scripts in $CCFLIB_HOME/bin to PATH |
86 |
|
87 |
setenv PATH ${CCFLIB_HOME}/bin\:$PATH |
88 |
|
89 |
# Unsets MAKE if set |
90 |
|
91 |
if ( $?MAKE ) then |
92 |
echo "ccf-setup.csh, WARNING: Your environment sets MAKE=$MAKE. It will be unset" |
93 |
unsetenv MAKE |
94 |
endif |
95 |
|
96 |
# Show it |
97 |
|
98 |
echo |
99 |
echo "SAS build reference information" |
100 |
echo "===============================" |
101 |
echo |
102 |
sasversion -V 2 |
103 |
|
104 |
echo |
105 |
echo "CCF building tools" |
106 |
echo "==================" |
107 |
echo |
108 |
deceit -v |
109 |
ccfextseq -v |
110 |
echo |
111 |
echo "CCF development environment" |
112 |
echo "===========================" |
113 |
echo |
114 |
echo "CCFLIB_HOME = $CCFLIB_HOME" |
115 |
echo "CCFDEV = $CCFDEV" |
116 |
echo "CCF repository = $CVSROOT" |
117 |
echo |
118 |
echo "*** Ready !" |
119 |
echo |