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

Diff for /JSOC/configure between version 1.74 and 1.87

version 1.74, 2013/11/15 21:45:34 version 1.87, 2021/04/23 18:39:30
Line 1 
Line 1 
 #! /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 = "python3"
   set DRMSEXPORT_WEBAPP_DIR = "proj/export/webapps/drmsexport"
   set PY_LIBS_DIR = "base/libs/py"
  
 if ($PERLBIN == "") then if ($PERLBIN == "") then
     if (-x /home/jsoc/bin/linux_x86_64/activeperl) then     if (-x /home/jsoc/bin/linux_x86_64/activeperl) then
Line 16  if ($PYBIN == "") then
Line 18  if ($PYBIN == "") then
     if (-x /home/jsoc/bin/linux_x86_64/activepython) then     if (-x /home/jsoc/bin/linux_x86_64/activepython) then
         set PYBIN = "/home/jsoc/bin/linux_x86_64/activepython"         set PYBIN = "/home/jsoc/bin/linux_x86_64/activepython"
     else     else
         set PYBIN = "python"          set PYBIN = "python3"
     endif     endif
 endif endif
  
 # set up $JSOC_MACHINE # set up $JSOC_MACHINE
 set JSOC_MACHINE = `build/jsoc_machine.csh` set JSOC_MACHINE = `build/jsoc_machine.csh`
   if ($? != 0) then
       echo "Unable to determine machine type."
       exit 1
   endif
   
 echo "Machine type is $JSOC_MACHINE" echo "Machine type is $JSOC_MACHINE"
 echo "" echo ""
  
 set CLEAN = "no"  # Clean by default.
   set CLEAN = "yes"
 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)
     set LITERALSTR = '{ my($argin) = "'${THEARG}'"; my($flagout); $flagout = ($argin =~ /^-(.+)/)[0]; print $flagout; }'     set LITERALSTR = '{ my($argin) = "'${THEARG}'"; my($flagout); $flagout = ($argin =~ /^-(.+)/)[0]; print $flagout; }'
     set FLAG = `$PERLBIN -e "$LITERALSTR"`     set FLAG = `$PERLBIN -e "$LITERALSTR"`
       if ($? != 0) then
           echo "Unable to parse command-line arguments."
           exit 1
       endif
  
     if ($FLAG == $CLEANCMD) then     if ($FLAG == $CLEANCMD) then
         set CLEAN = "yes"          set CLEAN = "no"
       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
 end end
  
 # Usage: # Usage:
 #   configure [ -c ] [ <project config file> ]  #   configure [ -d ] [ -s ] [ <project config file> ]
  
 # Backward compatibility - remove the links to the old make files in projconf # Backward compatibility - remove the links to the old make files in projconf
 if (-d proj) then if (-d proj) then
Line 63  if (-d proj) then
Line 78  if (-d proj) then
     cd ..     cd ..
 endif endif
  
     echo -n "Remove links to man pages..."      # Always clean up links to man pages and re-create them.
       echo -n "Removing links to man pages..."
     if (-e man) then     if (-e man) then
         rm -rf man         rm -rf man
     endif     endif
     echo "done"     echo "done"
  
     echo -n "Removing links to headers..."      if ($CLEAN == "yes") then
           echo -n "Removing links in base/include to headers..."
           # Links in base/include
     if (-d base/include) then     if (-d base/include) then
         cd base/include         cd base/include
         find . -name "*.h" -exec rm {} \;         find . -name "*.h" -exec rm {} \;
         cd ../..         cd ../..
           endif
           echo "done"
  
     # Special link from base/drms/apps/serverdefs.h to localization/drmsparams.h     # Special link from base/drms/apps/serverdefs.h to localization/drmsparams.h
           echo -n "Removing link to serverdefs.h..."
           if (-e base/drms/apps) then
     cd base/drms/apps     cd base/drms/apps
     rm serverdefs.h     rm serverdefs.h
     cd ../../..     cd ../../..
   
     endif     endif
           echo "done"
  
           # Links in include
           echo -n "Removing links in include to headers..."
     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..."
           # Links in 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"
       # End clean flag
       endif
  
       # Always clean-up links to jsds and re-create them.
     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
Line 115  endif
Line 147  endif
         if (-x base/local/libs/soi/scripts/rmlinks.csh) then         if (-x base/local/libs/soi/scripts/rmlinks.csh) then
             base/local/libs/soi/scripts/rmlinks.csh             base/local/libs/soi/scripts/rmlinks.csh
         endif         endif
     else      endif
   
         # Make include directories here, since they are used by multiple script blocks below         # Make include directories here, since they are used by multiple script blocks below
         if (!(-d base/include)) then         if (!(-d base/include)) then
             mkdir -p base/include             mkdir -p base/include
           if ($? != 0) then
               echo "Unable to make base/include directory."
               exit 1
           endif
         endif         endif
  
         if (!(-d include)) then         if (!(-d include)) then
             mkdir -p include             mkdir -p include
           if ($? != 0) then
               echo "Unable to make include directory."
               exit 1
           endif
   
   
         endif         endif
  
         echo "Setting links to man pages..."         echo "Setting links to man pages..."
