From 6ec1cee2565be13d43541d0eaac2468efd13ee68 Mon Sep 17 00:00:00 2001 From: Andrey Volk Date: Thu, 19 Aug 2021 19:32:18 +0300 Subject: [PATCH] [Build-System] Allow out-of-tree modules to stay commented out in modules.conf and fix false-positive warnings from module integrity checking when running make install. --- build/modcheck.sh | 4 ++-- configure.ac | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/modcheck.sh b/build/modcheck.sh index 5df91f7e97..e8a82abf29 100644 --- a/build/modcheck.sh +++ b/build/modcheck.sh @@ -21,8 +21,8 @@ cd $here for i in $files ; do mod=${i%%.*} - infile=`grep ^.*$mod\$ ../modules.conf | grep -v ftmod_` - commented=`grep ^\#.*$mod\$ ../modules.conf | grep -v ftmod_` + infile=`grep -E "^.*$mod(\|.*)?$" ../modules.conf | grep -v ftmod_` + commented=`grep -E "^\#.*$mod(\|.*)?$" ../modules.conf | grep -v ftmod_` if [ -z "$infile" ] ; then echo "${on}WARNING: installed module: $i was not installed by this build. It is not present in modules.conf.${off}" diff --git a/configure.ac b/configure.ac index ccbf0ed3e1..5ea8e3921e 100644 --- a/configure.ac +++ b/configure.ac @@ -2078,7 +2078,7 @@ AM_CONDITIONAL(HAVE_G729, [ test -d ${switch_srcdir}/libs/libg729 ]) LIBTOOL='$(SHELL) $(switch_builddir)/libtool' TOUCH_TARGET='if test -f "$@";then touch "$@";fi;' CONF_MODULES='$$(grep -v "\#" $(switch_builddir)/modules.conf | sed "s/|.*//" | sed -e "s|^.*/||" | sort | uniq )' -CONF_DISABLED_MODULES='$$(grep "\#" $(switch_builddir)/modules.conf | grep -v "\#\#" | sed "s/|.*//" | sed -e "s|^.*/||" | sort | uniq )' +CONF_DISABLED_MODULES='$$(grep "\#" $(switch_builddir)/modules.conf | grep -v "\#\#" | sed "s/|.*//" | sed "s/\#/\#\//"| sed -e "s|^.*/||" | sort | uniq )' OUR_MODS='$$(if test -z "$(MODULES)" ; then tmp_mods="$(CONF_MODULES)"; else tmp_mods="$(MODULES)" ; fi ; mods="$$(for i in $$tmp_mods ; do echo $$i-all ; done )"; echo $$mods )' OUR_CLEAN_MODS='$$(if test -z "$(MODULES)" ; then tmp_mods="$(CONF_MODULES)"; else tmp_mods="$(MODULES)" ; fi ; mods="$$(for i in $$tmp_mods ; do echo $$i-clean ; done )"; echo $$mods )' OUR_INSTALL_MODS='$$(if test -z "$(MODULES)" ; then tmp_mods="$(CONF_MODULES)"; else tmp_mods="$(MODULES)" ; fi ; mods="$$(for i in $$tmp_mods ; do echo $$i-install ; done)"; echo $$mods )'