Changeset 1161


Ignore:
Timestamp:
08/22/06 09:15:15 (18 years ago)
Author:
mar637
Message:

swapped filenames install.sh/ build.sh

Location:
trunk/external/casa_asap
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/external/casa_asap/build.sh

    r1160 r1161  
    11#!/bin/sh
    22
    3 ROOTDIR=`pwd`
     3. aipsinit.sh
    44
    5 # insert flags to make it install with gcc-4.1
    6 gv=`gcc -dumpversion | sed -e 's#\.# #g'`
    7 major=`/bin/echo $gv | awk '{ print $1 }'`
    8 minor=`/bin/echo $gv | awk '{ print $2 }'`
    9 cppflags=''
    10 if [ $major -eq 4 ] && [ $minor -ge 1 ]; then
    11     cppflags='-ffriend-injection -fpermissive '
    12 elif [ $major -eq 2 ]; then
    13     echo "gcc version < 3 not supported"
    14     exit 1
     5MODULES="casa components coordinates fits images lattices measures ms scimath tables atnf"
     6
     7echo 'Building modules. This might take a while.'
     8echo 'Progress can be seen with  tail -f build.log'
     9if [ -f 'build.log' ]
     10then
     11    rm build.log
     12    touch build.log
    1513fi
    16 
    17 for AIPSINIT in aipsinit.sh aipsinit.csh
     14for mod in ${MODULES}
    1815do
    19   if [ ! -f $AIPSINIT ]
    20   then
    21     sed -e "s#__AIPSROOT#$ROOTDIR#g" $AIPSINIT.template > $AIPSINIT
    22   fi
     16    cd $ROOTDIR/code/$mod
     17    echo "Making module $mod..."
     18    make cleansys >> $ROOTDIR/build.log 2>&1
     19    make >> $ROOTDIR/build.log 2>&1
    2320done
    24 
    25 # detect 64bit
    26 platf=`uname -m | grep '64'`
    27 arch=`uname -s`
    28 
    29 if [ ! $platf == '' ]; then
    30     mv $ROOTDIR/linux $ROOTDIR/linux_64b
    31     cd $ROOTDIR/linux_64b/UNKNOWN_SITE
    32     cat makedefs.64 | sed -e  "s#-Wall  #-Wall $flags#" > makedefs
    33     cd $ROOTDIR
    34 elif [ $arch == 'Darwin' ]; then
    35     mv $ROOTDIR/linux $ROOTDIR/darwin
    36     cd $ROOTDIR/darwin/UNKNOWN_SITE
    37     cat makedefs.darwin > makedefs
    38     cd $ROOTDIR
    39 else
    40     cd $ROOTDIR/linux/UNKNOWN_SITE
    41     cat makedefs.32 | sed -e  "s#-Wall  #-Wall $flags#" > makedefs
    42     cd $ROOTDIR
    43 fi
     21echo 'Finished building the casa modules required by ASAP'
     22echo 'Look for status in build.log'
  • trunk/external/casa_asap/install.sh

    r1159 r1161  
    11#!/bin/sh
    22
    3 . aipsinit.sh
     3ROOTDIR=`pwd`
    44
    5 MODULES="casa components coordinates fits images lattices measures ms scimath tables atnf"
     5# insert flags to make it install with gcc-4.1
     6gv=`gcc -dumpversion | sed -e 's#\.# #g'`
     7major=`/bin/echo $gv | awk '{ print $1 }'`
     8minor=`/bin/echo $gv | awk '{ print $2 }'`
     9cppflags=''
     10if [ $major -eq 4 ] && [ $minor -ge 1 ]; then
     11    cppflags='-ffriend-injection -fpermissive '
     12elif [ $major -eq 2 ]; then
     13    echo "gcc version < 3 not supported"
     14    exit 1
     15fi
    616
    7 echo 'Building modules. This might take a while.'
    8 echo 'Progress can be seen with  tail -f build.log'
    9 if [ -f 'build.log' ]
    10 then
    11     rm build.log
    12     touch build.log
     17for AIPSINIT in aipsinit.sh aipsinit.csh
     18do
     19  if [ ! -f $AIPSINIT ]
     20  then
     21    sed -e "s#__AIPSROOT#$ROOTDIR#g" $AIPSINIT.template > $AIPSINIT
     22  fi
     23done
     24
     25# detect 64bit
     26platf=`uname -m | grep '64'`
     27arch=`uname -s`
     28
     29if [ ! $platf == '' ]; then
     30    mv $ROOTDIR/linux $ROOTDIR/linux_64b
     31    cd $ROOTDIR/linux_64b/UNKNOWN_SITE
     32    cat makedefs.64 | sed -e  "s#-Wall  #-Wall $flags#" > makedefs
     33    cd $ROOTDIR
     34elif [ $arch == 'Darwin' ]; then
     35    mv $ROOTDIR/linux $ROOTDIR/darwin
     36    cd $ROOTDIR/darwin/UNKNOWN_SITE
     37    cat makedefs.darwin > makedefs
     38    cd $ROOTDIR
     39else
     40    cd $ROOTDIR/linux/UNKNOWN_SITE
     41    cat makedefs.32 | sed -e  "s#-Wall  #-Wall $flags#" > makedefs
     42    cd $ROOTDIR
    1343fi
    14 for mod in ${MODULES}
    15 do
    16     cd $ROOTDIR/code/$mod
    17     echo "Making module $mod..."
    18     make cleansys >> $ROOTDIR/build.log 2>&1
    19     make >> $ROOTDIR/build.log 2>&1
    20 done
    21 echo 'Finished building the casa modules required by ASAP'
    22 echo 'Look for status in build.log'
Note: See TracChangeset for help on using the changeset viewer.