Index: palm/trunk/SCRIPTS/palmbuild
===================================================================
--- palm/trunk/SCRIPTS/palmbuild	(revision 2412)
+++ palm/trunk/SCRIPTS/palmbuild	(revision 2420)
@@ -45,7 +45,5 @@
  column1=""
  column2=""
- config_file=.palm.config
- host=default
- host_found=false
+ host_identifier=default
  locat=normal
  makefile=""
@@ -86,5 +84,5 @@
    case  $option  in
        (d)   fname=$OPTARG;;
-       (h)   host=$OPTARG;;
+       (h)   host_identifier=$OPTARG;;
        (m)   makefile=$OPTARG;;
        (s)   suf=$OPTARG;;
@@ -98,5 +96,5 @@
 
     # BUILD THE CONFIGURATION-FILE NAME
- config_file=${config_file}.$host
+ config_file=.palm.config.$host_identifier
 
 
@@ -256,7 +254,4 @@
     fi
 
-    [[ "$remote_hostname" = "" ]]  &&  remote_hostname=$remote_ip 
-
-
        # GET SOURCE AND DEPOSITORY PATH ON THE REMOTE MACHINE WITHOUT EVALUATING
        # THE $
@@ -272,9 +267,9 @@
 
     line=`grep %base_directory $config_file`
-    make_depository=`echo $line | cut -d" " -s -f2`/MAKE_DEPOSITORY_${host}
+    make_depository=`echo $line | cut -d" " -s -f2`/MAKE_DEPOSITORY_${host_identifier}
 
  else
 
-    make_depository=${base_directory}/MAKE_DEPOSITORY_${host}
+    make_depository=${base_directory}/MAKE_DEPOSITORY_${host_identifier}
 
  fi
@@ -286,5 +281,5 @@
  printf "| %-40s%30s | \n" "$version" "$calltime"
  printf "|                                                                        | \n"
- printf "| %-13s%-57s | \n" "called on:" "$local_hostname"
+ printf "| %-13s%-57s | \n" "called on:" "$(hostname) (IP:$local_ip)"
  column2=$(echo $config_file | cut -c1-57 )
  printf "| %-13s%-57s | \n" "config file:" "$column2"
@@ -337,5 +332,5 @@
 
     # GET CONFIRMATION TO CONTINUE
- printf "\n  *** update will be made for host \"$host\" "
+ printf "\n  *** update will be made for host \"$host_identifier\" "
 
 
@@ -362,12 +357,12 @@
     if [[ "$remote_ip" != "" ]]
     then
-       column2=$remote_hostname
-       printf "| %-20s%-50s | \n" "remote host:" "$column2"
+       column2="$host_identifier"
+       printf "| %-20s%-50s | \n" "host identifier:" "$column2"
        printf "|                                                                        | \n"
        column2=$(echo "$make_depository" | cut -c1-50 )
        printf "| %-20s%-50s | \n" "remote depository:" "$column2"
     else
-       column2=$local_hostname
-       printf "| %-20s%-50s | \n" "local host:" "$column2"
+       column2="$host_identifier"
+       printf "| %-20s%-50s | \n" "host identifier:" "$column2"
        printf "|                                                                        | \n"
        column2=$(echo "$make_depository" | cut -c1-50 )
@@ -513,10 +508,10 @@
           echo "  *** creating utilities on remote host"
           make_call_string="make  -f Makefile_utilities  $make_options  F90=$compiler_name  F90_SER=$compiler_name_ser  COPT=\"$cpp_options\"  F90FLAGS=\"$compiler_options\"  LDFLAGS=\"$linker_options\" "
-          echo "$login_init_cmd $module_commands cd ${make_depository}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  -q  $ssh_key  ${remote_username}@${remote_ip} 2>&1 | tee ${remote_hostname}_last_make_protokoll
-
-          if [[ $(grep -c MAKE_ERROR ${remote_hostname}_last_make_protokoll) != 0 ]]
+          echo "$login_init_cmd $module_commands cd ${make_depository}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  -q  $ssh_key  ${remote_username}@${remote_ip} 2>&1 | tee ${host_identifier}_last_make_protokoll
+
+          if [[ $(grep -c MAKE_ERROR ${host_identifier}_last_make_protokoll) != 0 ]]
           then
              printf "\a\n  +++ error(s) occurred during compiling or linking of utilities"
