Change gccxml wrapper to work with older bash version. Hopefull this doesn't break...
[libt2n] / libt2n-gccxml.sh
1 #!/bin/sh
2
3 # Filter "-pthread" option from newer gcc versions
4 # as it's currently unsupported in gccxml.
5 EOO=0
6 while [[ $1 ]]; do
7 if ! ((EOO)); then
8   case "$1" in
9     -pthread)
10       shift
11       ;;
12     --)
13       EOO=1
14       OPTIONS="$OPTIONS $1"
15       shift
16       ;;
17     *)
18       OPTIONS="$OPTIONS $1"
19       shift
20       ;;
21   esac
22 else
23   OPTIONS="$OPTIONS $1"
24   shift
25 fi
26 done
27
28 gccxml $OPTIONS