smalltalk
branchjv
changeset 1525 0275f69b9d05
parent 1512 507674c6d84b
child 1527 c882cd8db4f7
--- a/smalltalk	Wed Aug 16 13:23:08 2017 +0200
+++ b/smalltalk	Mon Oct 16 20:18:26 2017 +0100
@@ -9,7 +9,7 @@
 
 # In previous versions, smalltalk used to be the executable itself.
 # This lead to problems on systems, where things like LD_LIBRARY_PATH
-# should be set in advance. 
+# should be set in advance.
 # Now, here is a place to do such things ...
 
 #
@@ -17,7 +17,7 @@
 #         to avoid executing another stx from some directory along the PATH
 #         (i.e to force use: ./smalltalk -x ./stx)
 #
-# -X name specifies an explicit path to the stx executable 
+# -X name specifies an explicit path to the stx executable
 #         to avoid executing another stx from some directory along the PATH
 #         (i.e to force use: ./smalltalk -X .)
 #         [almost the same as above]
@@ -26,19 +26,20 @@
 #
 # all other args go to stx & the user classes
 #
+STX_VERSION=6.2.6
 
 STX_EXE=stx
 STX_BIN_DIR=$(dirname $0)
 DEBUGGER=
 
 if ! test -f "$STX_BIN_DIR/Make.proto"; then
-	# Running in Smalltalk/X jv-branch deployment mode
-	VERSION=6.2.6
-    STX_HOME="$STX_BIN_DIR/.."
-	STX_TOPDIR="$STX_HOME/lib/smalltalkx/$VERSION"
+	# Running in Smalltalk/X jv-branch from and "installation tree"
+    	STX_HOME="$STX_BIN_DIR/.."
+	STX_TOPDIR="$STX_HOME/lib/smalltalkx/$STX_VERSION"
 	STX_LIBDIR="$STX_TOPDIR/lib"
 	STX_PACKAGEDIR="$STX_TOPDIR%/packages"
 	STX_EXE="$STX_TOPDIR/bin/stx-bin"
+	export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$STX_LIBDIR/lib"
 fi
 
 if [ "$STX_LIBDIR" != "" ]
@@ -110,9 +111,9 @@
 
 
 if [ "$1" = "--help" ]
-then    
+then
     echo "
-usage: $(basename $0) [-x prog] [-X dir] [--ldd] [--gdb] 
+usage: $(basename $0) [-x prog] [-X dir] [--ldd] [--gdb]
 
 args to startup script:
    -x prog ................ use prog instead of stx as executable
@@ -125,7 +126,7 @@
                             use this to profile some benchmark
    --callgrind-startup .... run under callgrind profiler tool with profiling on
                             - use this to profile VM startup
-   --stap SCRIPT .......... run given systemtap script, passing stx command as 
+   --stap SCRIPT .......... run given systemtap script, passing stx command as
                             stap -c 'stx ...' Systemtap may not be compiled in.
 "
 fi
@@ -186,7 +187,7 @@
 if [ "$1" = "--stap" ]
 then
     shift
-    if [ -z "$1" ]; then 
+    if [ -z "$1" ]; then
         echo "--stap requires systemtap script to run"
         exit 1
     fi
@@ -240,42 +241,7 @@
 fi
 
 #
-# my own libs may be found in STX_LIBDIR/lib
-# STX_LIBDIR is to be set to the top of the smalltalk installation
-# (i.e. where all the .rc files are located)
-#
-
-if [ "$STX_LIBDIR" != "" ]
-then
-    if [ "$STX_LIBDIR" != "/usr/local/smalltalk" ]
-    then
-    LD_LIBRARY_PATH=$STX_LIBDIR:$STX_LIBDIR/lib:$LD_LIBRARY_PATH
-    SHLIB_PATH=$STX_LIBDIR:$STX_LIBDIR/lib:$SHLIB_PATH
-    fi
-else
-    STX_LIBDIR=$STX_BIN_DIR
-fi
-
-#
-# and in STX_BIN_DIR
-#
-
-if [ "$STX_BIN_DIR" != "" ]
-then
-    if [ "$STX_BIN_DIR" != "/usr/local/bin" ]
-    then
-    LD_LIBRARY_PATH=$STX_BIN_DIR:$LD_LIBRARY_PATH
-    SHLIB_PATH=$STX_BIN_DIR:$SHLIB_PATH
-    fi
-fi
-
-LD_LIBRARY_PATH=.:./lib:$LD_LIBRARY_PATH
-SHLIB_PATH=.:./lib:$SHLIB_PATH
-export LD_LIBRARY_PATH
-export SHLIB_PATH
-
-#
-# if started via ./smalltalk, prepend . to the PATH 
+# if started via ./smalltalk, prepend . to the PATH
 # (to allow test of ./stx even when stx is found along the PATH)
 #
 case $0 in
@@ -326,7 +292,7 @@
 #
 # how did HP mess up things so badly ?
 # It takes a veeeery long time for stx to start
-# (the spinning wheel is shown when stx's main 
+# (the spinning wheel is shown when stx's main
 #  starts to run - all the time in between is
 #  spent in the systems loader ...)
 #