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