Zbigniew Jędrzejewski-Szmek | e7e1570 | 2017-07-13 20:57:43 -0400 | [diff] [blame^] | 1 | #!/bin/bash -e |
2 | |||||
3 | cflags=CFLAGS="$CFLAGS" | ||||
4 | cxxflags=CXXFLAGS="$CXXFLAGS" | ||||
5 | declare -a args | ||||
6 | j=0 | ||||
7 | for i in "$@"; do | ||||
8 | case "$i" in | ||||
9 | CFLAGS=*) | ||||
10 | cflags="$i";; | ||||
11 | CXXFLAGS=*) | ||||
12 | cxxflags="$i";; | ||||
13 | *) | ||||
14 | args[$j]="$i" | ||||
15 | j=$((j+1)) | ||||
16 | esac | ||||
17 | done | ||||
18 | |||||
19 | export "$cflags" "$cxxflags" | ||||
20 | set -x | ||||
21 | exec meson build "${args[@]}" |