Index: palm/trunk/SCRIPTS/palmbuild
===================================================================
--- palm/trunk/SCRIPTS/palmbuild	(revision 3210)
+++ palm/trunk/SCRIPTS/palmbuild	(revision 3236)
@@ -27,4 +27,11 @@
 # -----------------
 # $Id$
+# "host identifier" in header output renamed "config. identifier",
+# host_configuration renamed configuration_identifier,
+# jobname renamed run_identifier
+# header output of PALM code revision,
+# options -m, -s, and -S removed
+# 
+# 3210 2018-08-28 07:31:13Z sward
 # Bugfix: agent_preprocessing stays in MAKE_DEPOSITORY after compilation
 # 
@@ -77,5 +84,6 @@
  column1=""
  column2=""
- host_configuration=default
+ configuration_identifier=default
+ global_revision=""
  locat=normal
  makefile=""
@@ -95,5 +103,5 @@
     # ERROR HANDLING
     # IN CASE OF EXIT:
- trap 'rm -rf  ${source_path}/${host_configuration}_last_make_protocol
+ trap 'rm -rf  ${source_path}/${configuration_identifier}_last_make_protocol
        if [[ $locat != normal ]]
        then
@@ -112,5 +120,5 @@
     # IN CASE OF TERMINAL-BREAK:
  trap 'printf "\n\n +++ palmbuild killed by \"^C\" \n\n"
-       rm  ${source_path}/${host_configuration}_last_make_protocol
+       rm  ${source_path}/${configuration_identifier}_last_make_protocol
        exit
       ' 2
@@ -119,12 +127,9 @@
 
     # READ SHELLSCRIPT-OPTIONS
- while  getopts  :d:h:m:s:S:uvV  option
+ while  getopts  :d:h:uvV  option
  do
    case  $option  in
-       (d)   jobname=$OPTARG;;
-       (h)   host_configuration=$OPTARG;;
-       (m)   makefile=$OPTARG;;
-       (s)   suf=$OPTARG;;
-       (S)   source_list="$OPTARG";;
+       (d)   run_identifier=$OPTARG;;
+       (h)   configuration_identifier=$OPTARG;;
        (v)   silent=true;;
        (V)   use_existing_sources_folder=true;;
@@ -135,11 +140,12 @@
 
 
-    # FOR COMPATIBILITY REASONS SET OLD ENVIRONMENT VARIABLE
- export fname=$jobname
+    # FOR COMPATIBILITY REASONS SET OLD ENVIRONMENT VARIABLES
+ export fname=$run_identifier
+ export jobname=$run_identifier
 
 
     # BUILD THE CONFIGURATION-FILE NAME AND THE SOURCES_FOR_RUN-FOLDER NAME
- config_file=.palm.config.$host_configuration
- sources_for_run_catalog=SOURCES_FOR_RUN_${host_configuration}_$jobname
+ config_file=.palm.config.$configuration_identifier
+ sources_for_run_catalog=SOURCES_FOR_RUN_${configuration_identifier}_$run_identifier
 
 
@@ -249,5 +255,5 @@
 
     # CHECK MAKEFILE
- [[ "$makefile" = "" ]]  &&  makefile=$source_path/Makefile
+ makefile=$source_path/Makefile
  if [[ ! -f $makefile ]]
  then
@@ -312,11 +318,17 @@
 
     line=`grep %base_directory $config_file`
-    make_depository=`echo $line | cut -d" " -s -f2`/MAKE_DEPOSITORY_${host_configuration}
+    make_depository=`echo $line | cut -d" " -s -f2`/MAKE_DEPOSITORY_${configuration_identifier}
 
  else
 
-    make_depository=${base_directory}/MAKE_DEPOSITORY_${host_configuration}
-
- fi
+    make_depository=${base_directory}/MAKE_DEPOSITORY_${configuration_identifier}
+
+ fi
+
+
+    # GET THE GLOBAL REVISION-NUMBER OF THE SVN-REPOSITORY
+ global_revision=`svnversion $source_path  2>/dev/null`
+ global_revision="Rev: $global_revision"
+
 
     # HEADER-OUTPUT (PART1: MESSAGES CONCERNING THE LOCAL HOST)
@@ -327,4 +339,5 @@
     printf "#------------------------------------------------------------------------# \n"
     printf "| %-40s%30s | \n" "$version" "$calltime"
+    printf "| %-40s%30s | \n" "PALM code       $global_revision" " "
     printf "|                                                                        | \n"
     printf "| %-13s%-57s | \n" "called on:" "$(hostname) (IP:$local_ip)"
@@ -363,11 +376,11 @@
     if [[ "$remote_ip" != "" ]]
     then
