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" |
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 |
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" |
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 |
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..." |