-             printf "\n      on host \"$remote_hostname\" "
+             printf "\n      for host \"$host_identifier\" "
              if [[ $silent = false ]]
              then
@@ -529,5 +524,5 @@
                    if [[ "$answer" = l ]]
                    then
-                      more ${remote_hostname}_last_make_protokoll
+                      more ${host_identifier}_last_make_protokoll
                    fi
                 done
@@ -547,9 +542,9 @@
           echo "  *** compile PALM sources on remote host"
           make_call_string="make  $make_options  PROG=$program_name  F90=$compiler_name  COPT=\"$cpp_options\"  F90FLAGS=\"$compiler_options\"  LDFLAGS=\"$linker_options\" "
-          echo "$login_init_cmd $module_commands cd ${make_depository}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  -q  $ssh_key  ${remote_username}@${remote_ip} 2>&1 | tee ${remote_hostname}_last_make_protokoll
-
-          if [[ $(grep -c MAKE_ERROR ${remote_hostname}_last_make_protokoll) != 0 ]]
-          then
-             printf "\a\n  +++ error(s) occurred during compiling or linking on host \"$remote_hostname\" "
+          echo "$login_init_cmd $module_commands cd ${make_depository}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  -q  $ssh_key  ${remote_username}@${remote_ip} 2>&1 | tee ${host_identifier}_last_make_protokoll
+
+          if [[ $(grep -c MAKE_ERROR ${host_identifier}_last_make_protokoll) != 0 ]]
+          then
+             printf "\a\n  +++ error(s) occurred during compiling or linking for host \"$host_identifier\" "
              if [[ $silent = false ]]
              then
@@ -562,5 +557,5 @@
                    if [[ "$answer" = l ]]
                    then
-                      more ${remote_hostname}_last_make_protokoll
+                      more ${host_identifier}_last_make_protokoll
                    fi
                 done
@@ -584,14 +579,15 @@
 
              # FIRST CHECK, IF A DEPOSITORY EXISTS ON THE REMOTE MACHINE
-          echo  "[[ ! -d ${make_depository} ]]  &&  echo depository not found" | ssh  -q  $ssh_key  ${remote_username}@${remote_ip} 2>&1 | tee ${remote_hostname}_last_make_protokoll
+          echo  "[[ ! -d ${make_depository} ]]  &&  echo depository not found" | ssh  -q  $ssh_key  ${remote_username}@${remote_ip} 2>&1 | tee ${host_identifier}_last_make_protokoll
 
 
              # COPY MAKE DEPOSITORY ON REMOTE MACHINE TO SOURCES_FOR_RUN_...
-          printf "\n  *** copy MAKE_DEPOSITORY_${host} on remote host to SOURCES_FOR_RUN_$fname \n"
+          printf "\n  *** copy MAKE_DEPOSITORY_${host_identifier} on remote host to SOURCES_FOR_RUN_$fname \n"
           echo  "rm -rf $fast_io_catalog/SOURCES_FOR_RUN_$fname; mkdir -p $fast_io_catalog/SOURCES_FOR_RUN_$fname; cp ${make_depository}/${program_name}_current_version.tar  $fast_io_catalog/SOURCES_FOR_RUN_$fname; cd $fast_io_catalog/SOURCES_FOR_RUN_$fname; tar xf ${program_name}_current_version.tar"  |  ssh  -q  $ssh_key  ${remote_username}@${remote_ip}  2>&1
 
 
              # COPY CONTENTS OF SOURCES_FOR_RUN_... TO SOURCES_FOR_RUN_... ON THE REMOTE MACHINE
-          printf "\n  *** copy $base_directory/SOURCES_FOR_RUN_$fname to SOURCES_FOR_RUN_$fname on remote host \n"
+          printf "\n  *** copy $base_directory/SOURCES_FOR_RUN_$fname"
+          printf "\n      to SOURCES_FOR_RUN_$fname on remote host \n"
           scp  -q  $ssh_key  $base_directory/SOURCES_FOR_RUN_$fname/{*,.[!.]*}  ${remote_username}@${remote_ip}:${fast_io_catalog}/SOURCES_FOR_RUN_$fname
 
