]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
tests: set bindir and libdir at configure time.
authorGary V. Vaughan <gary@gnu.org>
Thu, 30 Oct 2014 13:13:21 +0000 (13:13 +0000)
committerGary V. Vaughan <gary@gnu.org>
Thu, 30 Oct 2014 14:58:30 +0000 (14:58 +0000)
In particular, openSuSE on x86_64 uses CONFIG_SITE to set libdir
to "${exec_prefix}/lib64", which confuses testcases that check
the contents of "${prefix}/lib".  In general, tests that expect
to find installed files in specific directories should explicitly
set those directories at configure time.
* tests/testsuite.at (LT_AT_CONFIGURE): Make sure exec_prefix,
bindir and libdir point to known subdirectories we can check the
contents of later on in a test case.
(prefixdir): Rename from this...
(prefix): ...to this.  All test cases that set or use the config
prefix directory must now refer to `prefixdir` for the helper
macros in this file to work in hostile build environments such
as CONFIG_SITE setting openSuSE.
* tests/demo.at, tests/depdemo.at, tests/mdemo.at,
tests/tagdemo.at: Adjust accordingly.
Reported by Peter Breitenlohner.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
tests/demo.at
tests/depdemo.at
tests/mdemo.at
tests/tagdemo.at
tests/testsuite.at

index 681bc8bf16d8abbffeaf0bb03c41123b85515820..2222a83e77739d1c99c65b245549e2902d49c23f 100644 (file)
@@ -347,7 +347,7 @@ cos (0.0) = 1
 ** This is not GNU Hello. There is no built-in mail reader. **
 ]])
 
-prefixdir=`pwd`/_inst
+prefix=`pwd`/_inst
 ]) # _LT_DEMO_SETUP
 
 
@@ -367,11 +367,11 @@ AT_CHECK([./helldl$EXEEXT |
 # Run the make install rule, and check that installed binaries work too.
 m4_define([_LT_CHECK_INSTALL],
 [# Windows hosts search for dlls in the command path.
-PATH=$prefixdir/lib:$PATH
+PATH=$prefix/lib:$PATH
 
 LT_AT_CHECK_EXECUTE([install],
-        [$prefixdir/bin/hell_static], [$prefixdir/bin/hell])
-AT_CHECK([$prefixdir/bin/helldl$EXEEXT |
+        [$prefix/bin/hell_static], [$prefix/bin/hell])
+AT_CHECK([$prefix/bin/helldl$EXEEXT |
     $EGREP '(Welcome to .*GNU Hell|unsupported)'], 0, [ignore])
 ])
 
index ae83277ec7700320c6b67b2aa5ebe9b527b8ab2a..19729857f16adcfda65154834e4e52eeefcb8222 100644 (file)
@@ -254,7 +254,7 @@ libm cos (0.0) = 1
 var_l1(4) + var_l2(6) + var_l4(9) == 19
 ]])
 
-prefixdir=`pwd`/_inst
+prefix=`pwd`/_inst
 ]) # _LT_SETUP
 
 
@@ -272,9 +272,9 @@ m4_define([_LT_CHECK_EXECUTE],
 # Run the make install rule, and check that installed binaries work too.
 m4_define([_LT_CHECK_INSTALL],
 [# Windows hosts search for dlls in the command path.
-PATH=$prefixdir/lib:$PATH
+PATH=$prefix/lib:$PATH
 LT_AT_CHECK_EXECUTE([install],
-        [$prefixdir/bin/depdemo_static], [$prefixdir/bin/depdemo])
+        [$prefix/bin/depdemo_static], [$prefix/bin/depdemo])
 ])
 
 
index 6b3c163731fa810c7a361cb76e9e193e1f1d29e8..edcccc5d61ba6a5c71daea217ed2460ea0c71ce2 100644 (file)
@@ -583,7 +583,7 @@ cos (0.0) = 1
 ** This is not GNU Hello. There is no built-in mail reader. **
 ]])
 
-prefixdir=`pwd`/_inst
+prefix=`pwd`/_inst
 ]) # _LT_SETUP
 
 
@@ -609,12 +609,12 @@ m4_define([_LT_CHECK_INSTALL],
 [LT_AT_MAKE([install])
 
 # Windows hosts search for dlls in the command path.
-PATH=$prefixdir/lib:$PATH
+PATH=$prefix/lib:$PATH
 
-LT_AT_EXEC_CHECK([$prefixdir/bin/mdemo_static], 0, [ignore], [],
-    [$prefixdir/lib/foo1.la $prefixdir/lib/libfoo2.la | $GREP '^try_iterate: '])
-LT_AT_EXEC_CHECK([$prefixdir/bin/mdemo], 0, [ignore], [],
-    [$prefixdir/lib/foo1.la $prefixdir/lib/libfoo2.la | $GREP '^try_iterate: '])
+LT_AT_EXEC_CHECK([$prefix/bin/mdemo_static], 0, [ignore], [],
+    [$prefix/lib/foo1.la $prefix/lib/libfoo2.la | $GREP '^try_iterate: '])
+LT_AT_EXEC_CHECK([$prefix/bin/mdemo], 0, [ignore], [],
+    [$prefix/lib/foo1.la $prefix/lib/libfoo2.la | $GREP '^try_iterate: '])
 ])
 
 
