Index: palm/trunk/SCRIPTS/palmbuild
===================================================================
--- palm/trunk/SCRIPTS/palmbuild	(revision 2396)
+++ palm/trunk/SCRIPTS/palmbuild	(revision 2404)
@@ -172,4 +172,19 @@
 
  
+    # CHECK, IF THE BASE DIRECTORY PATH HAS BEEN GIVEN
+ if [[ "$base_directory" = "" ]]
+ then
+    printf "\n  +++ no base directory found in configuration file"
+    locat=config_file; exit
+ else
+    if [[ ! -d $base_directory ]]
+    then
+       printf "\n\n  +++ base directory \"$base_directory\" "
+       printf "\n      does not exist"
+       locat=source_path; exit
+    fi
+ fi
+
+
     # CHECK SOURCE-CODE PATH
  if [[ "$source_path" = "" ]]
@@ -187,12 +202,4 @@
 
 
-    # CHECK DEPOSITORY-PATH
- if [[ "$depository_path" = "" ]]
- then
-    printf "\n  +++ no depository path found in configuration file"
-    locat=config_file; exit
- fi
-
-
     # CHECK MAKEFILE
  [[ "$makefile" = "" ]]  &&  makefile=$source_path/Makefile
@@ -247,4 +254,5 @@
 
     [[ "$remote_hostname" = "" ]]  &&  remote_hostname=$remote_ip 
+
 
        # GET SOURCE AND DEPOSITORY PATH ON THE REMOTE MACHINE WITHOUT EVALUATING
@@ -260,18 +268,10 @@
     fi
 
-    line=`grep %remote_depository_path $config_file`
-    if [[ "$line" != "" ]]
-    then
-       remote_depository_path=`echo $line | cut -d" " -s -f2`
-    else
-       line=`grep %depository_path $config_file`
-       remote_depository_path=`echo $line | cut -d" " -s -f2`
-    fi
-
-    remote_make_depository=${remote_depository_path}/MAKE_DEPOSITORY_${host}
+    line=`grep %base_directory $config_file`
+    make_depository=`echo $line | cut -d" " -s -f2`/MAKE_DEPOSITORY_${host}
 
  else
 
-    local_make_depository=${depository_path}/MAKE_DEPOSITORY_${host}
+    make_depository=${base_directory}/MAKE_DEPOSITORY_${host}
 
  fi
@@ -362,29 +362,21 @@
        printf "| %-20s%-50s | \n" "remote host:" "$column2"
        printf "|                                                                        | \n"
-       column2=$(echo "$remote_make_depository" | cut -c1-50 )
+       column2=$(echo "$make_depository" | cut -c1-50 )
        printf "| %-20s%-50s | \n" "remote depository:" "$column2"
-       line=$(echo "$remote_make_depository" | cut -c51-)
-       while [[ "$line" != "" ]]
-       do
-          column1=""
-          column2=$(echo "$line" | cut -c1-50 )
-          printf "| %-20s%-50s | \n" "$column1" "$column2"
-          line=$(echo "$line" | cut -c51-)
-       done
     else
        column2=$local_hostname
        printf "| %-20s%-50s | \n" "local host:" "$column2"
        printf "|                                                                        | \n"
-       column2=$(echo "$local_make_depository" | cut -c1-50 )
+       column2=$(echo "$make_depository" | cut -c1-50 )
        printf "| %-20s%-50s | \n" "local depository:" "$column2"
-       line=$(echo "$local_make_depository" | cut -c51-)
-       while [[ "$line" != "" ]]
-       do
-          column1=""
-          column2=$(echo "$line" | cut -c1-50 )
-          printf "| %-20s%-50s | \n" "$column1" "$column2"
-          line=$(echo "$line" | cut -c51-)
-       done
-    fi
+    fi
+    line=$(echo "$make_depository" | cut -c51-)
+    while [[ "$line" != "" ]]
+    do
+       column1=""
+       column2=$(echo "$line" | cut -c1-50 )
+       printf "| %-20s%-50s | \n" "$column1" "$column2"
+       line=$(echo "$line" | cut -c51-)
+    done
 
     if [[ "$remote_ip" != "" ]]
