2001-05-11 Benjamin Kosnik <bkoz@redhat.com>
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 12 May 2001 17:45:46 +0000 (17:45 +0000)
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 12 May 2001 17:45:46 +0000 (17:45 +0000)
* testsuite_flags.in: New, simplified interface.
* testsuite/lib/libstdc++-v3-dg.exp: New test harness.
* testsuite/libstdc++-v3.dg: Add.
* testsuite/libstdc++-v3.dg/dg.exp: Add.

* testsuite/Makefile.am: Change tool to libstdc++-v3.
* configure.in: Output testsuite_flags.
* acinclude.m4: Substitute src, bld, and prefix dirs.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41998 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/testsuite_flags.in [new file with mode: 0755]

diff --git a/libstdc++-v3/testsuite_flags.in b/libstdc++-v3/testsuite_flags.in
new file mode 100755 (executable)
index 0000000..e33fc8d
--- /dev/null
@@ -0,0 +1,62 @@
+#!/bin/sh
+
+#
+# This script computes the various flags needed to run GNU C++ testsuites
+# (compiler specific as well as library specific). 
+#
+# Written by Benjamin Kosnik <bkoz@redhat.com>
+#            Gabriel Dos Reis <gdr@codesourcery.com>
+#
+
+# Print a message saying how this script is intended to be invoked
+print_usage() {
+    cat <<EOF
+Usage: 
+    tests_flags --install-includes
+               --build-includes
+               --build-cxx
+               --install-cxx
+               --cxxflags
+EOF
+}
+
+# Establish configure-generated directory structure.
+BUILD_DIR=@glibcpp_builddir@
+SRC_DIR=@glibcpp_srcdir@
+PREFIX_DIR=@glibcpp_prefixdir@
+query=$1
+
+case ${query} in
+    --install-includes)
+      INCLUDES="-I${SRC_DIR}/testsuite"
+      echo ${INCLUDES}
+      ;;
+    --build-includes)
+      C_DIR="`basename  @C_INCLUDE_DIR@`"
+      INCLUDES="-nostdinc++ -I${BUILD_DIR}/include -I${SRC_DIR}/include
+                -I${SRC_DIR}/include/std  -I${SRC_DIR}/include/$C_DIR
+               -I${SRC_DIR}/libsupc++ -I${SRC_DIR}/libio 
+               -I${SRC_DIR}/testsuite"
+      echo ${INCLUDES}
+      ;;
+    --install-cxx)
+      CXX=${PREFIX_DIR}/bin/g++
+      echo ${CXX}
+      ;;
+    --build-cxx)
+      CC_build="@glibcpp_CXX@ -static "
+      CXX=`echo $CC_build | sed 's/xgcc/g++/g'`
+      echo ${CXX}
+      ;;
+    --cxxflags)
+      CXXFLAGS=" -ggdb3 -DDEBUG_ASSERT @SECTION_FLAGS@ @SECTION_LDFLAGS@"
+      echo ${CXXFLAGS}
+      ;;
+    *)
+      print_usage
+      ;;
+esac
+
+exit 0
+
+