Makefile.in (stmp-docobjdir): New target; ensure $docobjdir exists.
[official-gcc.git] / libstdc++-v3 / scripts / check_performance
blob5fdf5817505aa0ed588e432b8e07bf60ba513de2
1 #!/usr/bin/env bash
3 # Script to do performance testing.
5 # Invocation
6 # check_performance SRC_DIR BUILD_DIR
8 # 1: variables
10 SRC_DIR=$1
11 BUILD_DIR=$2
13 # Now that we've successfully translated the numerical option into
14 # a symbolic one, we can safely ignore it.
15 shift
17 # This has been true all along. Found out about it the hard way...
18 case $BASH_VERSION in
19 1*)
20 echo 'You need bash 2.x to run check_performance. Exiting.';
21 exit 1 ;;
22 *) ;;
23 esac
25 flags_script=$BUILD_DIR/scripts/testsuite_flags
26 INCLUDES=`$flags_script --build-includes`
27 FLAGS=`$flags_script --cxxflags`
28 COMPILER=`$flags_script --build-cxx`
29 SH_FLAG="-Wl,--rpath -Wl,$BUILD_DIR/../../gcc \
30 -Wl,--rpath -Wl,$BUILD_DIR/src/.libs"
31 ST_FLAG="-static"
32 LINK=$SH_FLAG
33 CXX="$COMPILER $INCLUDES $FLAGS $LINK"
36 TESTS_FILE="testsuite_files_performance"
38 for NAME in `cat $TESTS_FILE`
40 echo $NAME
41 FILE_NAME="`basename $NAME`"
42 EXE_NAME="`echo $FILE_NAME | sed 's/cc$/exe/'`"
43 $CXX $SRC_DIR/testsuite/$NAME -o $EXE_NAME
44 ./$EXE_NAME
45 echo ""
46 done
48 exit 0