@@ -496,8 +488,8 @@
              # COPY CURRENT SOURCE CODE TO SOURCE-CODE DIRECTORY ON THE REMOTE HOST
              # CREATE THIS DIRECTORY, IF IT DOES NOT EXIST
-          echo "  *** copying \"${program_name}_sources.tar\" to \"${remote_ip}:${remote_make_depository}/\" "
-          echo "[[ ! -d ${remote_make_depository} ]]  &&  (echo \"  *** ${remote_make_depository} will be created\"; mkdir -p  ${remote_make_depository})"  |  ssh  -q  $ssh_key ${remote_username}@${remote_ip}  2>&1
-
-          scp  $ssh_key ${source_path}/${program_name}_sources.tar  ${remote_username}@${remote_ip}:${remote_make_depository}/${program_name}_sources.tar
+          echo "  *** copying \"${program_name}_sources.tar\" to \"${remote_ip}:${make_depository}/\" "
+          echo "[[ ! -d ${make_depository} ]]  &&  (echo \"  *** ${make_depository} will be created\"; mkdir -p  ${make_depository})"  |  ssh  -q  $ssh_key ${remote_username}@${remote_ip}  2>&1
+
+          scp  $ssh_key ${source_path}/${program_name}_sources.tar  ${remote_username}@${remote_ip}:${make_depository}/${program_name}_sources.tar
 
 
@@ -505,10 +497,10 @@
              # UNTAR PREVIOUS UPDATE ON REMOTE HOST, IF EXISTING
           echo "  *** untar previous update on remote host, if existing"
-          echo "cd ${remote_make_depository}; [[ -f ${program_name}_current_version.tar ]]  &&  tar -xf  ${program_name}_current_version.tar"  |  ssh  -q  $ssh_key  ${remote_username}@${remote_ip}  2>&1
+          echo "cd ${make_depository}; [[ -f ${program_name}_current_version.tar ]]  &&  tar -xf  ${program_name}_current_version.tar"  |  ssh  -q  $ssh_key  ${remote_username}@${remote_ip}  2>&1
 
 
              # UNTAR CURRENT SOURCES ON REMOTE HOST
           echo "  *** untar current sources on remote host"
-          echo  "cd ${remote_make_depository}; tar -xf  ${program_name}_sources.tar"  |  ssh  -q  $ssh_key  ${remote_username}@${remote_ip}  2>&1
+          echo  "cd ${make_depository}; tar -xf  ${program_name}_sources.tar"  |  ssh  -q  $ssh_key  ${remote_username}@${remote_ip}  2>&1
 
 
@@ -522,5 +514,5 @@
           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 ${remote_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
+          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 ]]
@@ -556,5 +548,5 @@
           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 ${remote_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
+          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 ]]
@@ -583,5 +575,5 @@
              # TAR UPDATED VERSION ON THE REMOTE HOST
           printf "\n  *** tar update on remote host ..."
-          echo  "cd ${remote_make_depository}; chmod u+w *; tar -cf  ${program_name}_current_version.tar  ${program_name}  *.f90 *.o *.mod *.x"  |  ssh  -q  $ssh_key  ${remote_username}@${remote_ip}  2>&1
+          echo  "cd ${make_depository}; chmod u+w *; tar -cf  ${program_name}_current_version.tar  ${program_name}  *.f90 *.o *.mod *.x"  |  ssh  -q  $ssh_key  ${remote_username}@${remote_ip}  2>&1
 
 
@@ -593,15 +585,15 @@
 
              # FIRST CHECK, IF A DEPOSITORY EXISTS ON THE REMOTE MACHINE
-          echo  "[[ ! -d ${remote_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 ${remote_hostname}_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"
-          echo  "rm -rf $tmp_user_catalog/SOURCES_FOR_RUN_$fname; mkdir -p $tmp_user_catalog/SOURCES_FOR_RUN_$fname; cp ${remote_make_depository}/${program_name}_current_version.tar  $tmp_user_catalog/SOURCES_FOR_RUN_$fname; cd $tmp_user_catalog/SOURCES_FOR_RUN_$fname; tar xf ${program_name}_current_version.tar"  |  ssh  -q  $ssh_key  ${remote_username}@${remote_ip}  2>&1
+          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"
-          scp  -q  $ssh_key  $base_directory/SOURCES_FOR_RUN_$fname/{*,.[!.]*}  ${remote_username}@${remote_ip}:${tmp_user_catalog}/SOURCES_FOR_RUN_$fname
+          scp  -q  $ssh_key  $base_directory/SOURCES_FOR_RUN_$fname/{*,.[!.]*}  ${remote_username}@${remote_ip}:${fast_io_catalog}/SOURCES_FOR_RUN_$fname
 
 
@@ -614,5 +606,5 @@
              [[ "$module_commands" != "" ]]  &&  module_commands=${module_commands}";"
              echo "  *** execute \"make\" on remote host"
