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

Diff for /JSOC/configure between version 1.76 and 1.82

version 1.76, 2013/11/22 02:55:04 version 1.82, 2015/02/10 04:00:37
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 = ""
  
Line 25  set JSOC_MACHINE = `build/jsoc_machine.c
Line 25  set JSOC_MACHINE = `build/jsoc_machine.c
 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)
Line 36  foreach THEARG ($argv)
Line 38  foreach THEARG ($argv)
     set FLAG = `$PERLBIN -e "$LITERALSTR"`     set FLAG = `$PERLBIN -e "$LITERALSTR"`
  
     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 67  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 136  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
Line 163  endif
Line 185  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         # 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
Line 198  endif
Line 221  endif
             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
Line 222  endif
Line 249  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.
       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
  
         # 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
Line 256  endif
Line 287  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
         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
  
         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 ..  
         echo "done"  
         echo  
  
       # ${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     endif
  
       cd ..
       echo "done"
       echo


Legend:
Removed from v.1.76  
changed lines
  Added in v.1.82

Karen Tian
Powered by
ViewCVS 0.9.4