ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/JSOC/configure
(Generate patch)

Comparing configure (file contents):
Revision 1.56 by arta, Fri Nov 13 23:14:07 2009 UTC vs.
Revision 1.57 by arta, Wed Mar 10 23:58:46 2010 UTC

# Line 1 | Line 1
1   #! /bin/csh -f
2  
3 if (-e custom.mk) rm custom.mk
4
3   # set up $JSOC_MACHINE
4   set JSOC_MACHINE = `build/jsoc_machine.csh`
5   echo "Machine type is $JSOC_MACHINE"
# Line 158 | Line 156 | if ($CHKLIBS == "no") then
156          cd ..
157          echo "done"
158          echo
161      
162        # run moreconfigure.pl - this script is written in perl because it is easier to do the compiler detection
163        # in perl. It also reads suflag.txt (if it exists) to set the default Stanford values for certain make variables
164
165        ./moreconfigure.pl -fcustom.mk
166
167        echo "done"
168        echo
159  
160          # generate links for DSDS/SOI dynamic libraries - only do this if
161          # user's environment has access to /home/soi/CM
# Line 179 | Line 169 | if ($CHKLIBS == "no") then
169              endif
170          endif
171  
172 +        echo "done"
173 +        echo
174 +
175          # Site Localization
176 +
177 +        # Path to the configuration file - at some point, make this an argument to the configure script
178 +        set conflocal = "config.local"
179 +        set LOCALIZATIONDIR = `perl -n -e 'if ($_ =~ /^LOCALIZATIONDIR\s+(.+)/) { print $1; }' $conflocal`
180 +
181 +        if ($LOCALIZATIONDIR == "") then
182 +            set LOCALIZATIONDIR = ${PWD}/localization
183 +        endif
184 +
185 +        # Eventually, dump all these generated files into a user-specified location.
186 +        # This script will need to read the config.local file to get the
187 +        # localization directory. Otherwise, just use JSOC/localization as the default.
188 +        # We should put custom.mk in the localization directory too.
189 +        if (!(-d ${LOCALIZATIONDIR})) then
190 +            mkdir ${LOCALIZATIONDIR}
191 +            if ($? != 0) then
192 +                echo "Error creating localization directory."
193 +            endif
194 +        endif
195 +        
196 +        if (-e ${LOCALIZATIONDIR}/custom.mk) then
197 +            rm ${LOCALIZATIONDIR}/custom.mk
198 +        endif
199 +
200 +        # run moreconfigure.pl - this script is written in perl because it is easier to do the compiler detection
201 +        # in perl. It also reads suflag.txt (if it exists) to set the default Stanford values for certain make variables
202 +        ./moreconfigure.pl -f${LOCALIZATIONDIR}/custom.mk
203 +
204          if (!(-e suflag.txt)) then
205              if (!(-e config.local)) then
206                  echo "Error: config.local not found. If you have a saved version of this"
# Line 195 | Line 216 | if ($CHKLIBS == "no") then
216                  echo "    update, ensure this file is in place."
217                  exit 1;
218              else
219 <                echo "CUSTOM_DEFINES = __LOCALIZED_DEFS__" >> custom.mk
219 >                echo "CUSTOM_DEFINES = __LOCALIZED_DEFS__" >> ${LOCALIZATIONDIR}/custom.mk
220                  ./gen_init.csh
221 <                ./customizemake.pl
221 >                ./customizemake.pl ./config.local ${LOCALIZATIONDIR}
222              endif
223          else if (-e config.local) then
224              # config.local is optional at Stanford, but it won't necessarily contain the same information that
# Line 212 | Line 233 | if ($CHKLIBS == "no") then
233              # items included in config.local to override those defined in serverdefs.h, but not all
234              # items need be specified in config.local.
235              ./customizedefs.pl
236 <            echo "CUSTOM_DEFINES = __CUSTOMIZED_DEFS__" >> custom.mk
236 >            echo "CUSTOM_DEFINES = __CUSTOMIZED_DEFS__" >> ${LOCALIZATIONDIR}/custom.mk
237  
238              # update custom.mk with data from config.local
239 <            ./customizemake.pl
239 >            ./customizemake.pl ./config.local ${LOCALIZATIONDIR}
240          endif
241  
242          echo "Setting links to headers..."

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines