1 | #----------------------------------------------------------- |
---|
2 | # Copyright Christian Arnault LAL-Orsay CNRS |
---|
3 | # arnault@lal.in2p3.fr |
---|
4 | # See the complete license in cmt_license.txt "http://www.cecill.info". |
---|
5 | #----------------------------------------------------------- |
---|
6 | |
---|
7 | setenv CMTBIN `uname`-`uname -m | sed -e 's# ##g'` |
---|
8 | |
---|
9 | if ( $?CMTCONFIG == 0 ) then |
---|
10 | setenv CMTCONFIG `${CMTROOT}/mgr/cmt_system.sh` |
---|
11 | endif |
---|
12 | |
---|
13 | if ( $?0 == 0 ) then |
---|
14 | if ( $?tcsh == 1 || `basename "$shell"` == "tcsh" ) then |
---|
15 | source ${CMTROOT}/src/setup.tcsh |
---|
16 | endif |
---|
17 | endif |
---|
18 | |
---|
19 | set newpath= |
---|
20 | |
---|
21 | foreach p ( `echo ${PATH} | sed 's#:# #g'` ) |
---|
22 | echo ${p} | egrep '/CMT/' >& /dev/null |
---|
23 | set s=${status} |
---|
24 | if ( "${s}" != 0 ) then |
---|
25 | if ( ${newpath} == "" ) then |
---|
26 | set newpath=${p} |
---|
27 | else |
---|
28 | set newpath=${newpath}:${p} |
---|
29 | endif |
---|
30 | endif |
---|
31 | end |
---|
32 | |
---|
33 | setenv PATH ${newpath}:"${CMTROOT}/${CMTBIN}" |
---|
34 | alias cmt '${CMTROOT}/${CMTBIN}/cmt.exe' |
---|
35 | |
---|
36 | if ( $?CLASSPATH == 0) then |
---|
37 | setenv CLASSPATH ${CMTROOT}/java |
---|
38 | else |
---|
39 | set newpath= |
---|
40 | foreach p ( `echo ${CLASSPATH} | sed 's#:# #g'` ) |
---|
41 | echo ${p} | egrep '/CMT/' >& /dev/null |
---|
42 | set s=${status} |
---|
43 | if ( "${s}" != 0 ) then |
---|
44 | if ( ${newpath} == "" ) then |
---|
45 | set newpath=${p} |
---|
46 | else |
---|
47 | set newpath=${newpath}:${p} |
---|
48 | endif |
---|
49 | endif |
---|
50 | end |
---|
51 | |
---|
52 | setenv CLASSPATH ${newpath}:${CMTROOT}/java/cmt.jar |
---|
53 | endif |
---|
54 | |
---|
55 | alias jcmt '(java cmt_parser)' |
---|
56 | |
---|
57 | # Set MAKEFLAGS, if unset (similar to NPROC with Plan 9 mk utility) |
---|
58 | if ( $?MAKEFLAGS == 0 ) then |
---|
59 | setenv MAKEFLAGS -j`getconf _NPROCESSORS_ONLN` || unsetenv MAKEFLAGS |
---|
60 | if ( $?MAKEFLAGS == 1 ) then |
---|
61 | setenv MAKEFLAGS "${MAKEFLAGS} QUICK=1" |
---|
62 | else |
---|
63 | setenv MAKEFLAGS "QUICK=1" |
---|
64 | endif |
---|
65 | endif |
---|