Ignore:
Timestamp:
Feb 28, 2007 7:37:45 AM (17 years ago)
Author:
raasch
Message:

compilation of utilities with mbuild, mrun_path replaced by PALM_BIN, no statistik-log

Location:
palm/trunk/SCRIPTS
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS

    • Property svn:ignore set to
      *.x
  • palm/trunk/SCRIPTS/mbuild_new

    r9 r22  
    11#!/bin/ksh
    2 # mbuild - Programmuebersetzungsscript   Version:  @(#)MBUILD 1.0    10/02/07
     2# mbuild - Programmuebersetzungsscript   Version:  @(#)MBUILD 1.0    28/02/07
    33
    44     # Prozedur zur Uebersetzung von Programmteilen mittels make-Mechanismus
     
    7979     # 07/02/07 - Siggi - adapted for RIAM (neck)
    8080     # 10/02/07 - Siggi - all hpmuk-related code removed
     81     # 28/02/07 - Siggi - compilation of utility programs added (option -u)
    8182
    8283
    8384
    8485    # VARIABLENVEREINBARUNGEN + DEFAULTWERTE
     86 compile_utility_programs=false
    8587 config_file=.mrun.config
    8688 host=all
     
    122124
    123125    # SHELLSCRIPT-OPTIONEN EINLESEN
    124  while  getopts  :c:h:m:rs:  option
     126 while  getopts  :c:h:m:rs:u  option
    125127 do
    126128   case  $option  in
     
    130132       (r)   remote_mode=batch;;
    131133       (s)   suf=$OPTARG;;
     134       (u)   compile_utility_programs=true;;
    132135       (\?)  printf "\n  +++ unknown option $OPTARG \n";
    133136             locat=parameter; exit;;
     
    754757    fi
    755758
     759    remote_ud=${remote_source_path}/../UTIL
    756760
    757761       # REMOTE-PFAD FUER MAKE-DEPOSITORY ERMITTELN
     
    12221226
    12231227
     1228             # GLEICHE AKTIONEN FUER DIE UTILITY-PROGRAMME DURCHFUEHREN
     1229             # AKTUELLE QUELLTEXTVERSION INS REMOTE-QUELLTEXTVERZEICHNIS KOPIEREN
     1230             # FALLS DIESES NOCH NICHT EXISTIERT, WIRD ES ERZEUGT
     1231          if [[ $compile_utility_programs = true ]]
     1232          then
     1233
     1234             echo "  *** copying utility programs to \"${remote_addres}:${remote_ud}/\" "
     1235             cd  ${local_source_path}/../UTIL
     1236             echo "      remote_ud=\"$remote_ud\" "
     1237
     1238             if [[ $remote_host != lctit ]]
     1239             then
     1240                ssh  ${remote_username}@${remote_addres} "[[ ! -d ${remote_ud} ]]  &&  (echo \"  *** ${remote_ud} will be created\"; mkdir -p  ${remote_ud})"
     1241             else
     1242                   # TIT ERLAUBT NUR DIE AUSFÜHRUNG GANZ BESTIMMTER KOMMANDOS
     1243                   # MIT SSH, DESHALB AUFRUF PER PIPE
     1244                print "[[ ! -d ${remote_ud} ]]  &&  (echo \"  *** ${remote_ud} will be created\"; mkdir -p  ${remote_ud})"  |  ssh ${remote_username}@${remote_addres}  2>&1
     1245             fi
     1246
     1247             if [[ $local_host = decalpha ]]
     1248             then
     1249                   # DECALPHA BENUTZT BEI NICHTANGABE DES VOLLSTÄNDIGEN PFADES
     1250                   # IRGENDEIN ANDERES SCP (WAS NICHT FUNKTIONIERT). AUSSERDEM
     1251                   # KOENNEN DOLLAR-ZEICHEN NICHT BENUTZT WERDEN
     1252                remote_ud=`echo $remote_ud | sed 's/\$HOME\///'`
     1253                /bin/scp  Makefile  *.f90  ${remote_username}@${remote_addres}:${remote_ud}
     1254             else
     1255                scp  Makefile  *.f90  ${remote_username}@${remote_addres}:${remote_ud}
     1256             fi
     1257
     1258
     1259
     1260                # MAKE MIT ZUVOR ERMITTELTEN OPTIONEN AUF REMOTE RECHNER AUSFUEHREN
     1261                # KOMMANDOUEBERGABE AN SSH PER PIPE, DA SO DIE SYSTEM- UND
     1262                # BENUTZERPROFILE VOLLSTAENDIG AUSGEFUEHRT WERDEN (SONST FEHLEN MAKE
     1263                # Z.B. DIE PFADE ZUM COMPILER)
     1264             echo "  *** execute \"make\" on remote host"
     1265
     1266             if [[ $remote_host = nech ]]
     1267             then
     1268                make_call_string="sxmake  F90=$compiler_name  COPT=\"$cpp_options\"  F90FLAGS=\"$compiler_options\"  LDFLAGS=\"$loader_options\" "
     1269             else
     1270                make_call_string="make  F90=$compiler_name  COPT=\"$cpp_options\"  F90FLAGS=\"$compiler_options\"  LDFLAGS=\"$loader_options\" "
     1271             fi
     1272
     1273             if [[ $remote_host = ibms  ||  $remote_host = ibmy ]]
     1274             then
     1275
     1276                ssh  ${remote_username}@${remote_addres}  "cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" 2>&1 | tee ${remote_host}_last_make_protokoll
     1277
     1278             elif [[ $remote_host = ibmb  ||  $remote_host = ibmh ]]
     1279             then
     1280
     1281                print "export OBJECT_MODE=64; cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll
     1282
     1283             elif [[ $remote_host = lctit ]]
     1284             then
     1285
     1286                echo  " "  >  ${remote_host}_last_make_protokoll
     1287                while [[ $(cat ${remote_host}_last_make_protokoll | grep -c "Forwarding to N1GE") = 0 ]]
     1288                do
     1289                   print "cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll
     1290                done
     1291
     1292             else
     1293
     1294                print "cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll
     1295
     1296             fi
     1297
     1298             if [[ $(grep -c MAKE_ERROR ${remote_host}_last_make_protokoll) != 0 ]]
     1299             then
     1300                printf "\a\n  +++ error(s) occurred during compiling or linking on host \"$remote_host\" "
     1301                if [[ $silent = false ]]
     1302                then
     1303                   answer=dummy
     1304                   printf "\n"
     1305                   while [[ "$answer" != c  &&  "$answer" != k ]]
     1306                   do
     1307                      printf "  >>> continue / list errors / kill mbuild (c/l/k) ? "
     1308                      read  answer
     1309                      if [[ "$answer" = l ]]
     1310                      then
     1311                         more ${remote_host}_last_make_protokoll
     1312                      fi
     1313                   done
     1314                   if [[ $answer = k ]]
     1315                   then
     1316                      locat=user_abort; exit
     1317                   fi
     1318                fi
     1319             fi
     1320          fi    # ENDE UEBERSETZUNG DER UTILITY-PROGRAMME
     1321
     1322
    12241323             # NUR AUF EINEM HLRN-RECHNER UEBERSETZEN
    12251324          [[ $remote_host = ibmb  ||  $remote_host = ibmh ]]  &&  ibm_hb_done=true
     
    12281327
    12291328             # MAKE MIT ZUVOR ERMITTELTEN OPTIONEN AUF LOKALEM RECHNER AUSFUEHREN
     1329          echo " "
    12301330          echo "  *** execute \"make\" on local host"
    12311331
     
    12601360          tar -cf  ${mainprog}_current_version.tar  *.$suf *.o *.mod
    12611361
     1362
     1363             # COMPILE THE UTILITY PROGRAMS
     1364          if [[ $compile_utility_programs = true ]]
     1365          then
     1366             printf "\n\n"
     1367             echo "  *** compiling the utility programs ..."
     1368             cd ${local_source_path}/../UTIL
     1369             make  F90=$compiler_name  COPT="$cpp_options"  F90FLAGS="$compiler_options"  LDFLAGS="$loader_options"
     1370             cd  -  > /dev/null
     1371          fi
     1372
     1373
    12621374             # NUR EINMAL AUF LCMUK UEBERSETZEN
    12631375          [[ $remote_host = lcmuk ]]  &&  lcmuk_done=true
Note: See TracChangeset for help on using the changeset viewer.