* 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.
This commit is contained in:
Ralf Wildenhues 2007-02-25 19:18:35 +00:00
parent 2c25fb4d3c
commit e4a33a7ab5
2 changed files with 27 additions and 10 deletions

View File

@ -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

View 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_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 ()
{
if test "$shlibpath_var" = PATH; then
PATH=$save_PATH
fi
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,