From 58b3cc075d61c5dc10d52a142db907689b8beb80 Mon Sep 17 00:00:00 2001 From: Andrew Jeffery Date: Mon, 29 May 2017 16:41:30 +0930 Subject: bootstrap: Allow ./configure options on the commandline for dev mode Change-Id: I11812d5aa19d4a293282ab776663bdfe6154069a Signed-off-by: Andrew Jeffery --- bootstrap.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'bootstrap.sh') diff --git a/bootstrap.sh b/bootstrap.sh index 9daba3b..d6c337a 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -4,7 +4,15 @@ AUTOCONF_FILES="Makefile.in aclocal.m4 ar-lib autom4te.cache compile \ config.guess config.h.in config.sub configure depcomp install-sh \ ltmain.sh missing *libtool test-driver" -case $1 in +BOOTSTRAP_MODE="" + +if [ $# -gt 0 ]; +then + BOOTSTRAP_MODE="${1}" + shift 1 +fi + +case "${BOOTSTRAP_MODE}" in clean) test -f Makefile && make maintainer-clean test -d linux && find linux -type d -empty | xargs -r rm -rf @@ -13,16 +21,18 @@ case $1 in done exit 0 ;; + *) ;; esac autoreconf -i -case $1 in +case "${BOOTSTRAP_MODE}" in dev) ./configure \ CPPFLAGS="-UNDEBUG" \ CFLAGS="-fsanitize=address -fsanitize=leak -fsanitize=undefined -Wall -Werror" \ - --enable-code-coverage + --enable-code-coverage \ + "$@" ;; *) echo 'Run "./configure ${CONFIGURE_FLAGS} && make"' -- cgit v1.2.1