source: CMT/HEAD/src/setup.csh @ 685

Last change on this file since 685 was 655, checked in by rybkin, 11 years ago

See C.L. 514

  • Property svn:eol-style set to native
  • Property svn:ignore set to setup.*
File size: 2.0 KB
RevLine 
[2]1#-----------------------------------------------------------
2# Copyright Christian Arnault LAL-Orsay CNRS
3# arnault@lal.in2p3.fr
[611]4# Modified by Grigory Rybkin
[2]5# See the complete license in cmt_license.txt "http://www.cecill.info".
6#-----------------------------------------------------------
7
[655]8# Remove spaces, if any
9set _m="`uname -m`"
10while ( "$_m" =~ "* *" )
11set _m="${_m:s/ //}"
12end
13setenv CMTBIN `uname`-"$_m"
14unset _m
[2]15
16if ( $?CMTCONFIG == 0 ) then
17  setenv CMTCONFIG `${CMTROOT}/mgr/cmt_system.sh`
18endif
19
[584]20if ( $?0 == 0 ) then
[612]21if ( $?tcsh == 1 ) then
[2]22  source ${CMTROOT}/src/setup.tcsh
[655]23else if ( "${shell:t}" == "tcsh" ) then
[612]24  source ${CMTROOT}/src/setup.tcsh
[2]25endif
[584]26endif
[2]27
[655]28# Remove CMT entries, if any
[611]29set newpath=()
[655]30foreach p (${path:q})
[611]31  if ( "${p}" !~ "*/CMT/*" ) then
32    if ( ${#newpath} != 0 ) then
[655]33      set newpath=(${newpath:q} ${p:q})
[2]34    else
[655]35      set newpath=(${p:q})
[2]36    endif
37  endif
38end
39
[655]40set path=(${newpath:q} "${CMTROOT}/${CMTBIN}")
[611]41unset newpath
[2]42
[655]43alias cmt '${CMTROOT}/${CMTBIN}/cmt.exe'
44
[612]45if ( $?CLASSPATH == 0 ) then
[611]46  setenv CLASSPATH ${CMTROOT}/java/cmt.jar
[612]47else if ( "${CLASSPATH}" == "" ) then
48  setenv CLASSPATH ${CMTROOT}/java/cmt.jar
[611]49else if ( "${CLASSPATH}" !~ "*/CMT/*" ) then
50  setenv CLASSPATH ${CLASSPATH}:${CMTROOT}/java/cmt.jar
[2]51else
[655]52# Remove CMT entries
53  set _p="${CLASSPATH}"
54  while ( "$_p" =~ "*:*" )
55  set _p="${_p:s/:/ /}"
56  end
57
[2]58  set newpath=
[655]59  foreach p (${_p})
[611]60    if ( "${p}" !~ "*/CMT/*" ) then
61      if ( "${newpath}" != "" ) then
62        set newpath=${newpath}:${p}
63      else
[2]64        set newpath=${p}
65      endif
66    endif
67  end
68
[611]69  if ( "${newpath}" != "" ) then
70    setenv CLASSPATH ${newpath}:${CMTROOT}/java/cmt.jar
71  else
72    setenv CLASSPATH ${CMTROOT}/java/cmt.jar
73  endif
[655]74  unset _p newpath
[2]75endif
76
77alias jcmt '(java cmt_parser)'
[588]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.