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.9 by eulisse, Wed Jul 12 20:32:02 2006 UTC vs.
Revision 1.20 by eulisse, Fri Jul 21 06:39:13 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 < if [ "$VO_CMS_SW_DIR" != ""  ] then
44 > here=%{instroot}
45 >
46 > if [ "$VO_CMS_SW_DIR" != ""  ]
47 > then
48      here=$VO_CMS_SW_DIR
49   else
50 <    here=`dirname $0`
51 < endif
52 <
53 < [ -d $here/${SCRAM_ARCH}/etc/profile.d ] || 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".
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 ]
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"
59 >    exit 1
60 > fi
61  
62 < for pkg in `ls $here/${SCRAM_ARCH}/etc/profile.d/ | grep -e'^S.*[.]sh'`
62 > for pkg in `/bin/ls $here/${SCRAM_ARCH}/etc/profile.d/ | grep -e'^S.*[.]sh'`
63   do
64          source $here/${SCRAM_ARCH}/etc/profile.d/$pkg
65   done
66 <
66 > export CMS_PATH=$here
67   EOF_CMSSET_DEFAULT_SH
68  
69  
# Line 69 | Line 90 | else
90   endif
91  
92   setenv CMSOSCOMMAND `which cmsos`
93 < setenv SCRAM_ARCH `sh -c $CMSOSCOMMAND`
94 < setenv compilerv gcc323
95 < switch ( ${SCRAM_ARCH} )
96 <    case slc3_ia32:
97 <        setenv compilerv gcc323
98 <    breaksw
99 <    case slc3_amd64:
100 <        setenv compilerv gcc345
101 <    breaksw
102 <    case osx104_ia32:
103 <        setenv compilerv gcc400
104 <    breaksw
105 <    case osx104_pcc32:
106 <        setenv compilerv gcc400
107 <    breaksw
108 < endsw
93 > if ( ! ${?SCRAM_ARCH}) then
94 >    setenv SCRAM_ARCH `sh -c $CMSOSCOMMAND`
95 >    setenv compilerv gcc323
96 >    switch ( ${SCRAM_ARCH} )
97 >        case slc3_ia32:
98 >            setenv compilerv gcc323
99 >        breaksw
100 >        case slc3_amd64:
101 >            setenv compilerv gcc344
102 >        breaksw
103 >        case slc4_ia32:
104 >            setenv compilerv gcc345
105 >        breaksw
106 >        case slc4_amd64:
107 >            setenv compilerv gcc345
108 >        breaksw
109 >        case osx104_ia32:
110 >            setenv compilerv gcc400
111 >        breaksw
112 >        case osx104_pcc32:
113 >            setenv compilerv gcc400
114 >        breaksw
115 >    endsw
116 >
117 >    setenv SCRAM_ARCH ${SCRAM_ARCH}_${compilerv}
118 >
119 >    if ( $# > 0 ) then
120 >        setenv SCRAM_ARCH $1
121 >    endif
122 > endif
123 > setenv here %instroot
124  
89 setenv SCRAM_ARCH ${SCRAM_ARCH}_${compilerv}
125   if ( ${?VO_CMS_SW_DIR} ) then
126      setenv here $VO_CMS_SW_DIR
127   else
128 <    setenv here .
128 >    # OSG
129 >    if ( ${?OSG_APP} ) then
130 >        setenv here $OSG_APP/cmssoft/cms
131 >    endif
132 >    # OSG                      
133   endif
134  
135   if ( ! -e $here/cmsset_default.csh ) then
136      echo "Please cd into the directory where cmsset_default.csh is."
137   endif
138  
139 < foreach pkg ( `ls ${here}/${SCRAM_ARCH}/etc/profile.d/ | grep -e'^S.*[.]csh'` )
139 > foreach pkg ( `/bin/ls ${here}/${SCRAM_ARCH}/etc/profile.d/ | grep -e'^S.*[.]csh'` )
140          source ${here}/${SCRAM_ARCH}/etc/profile.d/$pkg
141   end
142 <
142 > setenv CMS_PATH $here
143   EOF_CMSSET_DEFAULT_CSH
144  
145   %pre

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines