]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - autogen.sh
resolved: default to the compile-time fallback hostname
[thirdparty/systemd.git] / autogen.sh
index 4ec1b2be7971b72691b690bfabe09b456cf9f58e..1897e23b535abbfec99b5ecca76a31c4a7e522ab 100755 (executable)
 
 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