]> git.ipfire.org Git - thirdparty/xz.git/commitdiff
CI: Add argument to ci_build.sh to pass flags to autogen.sh.
authorJia Tan <jiat0218@gmail.com>
Fri, 21 Jul 2023 14:11:01 +0000 (22:11 +0800)
committerJia Tan <jiat0218@gmail.com>
Sat, 22 Jul 2023 10:13:43 +0000 (18:13 +0800)
build-aux/ci_build.sh

index 201c1dd5d0a264135623d995716bb277697e4f1d..6ab4777f014ce51d32f057b6c94e369e2ebe53d4 100755 (executable)
@@ -17,6 +17,7 @@
 set -e
 
 USAGE="Usage: $0
+  -a [autogen flags]
   -b [autotools|cmake]
   -c [crc32|crc64|sha256]
   -d [encoders|decoders|bcj|delta|threads|shared|nls|small|ifunc|clmul]
@@ -30,6 +31,7 @@ USAGE="Usage: $0
 ABS_DIR=$(cd -- "$(dirname -- "$0")" && pwd)
 
 # Default CLI option values
+AUTOGEN_FLAGS=""
 BUILD_SYSTEM="autotools"
 CHECK_TYPE="crc32,crc64,sha256"
 BCJ="y"
@@ -52,13 +54,16 @@ ARTIFACTS_DIR_NAME="output"
 # Parse arguments #
 ###################
 
-while getopts b:c:d:l:n:s:p:f:h opt; do
+while getopts a:b:c:d:l:n:s:p:f:h opt; do
        # b option can have either value "autotools" OR "cmake"
        case ${opt} in
        h)
                echo "$USAGE"
                exit 0
        ;;
+       a)
+               AUTOGEN_FLAGS="$OPTARG"
+       ;;
        b)
                case "$OPTARG" in
                        autotools) ;;
@@ -187,7 +192,7 @@ then
                # Run autogen.sh script if not already run
                if [ ! -f configure ]
                then
-                       "./autogen.sh"
+                       ./autogen.sh "$AUTOGEN_FLAGS"
                fi
 
                cd "$DEST_DIR"