-             echo "$login_init_cmd $module_commands cd ${tmp_user_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
+             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 ]]
@@ -672,17 +664,17 @@
 
              # CREATE MAKE-DEPOSITORY, IF IT DOES NOT EXIST
-          eval local_make_depository=$local_make_depository
-          if [[ ! -d $local_make_depository ]]
-          then
-             if  mkdir -p $local_make_depository
+          eval make_depository=$make_depository
+          if [[ ! -d $make_depository ]]
+          then
+             if  mkdir -p $make_depository
              then
                 printf "\n\n  *** directory for local make depository:"
-                printf "\n           $local_make_depository"
+                printf "\n           $make_depository"
                 printf "\n      was created\n"
              else
                 printf "\n  +++ directory for local make depository:"
-                printf "\n           $local_make_depository"
+                printf "\n           $make_depository"
                 printf "\n      cannot be created"
-                locat=local_depository_path; exit
+                locat=local_depository; exit
              fi
           fi
@@ -691,6 +683,6 @@
           echo " "
           echo "  *** untar current source sources on local host in"
-          echo "      $local_make_depository"
-          cd  $local_make_depository
+          echo "      $make_depository"
+          cd  $make_depository
           cp  $source_path/${program_name}_sources.tar  .
           tar xf  ${program_name}_sources.tar
@@ -744,10 +736,10 @@
 
              # FIRST CHECK, IF A DEPOSITORY EXISTS ON THE LOCAL MACHINE
-          if [[ ! -d ${local_make_depository} ]]
+          if [[ ! -d ${make_depository} ]]
           then
              printf "\n  +++ directory for local make depository:"
-             printf "\n           $local_make_depository"
+             printf "\n           $make_depository"
              printf "\n      not found. Please run \"palmbuild -h $host\" "
-             locat=local_make_depository; exit
+             locat=make_depository; exit
           fi
 
@@ -755,17 +747,17 @@
              # COPY MAKE DEPOSITORY ON LOCAL MACHINE TO SOURCES_FOR_RUN_...
           printf "\n  *** copy MAKE_DEPOSITORY_${host} on local host to "
-          printf "\n      $tmp_user_catalog/SOURCES_FOR_RUN_$fname \n"
-          rm -rf $tmp_user_catalog/SOURCES_FOR_RUN_$fname
-          mkdir -p $tmp_user_catalog/SOURCES_FOR_RUN_$fname
-          cp ${local_make_depository}/${program_name}_current_version.tar  $tmp_user_catalog/SOURCES_FOR_RUN_$fname
-          cd $tmp_user_catalog/SOURCES_FOR_RUN_$fname
+          printf "\n      $fast_io_catalog/SOURCES_FOR_RUN_$fname \n"
+          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
 
 
              # COPY CONTENTS OF SOURCES_FOR_RUN_... TO SOURCES_FOR_RUN_...
-             # IN THE TMP_USER_CATALOG ON THE LOCAL MACHINE
+             # IN THE FAST_IO_CATALOG ON THE LOCAL MACHINE
           printf "\n  *** copy $base_directory/SOURCES_FOR_RUN_$fname to"
-          printf "\n      $tmp_user_catalog/SOURCES_FOR_RUN_$fname on local host \n"
-          cp  $base_directory/SOURCES_FOR_RUN_$fname/{*,.[!.]*}  ${tmp_user_catalog}/SOURCES_FOR_RUN_$fname
+          printf "\n      $fast_io_catalog/SOURCES_FOR_RUN_$fname on local host \n"
+          cp  $base_directory/SOURCES_FOR_RUN_$fname/{*,.[!.]*}  ${}/SOURCES_FOR_RUN_$fname
 
 