@@ -605,9 +601,9 @@
              [[ "$module_commands" != "" ]]  &&  module_commands=${module_commands}";"
              echo "  *** execute \"make\" on remote host"
-             echo "$login_init_cmd $module_commands cd ${fast_io_catalog}/SOURCES_FOR_RUN_$fname; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  -q  $ssh_key  ${remote_username}@${remote_ip} 2>&1 | tee ${remote_hostname}_last_make_protokoll
-
-             if [[ $(grep -c MAKE_ERROR ${remote_hostname}_last_make_protokoll) != 0 ]]
+             echo "$login_init_cmd $module_commands cd ${fast_io_catalog}/SOURCES_FOR_RUN_$fname; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  -q  $ssh_key  ${remote_username}@${remote_ip} 2>&1 | tee ${host_identifier}_last_make_protokoll
+
+             if [[ $(grep -c MAKE_ERROR ${host_identifier}_last_make_protokoll) != 0 ]]
              then
-                printf "\a\n  +++ error(s) occurred during compiling or linking on host \"$remote_hostname\" "
+                printf "\a\n  +++ error(s) occurred during compiling or linking for host \"$host_identifier\" "
                 if [[ $silent = false ]]
                 then
@@ -620,5 +616,5 @@
                       if [[ "$answer" = l ]]
                       then
-                         more ${remote_hostname}_last_make_protokoll
+                         more ${host_identifier}_last_make_protokoll
                       fi
                    done
@@ -638,5 +634,5 @@
        fi
 
-       rm -rf  ${remote_hostname}_last_make_protokoll
+       rm -rf  ${host_identifier}_last_make_protokoll
 
 
@@ -698,9 +694,9 @@
           echo "  *** compile PALM sources on local host"
 
-          make  $make_options  PROG=$program_name  F90=$compiler_name  COPT="$cpp_options"  F90FLAGS="$compiler_options"  LDFLAGS="$linker_options"  2>&1 | tee ${local_hostname}_last_make_protokoll
+          make  $make_options  PROG=$program_name  F90=$compiler_name  COPT="$cpp_options"  F90FLAGS="$compiler_options"  LDFLAGS="$linker_options"  2>&1 | tee ${host_identifier}_last_make_protokoll
 
           if [[ $? != 0 ]]
           then
-             printf "\a\n  +++ error(s) occurred during compiling or linking on host \"$local_hostname\" "
+             printf "\a\n  +++ error(s) occurred during compiling or linking for host \"$host_identifier\" "
              if [[ $silent = false ]]
              then
@@ -713,5 +709,5 @@
                    if [[ "$answer" = l ]]
                    then
-                      more ${local_hostname}_last_make_protokoll
+                      more ${host_identifier}_last_make_protokoll
                    fi
                 done
@@ -739,5 +735,5 @@
              printf "\n  +++ directory for local make depository:"
              printf "\n           $make_depository"
-             printf "\n      not found. Please run \"palmbuild -h $host\" "
+             printf "\n      not found. Please run \"palmbuild -h $host_identifier\" "
              locat=make_depository; exit
           fi
@@ -745,5 +741,5 @@
 
              # COPY MAKE DEPOSITORY ON LOCAL MACHINE TO SOURCES_FOR_RUN_...
-          printf "\n  *** copy MAKE_DEPOSITORY_${host} on local host to "
+          printf "\n  *** copy MAKE_DEPOSITORY_${host_identifier} on local host to "
           printf "\n      $fast_io_catalog/SOURCES_FOR_RUN_$fname \n"
           rm -rf $fast_io_catalog/SOURCES_FOR_RUN_$fname
@@ -774,5 +770,5 @@
              then
 
-                printf "\a\n  +++ error(s) occurred during compiling or linking on host \"$local_hostname\" "
+                printf "\a\n  +++ error(s) occurred during compiling or linking for host \"$host_identifier\" "
                 if [[ $silent = false ]]
                 then
