Changeset 22 for palm/trunk/SCRIPTS/mbuild_new
- Timestamp:
- Feb 28, 2007 7:37:45 AM (18 years ago)
- Location:
- palm/trunk/SCRIPTS
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS
-
Property
svn:ignore
set to
*.x
-
Property
svn:ignore
set to
-
palm/trunk/SCRIPTS/mbuild_new
r9 r22 1 1 #!/bin/ksh 2 # mbuild - Programmuebersetzungsscript Version: @(#)MBUILD 1.0 10/02/072 # mbuild - Programmuebersetzungsscript Version: @(#)MBUILD 1.0 28/02/07 3 3 4 4 # Prozedur zur Uebersetzung von Programmteilen mittels make-Mechanismus … … 79 79 # 07/02/07 - Siggi - adapted for RIAM (neck) 80 80 # 10/02/07 - Siggi - all hpmuk-related code removed 81 # 28/02/07 - Siggi - compilation of utility programs added (option -u) 81 82 82 83 83 84 84 85 # VARIABLENVEREINBARUNGEN + DEFAULTWERTE 86 compile_utility_programs=false 85 87 config_file=.mrun.config 86 88 host=all … … 122 124 123 125 # SHELLSCRIPT-OPTIONEN EINLESEN 124 while getopts :c:h:m:rs: option126 while getopts :c:h:m:rs:u option 125 127 do 126 128 case $option in … … 130 132 (r) remote_mode=batch;; 131 133 (s) suf=$OPTARG;; 134 (u) compile_utility_programs=true;; 132 135 (\?) printf "\n +++ unknown option $OPTARG \n"; 133 136 locat=parameter; exit;; … … 754 757 fi 755 758 759 remote_ud=${remote_source_path}/../UTIL 756 760 757 761 # REMOTE-PFAD FUER MAKE-DEPOSITORY ERMITTELN … … 1222 1226 1223 1227 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 1224 1323 # NUR AUF EINEM HLRN-RECHNER UEBERSETZEN 1225 1324 [[ $remote_host = ibmb || $remote_host = ibmh ]] && ibm_hb_done=true … … 1228 1327 1229 1328 # MAKE MIT ZUVOR ERMITTELTEN OPTIONEN AUF LOKALEM RECHNER AUSFUEHREN 1329 echo " " 1230 1330 echo " *** execute \"make\" on local host" 1231 1331 … … 1260 1360 tar -cf ${mainprog}_current_version.tar *.$suf *.o *.mod 1261 1361 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 1262 1374 # NUR EINMAL AUF LCMUK UEBERSETZEN 1263 1375 [[ $remote_host = lcmuk ]] && lcmuk_done=true
Note: See TracChangeset
for help on using the changeset viewer.