Line 159  endif
Line 202  endif
         echo "done"         echo "done"
         echo         echo
  
         # Site Localization      #######################
       ## Site Localization ##
       #######################
  
         # 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
  
         # Eventually, dump all these generated files into a user-specified location.      # Make the path absoluate
       set LOCALIZATIONDIR = ${PWD}/${RELLOCALIZATIONDIR}
   
       # Reset localization.
       if ($CLEAN == "yes") then
         # 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.
         if (!(-d ${LOCALIZATIONDIR})) then         if (!(-d ${LOCALIZATIONDIR})) then
             mkdir ${LOCALIZATIONDIR}             mkdir ${LOCALIZATIONDIR}
             if ($? != 0) then             if ($? != 0) then
                 echo "Error creating localization directory."                 echo "Error creating localization directory."
                   exit 1
             endif             endif
         endif         endif
  
Line 195  endif
Line 246  endif
             rm ${LOCALIZATIONDIR}/drmsparams.pm             rm ${LOCALIZATIONDIR}/drmsparams.pm
         endif         endif
  
         # Must create the scripts subdirectory before the call to gen_init.csh          if (-e ${LOCALIZATIONDIR}/drmsparams.py) then
         if (!(-d scripts)) then              rm ${LOCALIZATIONDIR}/drmsparams.py
             mkdir scripts  
         endif         endif
  
         if (!(-e configsdp.txt)) then         if (!(-e configsdp.txt)) then
Line 219  endif
Line 269  endif
         endif         endif
  
         # We now call localize.py for both Stanford and NetDRMS builds.         # We now call localize.py for both Stanford and NetDRMS builds.
         $PYBIN ./localize.py -d ${LOCALIZATIONDIR} -b drmsparams          if ($CFGSERVER == "yes") then
               set cmd = "$PYBIN ./localize.py -d ${LOCALIZATIONDIR} -b drmsparams -s"
           else
               set cmd = "$PYBIN ./localize.py -d ${LOCALIZATIONDIR} -b drmsparams"
           endif
   
           $cmd
           if ($? != 0) then
               echo "Failure running localize.py."
               exit 1
           endif
   
           # copy drmsparams.py and securedrms.py into drmsexport web app project directory
           if (-e ${LOCALIZATIONDIR}/drmsparams.py && -e ${PY_LIBS_DIR}/securedrms.py && -e ${DRMSEXPORT_WEBAPP_DIR}) then
               echo "copying drmsparams.py and securedrms.py to drmsexport package scaffolding"
               cp ${LOCALIZATIONDIR}/drmsparams.py ${DRMSEXPORT_WEBAPP_DIR}/drmsparams.py
               cp ${PY_LIBS_DIR}/securedrms.py ${DRMSEXPORT_WEBAPP_DIR}/securedrms.py
           endif
       endif # End reset localization
  
         echo "Setting links to scripts..."         echo "Setting links to scripts..."
       if (!(-d scripts)) then
           mkdir scripts
           if ($? != 0) then
               echo "Unable to create scripts directory."
               exit 1
           endif
       endif
   
       if ($CLEAN == "yes") then
         cd scripts         cd scripts
  
         # Sums scripts         # Sums scripts
         find ../base/sums/scripts -mindepth 1 \( -path \*CVS -prune -o -exec ln -s {} . \; -a -exec echo "  " {} " OK" \; \) -o -exec echo "  " {} " ERROR - couldn't create link" \;          find ../base/sums/scripts -mindepth 1 -path \*CVS -prune -o -print | ${PERLBIN} -MFile::Basename -n -e 'my($bn) = basename($_); chomp($bn); my($path) = $_; chomp($path); if (!(-e $bn)) { `ln -s $_`; if ($? >> 8 == 0) { print "   " . $path . " OK\n"; } else { print "   " . $path . " ERROR - could not create link\n"; } }'
  
         # Util scripts         # Util scripts
         find ../base/util/scripts -mindepth 1 \( -path \*CVS -prune -o -exec ln -s {} . \; -a -exec echo "  " {} " OK" \; \) -o -exec echo "  " {} " ERROR - couldn't create link" \;          find ../base/util/scripts -mindepth 1 -path \*CVS -prune -o -print | ${PERLBIN} -MFile::Basename -n -e 'my($bn) = basename($_); chomp($bn); my($path) = $_; chomp($path); if (!(-e $bn)) { `ln -s $_`; if ($? >> 8 == 0) { print "   " . $path . " OK\n"; } else { print "   " . $path . " ERROR - could not create link\n"; } }'
  
         # Export scripts         # Export scripts
         find ../base/export/scripts -mindepth 1 \( -path \*CVS -prune -o -exec ln -s {} . \; -a -exec echo "  " {} " OK" \; \) -o -exec echo "  " {} " ERROR - couldn't create link" \;          find ../base/export/scripts -mindepth 1 -path \*CVS -prune -o -print | ${PERLBIN} -MFile::Basename -n -e 'my($bn) = basename($_); chomp($bn); my($path) = $_; chomp($path); if (!(-e $bn)) { `ln -s $_`; if ($? >> 8 == 0) { print "   " . $path . " OK\n"; } else { print "   " . $path . " ERROR - could not create link\n"; } }'
  
         # DRMS / IDL-interface scripts         # DRMS / IDL-interface scripts
         find ../base/drms/scripts -mindepth 1 \( -path \*CVS -prune -o -exec ln -s {} . \; -a -exec echo "  " {} " OK" \; \) -o -exec echo "  " {} " ERROR - couldn't create link" \;          find ../base/drms/scripts -mindepth 1 -path \*CVS -prune -o -print | ${PERLBIN} -MFile::Basename -n -e 'my($bn) = basename($_); chomp($bn); my($path) = $_; chomp($path); if (!(-e $bn)) { `ln -s $_`; if ($? >> 8 == 0) { print "   " . $path . " OK\n"; } else { print "   " . $path . " ERROR - could not create link\n"; } }'
  
         # Project-specific scripts - these won't show up if you don't have the project source.         # Project-specific scripts - these won't show up if you don't have the project source.
         if (-x ${LOCALIZATIONDIR}/configure) then         if (-x ${LOCALIZATIONDIR}/configure) then
             ${LOCALIZATIONDIR}/configure             ${LOCALIZATIONDIR}/configure
         endif         endif
   
         cd ..         cd ..
       endif
   
         echo "done"         echo "done"
         echo         echo
  
