From 14166939a0abc0e4377a656c249ca6d90a762de2 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 28 Jul 2024 09:24:54 -0700 Subject: [PATCH] build.sh: pass MESON_CONFFLAGS to meson builds instead of CONFFLAGS Since meson & autoconf have different formats for command line flags (-Dfoo=bar instead of --with-foo=bar or --enable-foo), this lets the feature to pass common flags via environment variable work now that we build with both tools. Signed-off-by: Alan Coopersmith Part-of: --- build.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index e60f207..4a62b5b 100755 --- a/build.sh +++ b/build.sh @@ -141,6 +141,9 @@ # Optional when using --clone to update source code before building # CONFFLAGS Configure options to pass to all Autoconf configure scripts # Refer to 'configure --help' from any module/components +# MESON_CONFFLAGS +# Configure options to pass to all meson setup commands +# Refer to 'meson configure' from any module/components # # Environment variables defined by the GNU Build System: # @@ -204,6 +207,9 @@ Environment variables specific to build.sh: Optional when using --clone to update source code before building CONFFLAGS Configure options to pass to all Autoconf configure scripts Refer to 'configure --help' from any module/components + MESON_CONFFLAGS + Configure options to pass to all meson setup commands + Refer to 'meson configure' from any module/components Environment variables defined by the GNU Build System: ACLOCAL The aclocal cmd name [aclocal -I \${DESTDIR}/\${DATADIR}/aclocal] @@ -344,7 +350,7 @@ module_title() { echo "" echo "======================================================================" echo "== Processing: \"$module${component:+/}$component\"" - echo "== configuration options: $CONFFLAGS $confopts" + echo "== configuration options: $confopts" } # Search for tarballs in either cwd or under a module directory @@ -629,11 +635,14 @@ process() { if [ $use_autogen != 0 ]; then CONFCMD="${DIR_CONFIG}/autogen.sh" + confflags="${CONFFLAGS}" elif [ $use_configure != 0 ]; then CONFCMD="${DIR_CONFIG}/configure" + confflags="${CONFFLAGS}" elif [ $use_meson != 0 ]; then - CONFCMD="meson" + CONFCMD="meson setup" confopts="$confopts builddir" + confflags="${MESON_CONFFLAGS}" fi old_pwd=`pwd` @@ -699,7 +708,7 @@ process() { ${LIBDIR_USER:+--libdir="$LIBDIR"} \ ${LOCALSTATEDIR_USER:+--localstatedir="$LOCALSTATEDIR"} \ ${QUIET:+--quiet} \ - ${CONFFLAGS} $confopts + ${confflags} $confopts if [ $? -ne 0 ]; then failed ${CONFCMD} $module $component cd $old_pwd -- 2.11.4.GIT