(file) Return to configure CVS log (file) (dir) Up to [Development] / JSOC

Diff for /JSOC/configure between version 1.70 and 1.73

version 1.70, 2013/07/31 23:55:17 version 1.73, 2013/11/15 17:05:49
Line 2 
Line 2 
  
 # system configuration for configure script # system configuration for configure script
 set PERLBIN = "" set PERLBIN = ""
   set PYBIN = ""
  
 if ($PERLBIN == "") then if ($PERLBIN == "") then
     if (-e configsdp.txt) then     if (-e configsdp.txt) then
         # at stanford, use         # 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"
           set PYBIN = "python"
     endif     endif
 endif endif
  
Line 66  endif
Line 69  endif
         cd base/include         cd base/include
         find . -name "*.h" -exec rm {} \;         find . -name "*.h" -exec rm {} \;
         cd ../..         cd ../..
   
       # Special link from base/drms/apps/serverdefs.h to localization/drmsparams.h
       cd base/drms/apps
       rm serverdefs.h
       cd ../../..
   
     endif     endif
  
     if (-d include) then     if (-d include) then
Line 156  endif
Line 165  endif
         endif         endif
  
         if ($LOCALIZATIONDIR == "") then         if ($LOCALIZATIONDIR == "") then
             set LOCALIZATIONDIR = ${PWD}/localization              set LOCALIZATIONDIR = localization
         endif         endif
  
         # 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.
         # We should put custom.mk in the localization directory too.  
         if (!(-d ${LOCALIZATIONDIR})) then         if (!(-d ${LOCALIZATIONDIR})) then
             mkdir ${LOCALIZATIONDIR}             mkdir ${LOCALIZATIONDIR}
             if ($? != 0) then             if ($? != 0) then
Line 170  endif
Line 178  endif
             endif             endif
         endif         endif
  
         if (-e ${LOCALIZATIONDIR}/custom.mk) then          if (-e ${LOCALIZATIONDIR}/drmsparams.h) then
             rm ${LOCALIZATIONDIR}/custom.mk              rm ${LOCALIZATIONDIR}/drmsparams.h
           endif
   
           if (-e ${LOCALIZATIONDIR}/drmsparams.mk) then
               rm ${LOCALIZATIONDIR}/drmsparams.mk
           endif
   
           if (-e ${LOCALIZATIONDIR}/drmsparams.pm) then
               rm ${LOCALIZATIONDIR}/drmsparams.pm
         endif         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