-       column2="$host_configuration"
-       printf "| %-20s%-50s | \n" "host configuration:" "$column2"
+       column2="$configuration_identifier"
+       printf "| %-20s%-50s | \n" "config. identifier:" "$column2"
        column2=$(echo "$make_depository" | cut -c1-50 )
        printf "| %-20s%-50s | \n" "remote depository:" "$column2"
     else
-       column2="$host_configuration"
-       printf "| %-20s%-50s | \n" "host identifier:" "$column2"
+       column2="$configuration_identifier"
+       printf "| %-20s%-50s | \n" "config. identifier:" "$column2"
        column2=$(echo "$make_depository" | cut -c1-50 )
        printf "| %-20s%-50s | \n" "local depository:" "$column2"
@@ -496,5 +509,5 @@
 
        # NEXT IS THE BRANCH FOR CREATING THE MAKE_DEPOSITORY_...
-    if [[ "$jobname" = "" ]]
+    if [[ "$run_identifier" = "" ]]
     then
 
@@ -543,10 +556,10 @@
        fi
        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 ${host_configuration}_last_make_protocol
-
-       if [[ $(grep -c MAKE_ERROR ${host_configuration}_last_make_protocol) != 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 ${configuration_identifier}_last_make_protocol
+
+       if [[ $(grep -c MAKE_ERROR ${configuration_identifier}_last_make_protocol) != 0 ]]
        then
           printf "\a\n  +++ error(s) occurred during compiling or linking of utilities"
-          printf "\n      for host configuration \"$host_configuration\" "
+          printf "\n      for host configuration \"$configuration_identifier\" "
           if [[ $silent = false ]]
           then
@@ -559,5 +572,5 @@
                 if [[ "$answer" = l ]]
                 then
-                   more ${host_configuration}_last_make_protocol
+                   more ${configuration_identifier}_last_make_protocol
                 fi
              done
@@ -582,9 +595,9 @@
        fi
        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 ${host_configuration}_last_make_protocol
-
-       if [[ $(grep -c MAKE_ERROR ${host_configuration}_last_make_protocol) != 0 ]]
-       then
-          printf "\a\n  +++ error(s) occurred during compiling or linking for host configuration \"$host_configuration\" "
+       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 ${configuration_identifier}_last_make_protocol
+
+       if [[ $(grep -c MAKE_ERROR ${configuration_identifier}_last_make_protocol) != 0 ]]
+       then
+          printf "\a\n  +++ error(s) occurred during compiling or linking for host configuration \"$configuration_identifier\" "
           if [[ $silent = false ]]
           then
@@ -597,5 +610,5 @@
                 if [[ "$answer" = l ]]
                 then
-                   more ${host_configuration}_last_make_protocol
+                   more ${configuration_identifier}_last_make_protocol
                 fi
              done
@@ -621,13 +634,13 @@
        # INCLUDING E.G. USER-INTERFACE ROUTINES. ALSO ADD OTHER UTILITY EXECUTABLES. EVERYTHING IS
        # COLLECTED IN DIRECTORY SOURCES_FOR_RUN_...
-    elif [[ "$jobname" != "" ]]
+    elif [[ "$run_identifier" != "" ]]
     then
 
           # FIRST CHECK, IF COMPILED SOURCES FOR THIS RUN IDENTIFIER EXISTS
           # AND ASK, IF THEY SHALL BE USED
-       echo  "[[ -d ${fast_io_catalog}/${sources_for_run_catalog} ]]  &&  echo sources for run found" | ssh  -q  $ssh_key  ${remote_username}@${remote_ip} 2>&1  >  ${host_configuration}_last_make_protocol
-       if [[ $(grep -c "sources for run found" ${host_configuration}_last_make_protocol) != 0  &&  $use_existing_sources_folder = true ]]
-       then
-          printf "\a\n  *** compiled sources for run \"$jobname\" found on remote host in folder"
+       echo  "[[ -d ${fast_io_catalog}/${sources_for_run_catalog} ]]  &&  echo sources for run found" | ssh  -q  $ssh_key  ${remote_username}@${remote_ip} 2>&1  >  ${configuration_identifier}_last_make_protocol
+       if [[ $(grep -c "sources for run found" ${configuration_identifier}_last_make_protocol) != 0  &&  $use_existing_sources_folder = true ]]
+       then
+          printf "\a\n  *** compiled sources for run \"$run_identifier\" found on remote host in folder"
           printf "\n      ${fast_io_catalog}/${sources_for_run_catalog}"
           printf "\n      will be used!"
@@ -638,5 +651,5 @@
        if [[ $silent = false ]]
        then
-          printf "\n  *** copy MAKE_DEPOSITORY_${host_configuration} on remote host to $sources_for_run_catalog \n"
+          printf "\n  *** copy MAKE_DEPOSITORY_${configuration_identifier} on remote host to $sources_for_run_catalog \n"
        fi
        echo  "rm -rf ${fast_io_catalog}/${sources_for_run_catalog}; mkdir -p ${fast_io_catalog}/${sources_for_run_catalog}; cp ${make_depository}/${program_name}_current_version.tar  ${fast_io_catalog}/${sources_for_run_catalog}; cd ${fast_io_catalog}/${sources_for_run_catalog}; tar xf ${program_name}_current_version.tar"  |  ssh  -q  $ssh_key  ${remote_username}@${remote_ip}  2>&1
@@ -663,9 +676,9 @@
              echo "  *** execute \"make\" on remote host"
           fi
-          echo "$login_init_cmd $module_commands cd ${fast_io_catalog}/${sources_for_run_catalog}; 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_configuration}_last_make_protocol
-
-          if [[ $(grep -c MAKE_ERROR ${host_configuration}_last_make_protocol) != 0 ]]
+          echo "$login_init_cmd $module_commands cd ${fast_io_catalog}/${sources_for_run_catalog}; 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 ${configuration_identifier}_last_make_protocol
+
+          if [[ $(grep -c MAKE_ERROR ${configuration_identifier}_last_make_protocol) != 0 ]]
           then
-             printf "\a\n  +++ error(s) occurred during compiling or linking for host configuration \"$host_configuration\" "
+             printf "\a\n  +++ error(s) occurred during compiling or linking for host configuration \"$configuration_identifier\" "
              if [[ $silent = false ]]
              then
@@ -678,5 +691,5 @@
                    if [[ "$answer" = l ]]
                    then
-                      more ${host_configuration}_last_make_protocol
+                      more ${configuration_identifier}_last_make_protocol
                    fi
                 done
@@ -701,5 +714,5 @@
     fi
 
-    rm -rf  ${source_path}/${host_configuration}_last_make_protocol
+    rm -rf  ${source_path}/${configuration_identifier}_last_make_protocol
 
 
@@ -710,5 +723,5 @@
        # NEXT IS THE BRANCH FOR CREATING THE MAKE_DEPOSITORY_... ON THE
        # LOCAL HOST
-    if [[ "$jobname" = "" ]]
+    if [[ "$run_identifier" = "" ]]
     then
 
@@ -774,9 +787,9 @@
        fi
 
-       make  $make_options  PROG=$program_name  F90=$compiler_name  COPT="$cpp_options"  F90FLAGS="$compiler_options"  LDFLAGS="$linker_options"  2>&1 | tee ${host_configuration}_last_make_protocol
+       make  $make_options  PROG=$program_name  F90=$compiler_name  COPT="$cpp_options"  F90FLAGS="$compiler_options"  LDFLAGS="$linker_options"  2>&1 | tee ${configuration_identifier}_last_make_protocol
 
        if [[ $? != 0 ]]
        then
-          printf "\a\n  +++ error(s) occurred during compiling or linking for host configuration \"$host_configuration\" "
+          printf "\a\n  +++ error(s) occurred during compiling or linking for host configuration \"$configuration_identifier\" "
           if [[ $silent = false ]]
           then
@@ -789,5 +802,5 @@
                 if [[ "$answer" = l ]]
                 then
-                   more ${host_configuration}_last_make_protocol
+                   more ${configuration_identifier}_last_make_protocol
                 fi
              done
@@ -820,5 +833,5 @@
        if [[ -d ${fast_io_catalog}/${sources_for_run_catalog}  &&  $use_existing_sources_folder = true ]]
        then
-          printf "\a\n  *** compiled sources for run \"$jobname\" found on local host in folder"
+          printf "\a\n  *** compiled sources for run \"$run_identifier\" found on local host in folder"
           printf "\n      ${fast_io_catalog}/${sources_for_run_catalog}"
           printf "\n      will be used!"
@@ -831,5 +844,5 @@
           printf "\n  +++ directory for local make depository:"
           printf "\n           $make_depository"
-          printf "\n      not found. Please run \"palmbuild -h $host_configuration\" "
+          printf "\n      not found. Please run \"palmbuild -h $configuration_identifier\" "
           locat=make_depository; exit
        fi
@@ -839,5 +852,5 @@
        if [[ $silent = false ]]
        then
-          printf "\n  *** copy MAKE_DEPOSITORY_${host_configuration} on local host to "
+          printf "\n  *** copy MAKE_DEPOSITORY_${configuration_identifier} on local host to "
           printf "\n      ${fast_io_catalog}/${sources_for_run_catalog} \n"
        fi
@@ -875,5 +888,5 @@
           then
 
-             printf "\a\n  +++ error(s) occurred during compiling or linking for host configuration \"$host_configuration\" "
+             printf "\a\n  +++ error(s) occurred during compiling or linking for host configuration \"$configuration_identifier\" "
              if [[ $silent = false ]]
              then
