version 1.76, 2013/11/22 02:55:04
|
version 1.81, 2014/05/07 19:02:29
|
|
|
#! /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 = "" |
| |
|
|
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 37 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 |
|
|
if (-d include) then | if (-d include) then |
cd include | cd include |
find . -name "*.h" -exec rm {} \; | find . -name "*.h" -exec rm {} \; |
|
find . -name "drmsparams*" -exec rm {} \; |
cd .. | cd .. |
endif | endif |
echo "done" | echo "done" |
|
|
echo -n "Removing links to scripts..." | echo -n "Removing links to scripts..." |
if (-d scripts) then | if (-d scripts) then |
cd scripts | cd scripts |
find . -name "*" -exec rm {} \; |
if ($? == 0) then |
|
find . -type l -exec rm {} \; |
|
endif |
cd .. | cd .. |
endif | endif |
echo "done" | echo "done" |
|
|
echo -n "Removing links to jsds..." | echo -n "Removing links to jsds..." |
if (-d jsds) then | if (-d jsds) then |
cd jsds | cd jsds |
find . -name "*" -exec rm {} \; |
if ($? == 0) then |
|
find . -type l -exec rm {} \; |
|
endif |
cd .. | cd .. |
endif | endif |
echo "done" | echo "done" |
|
|
echo | echo |
| |
if ($CLEAN == "yes") then | if ($CLEAN == "yes") then |
|
|
| |
# 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 | # Make the path absoluate |
set LOCALIZATIONDIR = ${PWD}/${LOCALIZATIONDIR} |
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 |
|
|
rm ${LOCALIZATIONDIR}/drmsparams.pm | rm ${LOCALIZATIONDIR}/drmsparams.pm |
endif | endif |
| |
|
if (-e ${LOCALIZATIONDIR}/drmsparams.py) then |
|
rm ${LOCALIZATIONDIR}/drmsparams.py |
|
endif |
|
|
|
|
# Must create the scripts subdirectory before the call to gen_init.csh | # Must create the scripts subdirectory before the call to gen_init.csh |
if (!(-d scripts)) then | if (!(-d scripts)) then |
mkdir scripts | mkdir scripts |
|
|
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 |
|
|
if (-d ../base/include) then | if (-d ../base/include) then |
find ../base/include -name \*.h -exec ln -s {} . \; | find ../base/include -name \*.h -exec ln -s {} . \; |
endif | endif |
|
|
|
# ${LOCALIZATIONDIR} is an absolute path |
|
ln -s ../${RELLOCALIZATIONDIR}/drmsparams.h |
|
ln -s ../${RELLOCALIZATIONDIR}/drmsparams.pm |
|
ln -s ../${RELLOCALIZATIONDIR}/drmsparams.py |
|
|
cd .. | cd .. |
echo "done" | echo "done" |
echo | echo |