version 1.73, 2013/11/15 17:05:49
|
version 1.79, 2014/02/12 19:25:42
|
|
|
#! /bin/csh -f | #! /bin/csh -f |
| |
# system configuration for configure script |
# The system configuration for configure script |
set PERLBIN = "" | set PERLBIN = "" |
set PYBIN = "" | set PYBIN = "" |
| |
if ($PERLBIN == "") then | if ($PERLBIN == "") then |
if (-e configsdp.txt) then |
if (-x /home/jsoc/bin/linux_x86_64/activeperl) then |
# at stanford, use |
|
set PERLBIN = "/home/jsoc/bin/linux_x86_64/activeperl" | set PERLBIN = "/home/jsoc/bin/linux_x86_64/activeperl" |
set PYBIN = "/home/jsoc/bin/linux_x86_64/activepython" |
|
else | else |
set PERLBIN = "perl" | set PERLBIN = "perl" |
|
endif |
|
endif |
|
|
|
if ($PYBIN == "") then |
|
if (-x /home/jsoc/bin/linux_x86_64/activepython) then |
|
set PYBIN = "/home/jsoc/bin/linux_x86_64/activepython" |
|
else |
set PYBIN = "python" | set PYBIN = "python" |
endif | endif |
endif | endif |
|
|
set CLEAN = "no" | set CLEAN = "no" |
set PROJCONFIG = "" | set PROJCONFIG = "" |
set CLEANCMD = "d" | set CLEANCMD = "d" |
|
set CFGSERVER = "no" |
|
set CFGSERVERARG = "s" |
set CUSTOMDEFSFILE = "" | set CUSTOMDEFSFILE = "" |
| |
foreach THEARG ($argv) | foreach THEARG ($argv) |
Line 32 foreach THEARG ($argv) |
|
Line 38 foreach THEARG ($argv) |
|
| |
if ($FLAG == $CLEANCMD) then | if ($FLAG == $CLEANCMD) then |
set CLEAN = "yes" | set CLEAN = "yes" |
|
else if ($FLAG == $CFGSERVERARG) then |
|
set CFGSERVER = "yes" |
else if (-e $THEARG) then | else if (-e $THEARG) then |
set PROJCONFIG = $THEARG | set PROJCONFIG = $THEARG |
endif | endif |
|
|
| |
# Path to the configuration file - at some point, make this an argument to the configure script | # Path to the configuration file - at some point, make this an argument to the configure script |
set LOCALIZATIONDIR = "" | set LOCALIZATIONDIR = "" |
|
set RELLOCALIZATIONDIR = "" |
set conflocal = "config.local" | set conflocal = "config.local" |
| |
if (-e $conflocal) then | if (-e $conflocal) then |
set LOCALIZATIONDIR = `perl -n -e 'if ($_ =~ /^LOCALIZATIONDIR\s+(.+)/) { print $1; }' $conflocal` |
set RELLOCALIZATIONDIR = `perl -n -e 'if ($_ =~ /^LOCALIZATIONDIR\s+(.+)/) { print $1; }' $conflocal` |
endif | endif |
| |
if ($LOCALIZATIONDIR == "") then | if ($LOCALIZATIONDIR == "") then |
set LOCALIZATIONDIR = localization |
set RELLOCALIZATIONDIR = localization |
endif | endif |
| |
|
# Make the path absoluate |
|
set LOCALIZATIONDIR = ${PWD}/${RELLOCALIZATIONDIR} |
|
|
# Eventually, dump all these generated files into a user-specified location. | # Eventually, dump all these generated files into a user-specified location. |
# This script will need to read the config.local file to get the | # This script will need to read the config.local file to get the |
# localization directory. Otherwise, just use JSOC/localization as the default. | # localization directory. Otherwise, just use JSOC/localization as the default. |
|
|
endif | endif |
| |
# We now call localize.py for both Stanford and NetDRMS builds. | # We now call localize.py for both Stanford and NetDRMS builds. |
|
if ($CFGSERVER == "yes") then |
|
$PYBIN ./localize.py -d ${LOCALIZATIONDIR} -b drmsparams -s |
|
else |
$PYBIN ./localize.py -d ${LOCALIZATIONDIR} -b drmsparams | $PYBIN ./localize.py -d ${LOCALIZATIONDIR} -b drmsparams |
|
endif |
| |
echo "Setting links to scripts..." | echo "Setting links to scripts..." |
cd scripts | cd scripts |
|
|
# If we make a link from JSOC/base/drms/apps/serverdefs.h to ${LOCALIZATIONDIR}/drmsparams.h, then the script below will make links from | # If we make a link from JSOC/base/drms/apps/serverdefs.h to ${LOCALIZATIONDIR}/drmsparams.h, then the script below will make links from |
# JSOC/base/include/serverdefs.h and JSOC/include/serverdefs.h to JSOC/base/drms/apps/serverdefs.h, which then links to ${LOCALIZATIONDIR}/drmsparams.h. | # JSOC/base/include/serverdefs.h and JSOC/include/serverdefs.h to JSOC/base/drms/apps/serverdefs.h, which then links to ${LOCALIZATIONDIR}/drmsparams.h. |
cd base/drms/apps | cd base/drms/apps |
ln -s ../../../${LOCALIZATIONDIR}/drmsparams.h serverdefs.h |
ln -s ../../../${RELLOCALIZATIONDIR}/drmsparams.h serverdefs.h |
cd ../../.. | cd ../../.. |
| |
cd base/include | cd base/include |
ln -s ../../../${LOCALIZATIONDIR}/drmsparams.h localization.h |
ln -s ../../../${RELLOCALIZATIONDIR}/drmsparams.h localization.h |
cd ../.. | cd ../.. |
| |
cd base/include | cd base/include |