summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-12-17 02:47:02 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-12-17 02:47:02 -0500
commita4d083550a7273b895b44aac8d2ff7e2fdb1f7d5 (patch)
tree6f148433641f8c92d6f1eddcb2199a78dbd111a0 /autogen.sh
parentb6d071f1df46eb841ba3f88cdb2b248eaf5f35f8 (diff)
parent86e9bb69ae74bd960e1fd427258f41d54240d6d1 (diff)
Merge branch 'systemd/parabola' into notsystemd/premove
# Conflicts: # Makefile.amp
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh32
1 files changed, 23 insertions, 9 deletions
diff --git a/autogen.sh b/autogen.sh
index 4ec1b2be79..1897e23b53 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -17,6 +17,14 @@
set -e
+verb="$1"
+
+case "$verb" in
+"") ;;
+[cgals]) shift ;;
+*) echo "Unexpected argument: $verb" >&2; exit 1 ;;
+esac
+
oldpwd=$(pwd)
topdir=$(dirname $0)
cd $topdir
@@ -52,21 +60,27 @@ args="$args \
"
fi
+args="$args $@"
cd $oldpwd
-if [ "x$1" = "xc" ]; then
+if [ "$verb" = "c" ]; then
+ set -x
$topdir/configure CFLAGS='-g -O0 -ftrapv' $args
- make clean
-elif [ "x$1" = "xg" ]; then
+ make clean >/dev/null
+elif [ "$verb" = "g" ]; then
+ set -x
$topdir/configure CFLAGS='-g -Og -ftrapv' $args
- make clean
-elif [ "x$1" = "xa" ]; then
+ make clean >/dev/null
+elif [ "$verb" = "a" ]; then
+ set -x
$topdir/configure CFLAGS='-g -O0 -Wsuggest-attribute=pure -Wsuggest-attribute=const -ftrapv' $args
- make clean
-elif [ "x$1" = "xl" ]; then
+ make clean >/dev/null
+elif [ "$verb" = "l" ]; then
+ set -x
$topdir/configure CC=clang CFLAGS='-g -O0 -ftrapv' $args
- make clean
-elif [ "x$1" = "xs" ]; then
+ make clean >/dev/null
+elif [ "$verb" = "s" ]; then
+ set -x
scan-build $topdir/configure CFLAGS='-std=gnu99 -g -O0 -ftrapv' $args
scan-build make
else