ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/cms-env.spec
(Generate patch)

Comparing COMP/CMSDIST/cms-env.spec (file contents):
Revision 1.13 by eulisse, Sun Jul 16 18:46:10 2006 UTC vs.
Revision 1.21 by eulisse, Mon Jul 24 14:27:09 2006 UTC

# Line 17 | Line 17 | cat << \EOF_CMSSET_DEFAULT_SH > %instroo
17   export PATH=%instroot/bin:$PATH
18   export LD_LIBRARY_PATH=%instroot/lib:$LD_LIBRARY_PATH
19   export DYLD_FALLBACK_LIBRARY_PATH=%instroot/lib:$DYLD_FALLBACK_LIBRARY
20 SCRAM_ARCH=$(cmsos)
20  
21 < # We need to assume 1 compiler per platform.
22 < # There is no other way around this.
23 < case $SCRAM_ARCH in
24 <    slc3_ia32) compilerv=gcc323;;
25 <    slc3_amd64) compilerv=gcc345;;
26 <    osx104_ia32) compilerv=gcc400;;
27 <    osx104_pcc32) compilerv=gcc400;;
28 < esac
29 < SCRAM_ARCH=${SCRAM_ARCH}_$compilerv
30 < export SCRAM_ARCH
21 > if [ "$SCRAM_ARCH" == "" ]
22 > then
23 >    SCRAM_ARCH=$(cmsos)
24 >
25 >    # We need to assume 1 compiler per platform.
26 >    # There is no other way around this.
27 >    case $SCRAM_ARCH in
28 >        slc3_ia32) compilerv=gcc323;;
29 >        slc3_amd64) compilerv=gcc344;;
30 >        slc4_ia32) compilerv=gcc345;;
31 >        slc4_amd64) compilerv=gcc345;;
32 >        osx104_ia32) compilerv=gcc400;;
33 >        osx104_pcc32) compilerv=gcc400;;
34 >    esac
35 >    SCRAM_ARCH=${SCRAM_ARCH}_$compilerv
36 >
37 >    if [ $# -gt 0 ]
38 >    then
39 >        SCRAM_ARCH=$1
40 >    fi
41 >    export SCRAM_ARCH
42 > fi
43 >
44 > here=%{instroot}
45  
46   if [ "$VO_CMS_SW_DIR" != ""  ]
47   then
48      here=$VO_CMS_SW_DIR
49   else
37    here=`dirname $0`
38
50      if [ "$OSG_APP" != "" ]
51      then
52          here=$OSG_APP/cmssoft/cms
53      fi
54   fi
55  
56 < if [ -d $here/${SCRAM_ARCH}/etc/profile.d ]
56 > if [ ! -d $here/${SCRAM_ARCH}/etc/profile.d ]
57   then
58      echo "Your shell is not able to find where cmsset_default.sh is. Either cd into the directory where it is or move to zsh"
48    exit 1
59   fi
60  
61 < for pkg in `ls $here/${SCRAM_ARCH}/etc/profile.d/ | grep -e'^S.*[.]sh'`
61 > for pkg in `/bin/ls $here/${SCRAM_ARCH}/etc/profile.d/ | grep -e'^S.*[.]sh'`
62   do
63          source $here/${SCRAM_ARCH}/etc/profile.d/$pkg
64   done
65 < export CMS_PATH=$here
65 >
66 > if [ "$CMS_PATH" == "" ]
67 > then
68 >    export CMS_PATH=$here
69 > fi
70   EOF_CMSSET_DEFAULT_SH
71  
72  
# Line 79 | Line 93 | else
93   endif
94  
95   setenv CMSOSCOMMAND `which cmsos`
96 < setenv SCRAM_ARCH `sh -c $CMSOSCOMMAND`
97 < setenv compilerv gcc323
98 < switch ( ${SCRAM_ARCH} )
99 <    case slc3_ia32:
100 <        setenv compilerv gcc323
101 <    breaksw
102 <    case slc3_amd64:
103 <        setenv compilerv gcc345
104 <    breaksw
105 <    case osx104_ia32:
106 <        setenv compilerv gcc400
107 <    breaksw
108 <    case osx104_pcc32:
109 <        setenv compilerv gcc400
110 <    breaksw
111 < endsw
96 > if ( ! ${?SCRAM_ARCH}) then
97 >    setenv SCRAM_ARCH `sh -c $CMSOSCOMMAND`
98 >    setenv compilerv gcc323
99 >    switch ( ${SCRAM_ARCH} )
100 >        case slc3_ia32:
101 >            setenv compilerv gcc323
102 >        breaksw
103 >        case slc3_amd64:
104 >            setenv compilerv gcc344
105 >        breaksw
106 >        case slc4_ia32:
107 >            setenv compilerv gcc345
108 >        breaksw
109 >        case slc4_amd64:
110 >            setenv compilerv gcc345
111 >        breaksw
112 >        case osx104_ia32:
113 >            setenv compilerv gcc400
114 >        breaksw
115 >        case osx104_pcc32:
116 >            setenv compilerv gcc400
117 >        breaksw
118 >    endsw
119 >
120 >    setenv SCRAM_ARCH ${SCRAM_ARCH}_${compilerv}
121 >
122 >    if ( $# > 0 ) then
123 >        setenv SCRAM_ARCH $1
124 >    endif
125 > endif
126 > setenv here %instroot
127  
99 setenv SCRAM_ARCH ${SCRAM_ARCH}_${compilerv}
128   if ( ${?VO_CMS_SW_DIR} ) then
129      setenv here $VO_CMS_SW_DIR
130   else
103    setenv here .
131      # OSG
132      if ( ${?OSG_APP} ) then
133          setenv here $OSG_APP/cmssoft/cms
# Line 112 | Line 139 | if ( ! -e $here/cmsset_default.csh ) the
139      echo "Please cd into the directory where cmsset_default.csh is."
140   endif
141  
142 < foreach pkg ( `ls ${here}/${SCRAM_ARCH}/etc/profile.d/ | grep -e'^S.*[.]csh'` )
142 > foreach pkg ( `/bin/ls ${here}/${SCRAM_ARCH}/etc/profile.d/ | grep -e'^S.*[.]csh'` )
143          source ${here}/${SCRAM_ARCH}/etc/profile.d/$pkg
144   end
145 < setenv CMS_PATH $here
145 > if ( ! ${?CMS_PATH} ) then
146 >    setenv CMS_PATH $here
147 > endif
148   EOF_CMSSET_DEFAULT_CSH
149  
150   %pre

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines