aboutsummaryrefslogtreecommitdiff
path: root/libphobos/testsuite/testsuite_flags.in
blob: 990221a3d0f1ef34100178328bc978a7f626807d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/sh

#
# This script computes the various flags needed to run D Phobos unittests.
#

# Print a message saying how this script is intended to be invoked
print_usage() {
    cat <<EOF
Usage:
    testsuite_flags --gdc
		    --gdcflags
		    --gdcpaths
		    --gdcldflags

EOF
}

# Establish configure-generated directory structure.
BUILD_DIR=@libphobos_builddir@
SRC_DIR=@libphobos_srcdir@
query=$1

case ${query} in
    --gdc)
      GDC="@GDC@"
      echo ${GDC}
      ;;
    --gdcflags)
      GDCFLAGS_default="-fmessage-length=0 -fno-show-column"
      GDCFLAGS_config="@WARN_DFLAGS@ @GDCFLAGSX@"
      echo ${GDCFLAGS_default} ${GDCFLAGS_config}
      ;;
    --gdcpaths)
      GDCPATHS_default="-nostdinc"
      GDCPATHS_config="-B${BUILD_DIR}/src
                       -I${BUILD_DIR}/libdruntime
                       -I${SRC_DIR}/libdruntime
                       -I${SRC_DIR}/src"
      echo ${GDCPATHS_default} ${GDCPATHS_config}
      ;;
    --gdcldflags)
      GDCLDFLAGS="-B${BUILD_DIR}/src
                  -B${BUILD_DIR}/libdruntime/gcc
                  -L${BUILD_DIR}/libdruntime/.libs
                  -L${BUILD_DIR}/src/.libs"
      echo ${GDCLDFLAGS}
      ;;
    *)
      print_usage
      ;;
esac

exit 0