test harness: improve catching of usage errors in script 'test-driver'
[platform/upstream/automake.git] / t / cxx-lt-demo.sh
old mode 100755 (executable)
new mode 100644 (file)
index b778725..faf18bd
@@ -94,10 +94,12 @@ $AUTOCONF
 $AUTOMAKE --add-missing --copy
 
 ls -l . ax # For debugging.
-for f in ltmain.sh depcomp config.guess config.sub; do
+# Ideally, the 'compile' script should not be required by C++ compilers.
+# But alas, LT_INIT seems to invoke AC_PROG_CC anyway, and that brings in
+# that script.
+for f in ltmain.sh depcomp compile config.guess config.sub; do
   test -f ax/$f && test ! -h ax/$f || exit 1
 done
-test ! -e ax/compile # Not required by C++ compilers.
 
 cat > src/main.cc << 'END'
 #include "libfoo.h++"
@@ -112,7 +114,6 @@ END
 
 cat > lib/libfoo.c++ << 'END'
 #include "libfoo.h++"
-#include <string>
 std::string target (void)
 {
   std::string s1 = "Test";
@@ -122,9 +123,7 @@ std::string target (void)
 END
 
 ./configure
-# Creative quoting and redundant use of eval to avoid spurious
-# 'maintainer-check' failures.
-eval \$'MAKE CC=false AM_MAKEFLAGS=CC=false'
+run_make CC=false
 ls -l . src lib # For debugging.
 $MAKE test-objs
 VERBOSE=yes $MAKE check-TESTS