Line 253  endif
Line 331  endif
         # for NetDRMs builds). However, some files are looking for JSOC/base/drms/apps/serverdefs.h (instead of JSOC/base/include, the correct path).         # 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         # 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.
       if (!(-l base/drms/apps/serverdefs.h)) then
         cd base/drms/apps         cd base/drms/apps
             ln -s ../../../${LOCALIZATIONDIR}/drmsparams.h serverdefs.h          ln -s ../../../${RELLOCALIZATIONDIR}/drmsparams.h serverdefs.h
           if ($? != 0) then
               echo "Failure creating link to "
               exit 1
           endif
         cd ../../..         cd ../../..
       endif
  
       if (!(-l base/include/localization.h)) then
         cd base/include         cd base/include
             ln -s ../../../${LOCALIZATIONDIR}/drmsparams.h localization.h          ln -s ../../${RELLOCALIZATIONDIR}/drmsparams.h localization.h
         cd ../..         cd ../..
       endif
  
       if ($CLEAN == "yes") then
         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 -print | ${PERLBIN} -MFile::Basename -n -e 'my($bn) = basename($_); chomp($bn); my($path) = $_; chomp($path); if (!(-e $bn)) { `ln -s $_`; if ($? >> 8 == 0) { print "   " . $path . " OK\n"; } else { print "   " . $path . " ERROR - could not create link\n"; } }'
         cd ../..         cd ../..
  
         cd include         cd include
         if (-d ../base/include) then         if (-d ../base/include) then
             find ../base/include -name \*.h -exec ln -s {} . \;              find ../base/include -name \*.h -print | ${PERLBIN} -MFile::Basename -n -e 'my($bn) = basename($_); chomp($bn); my($path) = $_; chomp($path); if (!(-e $bn)) { `ln -s $_`; if ($? >> 8 == 0) { print "   " . $path . " OK\n"; } else { print "   " . $path . " ERROR - could not create link\n"; } }'
         endif         endif
         cd ..         cd ..
         echo "done"  
         echo  
   
     endif     endif
  
       cd include
       # ${LOCALIZATIONDIR} is an absolute path
       if (!(-l drmsparams.h)) then
           ln -s ../${RELLOCALIZATIONDIR}/drmsparams.h
       endif
       if (!(-l drmsparams.pm)) then
           ln -s ../${RELLOCALIZATIONDIR}/drmsparams.pm
       endif
       if (!(-l drmsparams.py)) then
           ln -s ../${RELLOCALIZATIONDIR}/drmsparams.py
       endif
  
       cd ..
       echo "done"
       echo


Legend:
Removed from v.1.74  
changed lines
  Added in v.1.87

Karen Tian
Powered by
ViewCVS 0.9.4