@@ -733,18 +733,18 @@ AT_CHECK([cmp "$before" "$after"], 0, [ignore])
 
 # Running $MAKE install
 # Libtool does not create these directories
-$lt_INSTALL -d "$prefixdir/bin"
-$lt_INSTALL -d "$prefixdir/include"
-$lt_INSTALL -d "$prefixdir/lib"
+$lt_INSTALL -d "$prefix/bin"
+$lt_INSTALL -d "$prefix/include"
+$lt_INSTALL -d "$prefix/lib"
 
 sleep 1 # for MSYS
 ls -l . "$objdir" | $EGREP -v '(^total|testsuite.log$)' > "$before"
-ls -lR "$prefixdir" | $EGREP -v '(^total|testsuite.log$)' >> "$before"
+ls -lR "$prefix" | $EGREP -v '(^total|testsuite.log$)' >> "$before"
 force_dry_run=:
 LT_AT_MAKE([install])
 
 ls -l . "$objdir" | $EGREP -v '(^total|testsuite.log$)' > "$after"
-ls -lR "$prefixdir" | $EGREP -v '(^total|testsuite.log$)' >> "$after"
+ls -lR "$prefix" | $EGREP -v '(^total|testsuite.log$)' >> "$after"
 AT_CHECK([cmp "$before" "$after"], 0, [ignore])
 
 # Now really install
@@ -753,15 +753,15 @@ LT_AT_MAKE([install])
 
 # Running $MAKE uninstall
 # Libtool does not uninstall the programs, remove them first
-rm -f "$prefixdir/bin/mdemo$EXEEXT" "$prefixdir/bin/mdemo_static$EXEEXT"
+rm -f "$prefix/bin/mdemo$EXEEXT" "$prefix/bin/mdemo_static$EXEEXT"
 
 sleep 1 # for MSYS
 ls -l . "$objdir" | $EGREP -v '(^total|testsuite.log$)' > "$before"
-ls -lR "$prefixdir" | $EGREP -v '(^total|testsuite.log$)' >> "$before"
+ls -lR "$prefix" | $EGREP -v '(^total|testsuite.log$)' >> "$before"
 force_dry_run=:
 LT_AT_MAKE([uninstall])
 ls -l . "$objdir" | $EGREP -v '(^total|testsuite.log$)' > "$after"
-ls -lR "$prefixdir" | $EGREP -v '(^total|testsuite.log$)' >> "$after"
+ls -lR "$prefix" | $EGREP -v '(^total|testsuite.log$)' >> "$after"
 AT_CHECK([cmp "$before" "$after"], 0, [ignore])
 
 # Now really uninstall
index ad2172b27ff3c2ea07d8ff03a503d86bc3af0e96..d3804cfc6ccc6920b05a6fe5c77d1ef2fca0a822 100644 (file)
@@ -327,7 +327,7 @@ barbaz::baz is ok!
 convenience is ok!
 ]])
 
-prefixdir=`pwd`/_inst
+prefix=`pwd`/_inst
 ]) # _LT_SETUP
 
 
index 393be12228d5ee14f724d665f810aaef117d0edd..76ed722d6094b04f5e05ad0815c6cffe579ff6b0 100644 (file)
@@ -177,7 +177,8 @@ AT_KEYWORDS([autoconf automake])
 # additional OPTIONS.
 m4_define([LT_AT_CONFIGURE],
 [AT_CHECK([: ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; ]dnl
-         [$CONFIG_SHELL m4_default([$2], [./configure]) $configure_options $1],
+         [$CONFIG_SHELL m4_default([$2], [./configure]) $configure_options ]dnl
+          [--prefix="$prefix" --exec-prefix="$prefix" --bindir="$prefix/bin" --libdir="$prefix/lib" $1],
          [0], [ignore], [ignore])
 ])
 
@@ -228,8 +229,7 @@ m4_define([LT_AT_CHECK],
 # Bootstrap and configure the project, and check each GREP-EXPRESSION
 # works on the resulting libtool script.
 m4_define([LT_AT_CHECK_CONFIG],
-[LT_AT_BOOTSTRAP([], [-I m4], [], [--add-missing], [],
-        [--prefix="$prefixdir" $1], [ignore])
+[LT_AT_BOOTSTRAP([], [-I m4], [], [--add-missing], [], [$1], [ignore])
 m4_if([$#], 0, [],
       [$#], 1, [], [$0_(m4_shift($@))])
 ])
@@ -259,7 +259,7 @@ m4_if([$#], 1, [], [$0(m4_shift($@))])
 m4_define([LT_AT_CHECK_UNINSTALL],
 [LT_AT_MAKE([uninstall])
 
-leftovers=`find $prefixdir ! -type d ! -name '.*' -print`
+leftovers=`find $prefix ! -type d ! -name '.*' -print`
 AT_CHECK([test -z "$leftovers"])
 ])