source: CMT/v1r25p20140131/src/setup.csh @ 693

Last change on this file since 693 was 664, checked in by rybkin, 10 years ago

merge -r 646:663 HEAD

  • Property svn:eol-style set to native
  • Property svn:ignore set to setup.*
File size: 2.0 KB
Line 
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# Remove spaces, if any
9set _m="`uname -m`"
10while ( "$_m" =~ "* *" )
11set _m="${_m:s/ //}"
12end
13setenv CMTBIN `uname`-"$_m"
14unset _m
15
16if ( $?CMTCONFIG == 0 ) then
17  setenv CMTCONFIG `${CMTROOT}/mgr/cmt_system.sh`
18endif
19
20if ( $?0 == 0 ) then
21if ( $?tcsh == 1 ) then
22  source ${CMTROOT}/src/setup.tcsh
23else if ( "${shell:t}" == "tcsh" ) then
24  source ${CMTROOT}/src/setup.tcsh
25endif
26endif
27
28# Remove CMT entries, if any
29set newpath=()
30foreach p (${path:q})
31  if ( "${p}" !~ "*/CMT/*" ) then
32    if ( ${#newpath} != 0 ) then
33      set newpath=(${newpath:q} ${p:q})
34    else
35      set newpath=(${p:q})
36    endif
37  endif
38end
39
40set path=(${newpath:q} "${CMTROOT}/${CMTBIN}")
41unset newpath
42
43alias cmt '${CMTROOT}/${CMTBIN}/cmt.exe'
44
45if ( $?CLASSPATH == 0 ) then
46  setenv CLASSPATH ${CMTROOT}/java/cmt.jar
47else if ( "${CLASSPATH}" == "" ) then
48  setenv CLASSPATH ${CMTROOT}/java/cmt.jar
49else if ( "${CLASSPATH}" !~ "*/CMT/*" ) then
50  setenv CLASSPATH ${CLASSPATH}:${CMTROOT}/java/cmt.jar
51else
52# Remove CMT entries
53  set _p="${CLASSPATH}"
54  while ( "$_p" =~ "*:*" )
55  set _p="${_p:s/:/ /}"
56  end
57
58  set newpath=
59  foreach p (${_p})
60    if ( "${p}" !~ "*/CMT/*" ) then
61      if ( "${newpath}" != "" ) then
62        set newpath=${newpath}:${p}
63      else
64        set newpath=${p}
65      endif
66    endif
67  end
68
69  if ( "${newpath}" != "" ) then
70    setenv CLASSPATH ${newpath}:${CMTROOT}/java/cmt.jar
71  else
72    setenv CLASSPATH ${CMTROOT}/java/cmt.jar
73  endif
74  unset _p newpath
75endif
76
77alias jcmt '(java cmt_parser)'
78
79# Set MAKEFLAGS, if unset (similar to NPROC with Plan 9 mk utility)
80if ( $?MAKEFLAGS == 0 ) then
81  setenv MAKEFLAGS -j`getconf _NPROCESSORS_ONLN` || unsetenv MAKEFLAGS
82  if ( $?MAKEFLAGS == 1 ) then
83    setenv MAKEFLAGS "${MAKEFLAGS} QUICK=1"
84  else
85    setenv MAKEFLAGS "QUICK=1"
86  endif
87endif
Note: See TracBrowser for help on using the repository browser.