Line 194  endif
Line 210  endif
                 echo "    directory tree, for example in /usr/local. After each NetDRMS"                 echo "    directory tree, for example in /usr/local. After each NetDRMS"
                 echo "    update, ensure this file is in place."                 echo "    update, ensure this file is in place."
                 exit 1;                 exit 1;
             else  
                 echo "CUSTOM_DEFINES = __LOCALIZED_DEFS__" >> ${LOCALIZATIONDIR}/custom.mk  
   
                 set CUSTOMDEFSFILE = "base/include/localization.h"  
                 echo "*** generating $CUSTOMDEFSFILE ***"  
                 cat /dev/null > $CUSTOMDEFSFILE  
                 echo '#ifndef __LOCALIZATION_H' >> $CUSTOMDEFSFILE  
                 echo '#define __LOCALIZATION_H' >> $CUSTOMDEFSFILE  
                 ./gen_init.csh  
   
                 # Non-customizable parameters. There are certain features that are not  
                 # present in NetDRMS, but that are present in the SDP JSOC version of DRMS.  
                 # Set defines needed to accomplish this here.  
                 # NetDRMS sites do not have DSDS.  
                 echo '#define DSDS_SUPPORT (0)' >> $CUSTOMDEFSFILE  
                 echo '#endif' >> $CUSTOMDEFSFILE  
   
                 # run moreconfigure.pl - this script is written in perl because it is easier to do the compiler detection  
                 # in perl. It also reads configdsp.txt (if it exists) to set the default Stanford values for certain make variables  
                 $PERLBIN ./moreconfigure.pl -d${LOCALIZATIONDIR} -fcustom.mk -c${CUSTOMDEFSFILE}  
   
                 # must follow moreconfigure.pl, because moreconfigure.pl will possibly set the compiler make variables,  
                 # which are then referenced by lines in custom.mk generated by customizemake.pl.  
                 $PERLBIN ./customizemake.pl ./config.local ${LOCALIZATIONDIR}  
             endif  
         else if (-e config.local) then  
             # This is Stanford.  
   
             # config.local is optional at Stanford, but it won't necessarily contain the same information that  
             # a NetDRMS config.local contains. The first section contains items that will override the  
             # the items in serverdefs.h. The second section contains items used to populate custom.mk,  
             # which causes make systems variables to be defined that override the default make behavior  
             # (such as overriding the name of the directory to which binary data are written - linux_x86_64_n02  
             # instead of linux_x86_64, for example).  
   
             # Override the defaults defined in serverdefs.h (don't use gen_init.csh as it does several things,  
             # most of which are relevant only to non-SU NetDRMS sites). This script causes all  
             # items included in config.local to override those defined in serverdefs.h, but not all  
             # items need be specified in config.local.  
             echo "CUSTOM_DEFINES = __CUSTOMIZED_DEFS__" >> ${LOCALIZATIONDIR}/custom.mk  
             $PERLBIN ./customizedefs.pl  
   
             set CUSTOMDEFSFILE = "base/include/customizeddefs.h"  
   
             # run moreconfigure.pl - this script is written in perl because it is easier to do the compiler detection  
             # in perl. It also reads configsdp.txt (if it exists) to set the default Stanford values for certain make variables  
             $PERLBIN ./moreconfigure.pl -d${LOCALIZATIONDIR} -fcustom.mk -c${CUSTOMDEFSFILE}  
   
             # update custom.mk with data from config.local  
             # must follow moreconfigure.pl, because moreconfigure.pl will possibly set the compiler make variables,  
             # which are then referenced by lines in custom.mk generated by customizemake.pl.  
             $PERLBIN ./customizemake.pl ./config.local ${LOCALIZATIONDIR}  
         else  
             # run moreconfigure.pl - this script is written in perl because it is easier to do the compiler detection  
             # in perl. It also reads configsdp.txt (if it exists) to set the default Stanford values for certain make variables  
             $PERLBIN ./moreconfigure.pl -d${LOCALIZATIONDIR} -fcustom.mk  
         endif  
   
         # Figure out if this is a custom checkout  
         set CUSTCO = "no"  
         set LITERALSTR = '{ open(CFG, "<'${LOCALIZATIONDIR}'/dlset.txt") || die "BAD"; my $line = <CFG>; chomp($line); print $line; }'  
         set CUSTCO = `$PERLBIN -e "$LITERALSTR"`  
   
         if (${CUSTCO} == "BAD") then  
             echo "Unable to open checkout state file ${LOCALIZATIONDIR}/dlset.txt"  
             exit 1  
         else if (${CUSTCO} == "custom") then  
             set CUSTCO = "yes"  
         endif  
   
         if (${PROJCONFIG} == "") then  
             if (${CUSTCO} == "yes") then  
                 echo "Must provide configuration file as an argument to this configure script"  
                 exit 1;  
             endif  
             if (-e configsdp.txt) then  
                 set PROJCONFIG = configsdp.txt  
             endif             endif
         endif         endif
  
         if (${PROJCONFIG} != "") then          # We now call localize.py for both Stanford and NetDRMS builds.
             echo "Running project configuration [${PERLBIN} configproj.pl -c${PROJCONFIG} -d${LOCALIZATIONDIR}]."          $PYBIN ./localize.py -d ${LOCALIZATIONDIR} -b drmsparams
             ${PERLBIN} configproj.pl -c${PROJCONFIG} -d${LOCALIZATIONDIR}  
         endif  
  
         echo "Setting links to scripts..."         echo "Setting links to scripts..."
         cd scripts         cd scripts
Line 305  endif
Line 242  endif
  
         echo "Setting links to headers..."         echo "Setting links to headers..."
  
           # When localize.py was added, we removed the repository version of serverdefs.h, and we stopped generating JSOC/base/include/localization.h.
           # To support legacy code, we need to make a link from serverdefs.h to ${LOCALIZATIONDIR}/drmsparams.h (the replacement for serverdefs.h
           # at Stanford) and from JSOC/base/include/localization.h to ${LOCALIZATIONDIR}/drmsparams.h (the replacement for localization.h
           # for NetDRMs builds). However, some files are looking for JSOC/base/drms/apps/serverdefs.h (instead of JSOC/base/include, the correct path).
           # 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.
           cd base/drms/apps
               ln -s ../../../${LOCALIZATIONDIR}/drmsparams.h serverdefs.h
           cd ../../..
   
           cd base/include
               ln -s ../../../${LOCALIZATIONDIR}/drmsparams.h localization.h
           cd ../..
   
         cd base/include         cd base/include
         find .. -path '../include' -prune -o -name \*.h  \( \( -exec ln -s {} . \; -a -exec echo "  " {} " OK" \; \) -o -exec echo "  " {} " ERROR - couldn't create link" \; \)         find .. -path '../include' -prune -o -name \*.h  \( \( -exec ln -s {} . \; -a -exec echo "  " {} " OK" \; \) -o -exec echo "  " {} " ERROR - couldn't create link" \; \)
         cd ../..         cd ../..
Line 317  endif
Line 268  endif
         echo "done"         echo "done"
         echo         echo
  
         # Custom make variable values - these will override the values set in moreconfigure.pl  
         # echo "JSOC_COMPILER = gcc" >> custom.mk  
         # echo "JSOC_FCOMPILER = gfortran" >> custom.mk  
         # echo "DRMS_DEFAULT_RETENTION = -10" >> custom.mk  
   
     endif     endif
  
  


Legend:
Removed from v.1.70  
changed lines
  Added in v.1.73

Karen Tian
Powered by
ViewCVS 0.9.4