]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* tests/static.at: Forgot to fix PATH for the first
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 25 Feb 2007 19:18:35 +0000 (19:18 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 25 Feb 2007 19:18:35 +0000 (19:18 +0000)
func_test_exec invocation.  So factor out into new functions
func_fix_path and func_restore_path and use those.

ChangeLog
tests/static.at

index 2f6b1fbf8c11aec763d58f1f0832e2814329329b..af110b497b28a10440792e317b1a158f5246a1fb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2007-02-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       * tests/static.at: Forgot to fix PATH for the first
+       func_test_exec invocation.  So factor out into new functions
+       func_fix_path and func_restore_path and use those.
+
        * README: Document the need for GNU make to build Libtool.
        Point the user to the doc/notes.txt file.  In the examples, use
        `gmake' throughout to make it more obvious.  Explain simpler way
index bcd5d4abc340baf071ccfd3182d9f81bc9bc9124..b51fc2d73e32b792a0aef4b2131ad20bcf7cd1d1 100644 (file)
@@ -105,13 +105,8 @@ mkdir $srcdir_broken $prefix_broken $libdir_broken
   done
 )
 
-# func_move_libs srcdir_to_move prefix_to_move other_prefix other_prefix
-func_move_libs ()
+func_fix_path ()
 {
-  LT_AT_MVDIR(["${1}"], ["${1}-moved"])
-  LT_AT_MVDIR(["${2}"], ["${2}-moved"])
-  LT_AT_MVDIR(["$srcdir_broken"], ["${1}"])
-  LT_AT_MVDIR(["$prefix_broken"], ["${2}"])
   # For w32, hardcoding cannot work, but $libdir/../bin is where binaries
   # usually are installed.  Since we use several prefixes for testing
   # convenience -- it allows us to replace the good libraries easily with
@@ -125,17 +120,32 @@ func_move_libs ()
     save_PATH=$PATH
     sep=
     test -z "$PATH" || sep=:
-    PATH=${3}/bin:${4}/bin:${2}/bin$sep$PATH
+    PATH=${2}/bin:${3}/bin:${1}/bin$sep$PATH
   fi
 
 }
 
-# func_restore_libs srcdir_to_restore prefix_to_restore
-func_restore_libs ()
+func_restore_path ()
 {
   if test "$shlibpath_var" = PATH; then
     PATH=$save_PATH
   fi
+}
+
+# func_move_libs srcdir_to_move prefix_to_move other_prefix other_prefix
+func_move_libs ()
+{
+  LT_AT_MVDIR(["${1}"], ["${1}-moved"])
+  LT_AT_MVDIR(["${2}"], ["${2}-moved"])
+  LT_AT_MVDIR(["$srcdir_broken"], ["${1}"])
+  LT_AT_MVDIR(["$prefix_broken"], ["${2}"])
+  func_fix_path ${2} ${3} ${4}
+}
+
+# func_restore_libs srcdir_to_restore prefix_to_restore
+func_restore_libs ()
+{
+  func_restore_path
   LT_AT_MVDIR(["${2}"], ["$prefix_broken"])
   LT_AT_MVDIR(["${1}"], ["$srcdir_broken"])
   LT_AT_MVDIR(["${2}-moved"], ["${2}"])
@@ -294,7 +304,10 @@ for withdep in no yes; do
 
 
   ### Run each program once so that relinking has happened.
+  
+  func_fix_path $prefix1 $prefix2 $prefix3
   func_test_exec -static -static-libtool-libs -all-static `$per_deplib && echo 1 2 3 12 13 23 31 123 123a`
+  func_restore_path
 
   # For each library:
   # - remove the library images to catch failure to link statically/dynamically,