OSDN Git Service

* testsuite_flags.in (--build-includes): backward, not backwards.
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / testsuite_flags.in
1 #!/bin/sh
2
3 #
4 # This script computes the various flags needed to run GNU C++ testsuites
5 # (compiler specific as well as library specific). 
6 #
7 # Written by Benjamin Kosnik <bkoz@redhat.com>
8 #            Gabriel Dos Reis <gdr@codesourcery.com>
9 #
10
11 # Print a message saying how this script is intended to be invoked
12 print_usage() {
13     cat <<EOF
14 Usage: 
15     testsuite_flags --install-includes
16                     --build-includes
17                     --build-cxx
18                     --install-cxx
19                     --cxxflags
20 EOF
21 }
22
23 # Establish configure-generated directory structure.
24 BUILD_DIR=@glibcpp_builddir@
25 SRC_DIR=@glibcpp_srcdir@
26 PREFIX_DIR=@glibcpp_prefixdir@
27 query=$1
28
29 case ${query} in
30     --install-includes)
31       INCLUDES="-I${SRC_DIR}/testsuite"
32       echo ${INCLUDES}
33       ;;
34     --build-includes)
35       C_DIR="`basename  @C_INCLUDE_DIR@`"
36       INCLUDES="-nostdinc++ -I${BUILD_DIR}/include -I${SRC_DIR}/include
37                 -I${SRC_DIR}/include/std  -I${SRC_DIR}/include/$C_DIR
38                 -I${SRC_DIR}/libsupc++ -I${SRC_DIR}/libio 
39                 -I${SRC_DIR}/testsuite
40                 -I${SRC_DIR}/include/backward -I${SRC_DIR}/include/ext"
41       echo ${INCLUDES}
42       ;;
43     --install-cxx)
44       CXX=${PREFIX_DIR}/bin/g++
45       echo ${CXX}
46       ;;
47     --build-cxx)
48       CC_build="@glibcpp_CXX@"
49       CXX=`echo $CC_build | sed 's/xgcc/g++/g'`
50       echo ${CXX}
51       ;;
52     --cxxflags)
53       CXXFLAGS=" -ggdb3 -DDEBUG_ASSERT @SECTION_FLAGS@ @SECTION_LDFLAGS@"
54       echo ${CXXFLAGS}
55       ;;
56     *)
57       print_usage
58       ;;
59 esac
60
61 exit 0
62
63