From: Ralf Wildenhues Date: Sun, 25 Feb 2007 19:18:35 +0000 (+0000) Subject: * tests/static.at: Forgot to fix PATH for the first X-Git-Tag: release-2-1b~166 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4a33a7ab5301a2a6e708635b183f7db0b6a6ebe;p=thirdparty%2Flibtool.git * 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. --- diff --git a/ChangeLog b/ChangeLog index 2f6b1fbf8..af110b497 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2007-02-25 Ralf Wildenhues + * 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 diff --git a/tests/static.at b/tests/static.at index bcd5d4abc..b51fc2d73 100644 --- a/tests/static.at +++ b/tests/static.at @@ -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,