From 706ea18d8c91ab3bc9ebffb6ea38f1766ab48a92 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sat, 3 Feb 2018 13:56:25 +0100 Subject: [PATCH] kamailio-5.x: improve module selection Currently INCL_MODULES is filled with all modules. This commit changes this so that only the modules that are selected are added to it. To further limit the number of modules built group_include="standard" is added. This way only the modules of the standard group plus the modules selected in menuconfig are built. The "standard" group only includes modules without any depends. This fixes build failures on targets where not all depends are available, i.e. postgresql on ARC. Now these modules can be properly prevented from being built. Signed-off-by: Sebastian Kemper --- net/kamailio-5.x/Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/net/kamailio-5.x/Makefile b/net/kamailio-5.x/Makefile index 0640544..a8d099d 100644 --- a/net/kamailio-5.x/Makefile +++ b/net/kamailio-5.x/Makefile @@ -28,6 +28,8 @@ TARGET_CFLAGS += $(FPIC) -DVERSION_NODATE=1 PREBUILT_STAMP=$(STAGING_DIR)/stamp/.$(PKG_NAME)_prebuilt TAR_CMD:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components 1 $(TAR_OPTIONS) +INCL_MODULES:= + define Package/kamailio5/Default SECTION:=net CATEGORY:=Network @@ -94,6 +96,9 @@ define BuildKamailio5Module $$(call Package/kamailio5/Default) TITLE:=$(2) for Kamailio5 DEPENDS:=kamailio5 $(patsubst +%,+PACKAGE_kamailio5-mod-$(subst _,-,$(1)):%,$(4)) + ifneq ($$(CONFIG_PACKAGE_kamailio5-mod-$(subst _,-,$(1))),) + INCL_MODULES+=$(1) + endif endef define Package/kamailio5-mod-$(subst _,-,$(1))/install @@ -101,8 +106,6 @@ $(call Package/kamailio5/install/module,$$(1),$(1)) $(foreach d,$(5),$(call Package/kamailio5/install/dbfiles,$$(1),$(d));) endef - INCL_MODULES+=$(1) - $$(eval $$(call BuildPackage,kamailio5-mod-$(subst _,-,$(1)))) endef @@ -113,7 +116,8 @@ PKG_MAKE_ARGS:= \ data_dir=/usr/share/kamailio/ \ lib_dir=/usr/lib/kamailio/ \ modules_dir=/usr/lib/kamailio/ \ - include_modules="$(INCL_MODULES)" \ + group_include="standard" \ + include_modules="$$(INCL_MODULES)" \ cfg_target:=/etc/kamailio/ \ TLS_HOOKS=1 \ extra_defs="-DUSE_PTHREAD_MUTEX " \ -- 2.30.2