Merge pull request #215 from micmac1/prevent-build-all

Asterisk: Prevent building of all default modules
This commit is contained in:
Jiri Slachta 2017-12-02 18:44:14 +01:00 committed by GitHub
commit 20197a9f94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 64 additions and 0 deletions

View file

@ -24,6 +24,23 @@ PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING LICENSE PKG_LICENSE_FILES:=COPYING LICENSE
PKG_MAINTAINER:=Jiri Slachta <jiri@slachta.eu> PKG_MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
MENUSELECT_CATEGORIES:= \
MENUSELECT_ADDONS \
MENUSELECT_APPS \
MENUSELECT_BRIDGES \
MENUSELECT_CDR \
MENUSELECT_CEL \
MENUSELECT_CHANNELS \
MENUSELECT_CODECS \
MENUSELECT_FORMATS \
MENUSELECT_FUNCS \
MENUSELECT_PBX \
MENUSELECT_RES \
MENUSELECT_UTILS \
MENUSELECT_AGIS
AST_ENABLE:=
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/host-build.mk
@ -61,6 +78,9 @@ define BuildAsterisk13Module
$$(call Package/asterisk13/Default) $$(call Package/asterisk13/Default)
TITLE:=$(2) support TITLE:=$(2) support
DEPENDS:= asterisk13 $(patsubst +%,+PACKAGE_asterisk13-$(1):%,$(4)) DEPENDS:= asterisk13 $(patsubst +%,+PACKAGE_asterisk13-$(1):%,$(4))
ifneq ($$(CONFIG_PACKAGE_asterisk13-$(1)),)
AST_ENABLE+=$(6)
endif
endef endef
define Package/asterisk13-$(1)/conffiles define Package/asterisk13-$(1)/conffiles
@ -305,6 +325,18 @@ define Build/Compile
LDFLAGS="$(HOST_LDFLAGS) -Wl,-rpath,$(STAGING_DIR_HOSTPKG)/lib" \ LDFLAGS="$(HOST_LDFLAGS) -Wl,-rpath,$(STAGING_DIR_HOSTPKG)/lib" \
$(MAKE) -C "$(PKG_BUILD_DIR)/menuselect" $(MAKE) -C "$(PKG_BUILD_DIR)/menuselect"
$(MAKE) -C "$(PKG_BUILD_DIR)" menuselect-tree $(MAKE) -C "$(PKG_BUILD_DIR)" menuselect-tree
for cat in $(MENUSELECT_CATEGORIES); do \
cd "$(PKG_BUILD_DIR)" && \
./menuselect/menuselect \
--disable-category $$$$cat \
menuselect.makeopts; \
done
for item in $(AST_EMB_MODULES) $$(AST_ENABLE); do \
cd "$(PKG_BUILD_DIR)" && \
./menuselect/menuselect \
--enable $$$$item \
menuselect.makeopts; \
done
cd "$(PKG_BUILD_DIR)" && \ cd "$(PKG_BUILD_DIR)" && \
./menuselect/menuselect \ ./menuselect/menuselect \
--disable BUILD_NATIVE \ --disable BUILD_NATIVE \

View file

@ -22,6 +22,23 @@ PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING LICENSE PKG_LICENSE_FILES:=COPYING LICENSE
PKG_MAINTAINER:=Jiri Slachta <jiri@slachta.eu> PKG_MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
MENUSELECT_CATEGORIES:= \
MENUSELECT_ADDONS \
MENUSELECT_APPS \
MENUSELECT_BRIDGES \
MENUSELECT_CDR \
MENUSELECT_CEL \
MENUSELECT_CHANNELS \
MENUSELECT_CODECS \
MENUSELECT_FORMATS \
MENUSELECT_FUNCS \
MENUSELECT_PBX \
MENUSELECT_RES \
MENUSELECT_UTILS \
MENUSELECT_AGIS
AST_ENABLE:=
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/host-build.mk
@ -59,6 +76,9 @@ define BuildAsterisk15Module
$$(call Package/asterisk15/Default) $$(call Package/asterisk15/Default)
TITLE:=$(2) support TITLE:=$(2) support
DEPENDS:= asterisk15 $(patsubst +%,+PACKAGE_asterisk15-$(1):%,$(4)) DEPENDS:= asterisk15 $(patsubst +%,+PACKAGE_asterisk15-$(1):%,$(4))
ifneq ($$(CONFIG_PACKAGE_asterisk15-$(1)),)
AST_ENABLE+=$(6)
endif
endef endef
define Package/asterisk15-$(1)/conffiles define Package/asterisk15-$(1)/conffiles
@ -305,6 +325,18 @@ define Build/Compile
LDFLAGS="$(HOST_LDFLAGS) -Wl,-rpath,$(STAGING_DIR_HOSTPKG)/lib" \ LDFLAGS="$(HOST_LDFLAGS) -Wl,-rpath,$(STAGING_DIR_HOSTPKG)/lib" \
$(MAKE) -C "$(PKG_BUILD_DIR)/menuselect" $(MAKE) -C "$(PKG_BUILD_DIR)/menuselect"
$(MAKE) -C "$(PKG_BUILD_DIR)" menuselect-tree $(MAKE) -C "$(PKG_BUILD_DIR)" menuselect-tree
for cat in $(MENUSELECT_CATEGORIES); do \
cd "$(PKG_BUILD_DIR)" && \
./menuselect/menuselect \
--disable-category $$$$cat \
menuselect.makeopts; \
done
for item in $(AST_EMB_MODULES) $$(AST_ENABLE); do \
cd "$(PKG_BUILD_DIR)" && \
./menuselect/menuselect \
--enable $$$$item \
menuselect.makeopts; \
done
cd "$(PKG_BUILD_DIR)" && \ cd "$(PKG_BUILD_DIR)" && \
./menuselect/menuselect \ ./menuselect/menuselect \
--disable BUILD_NATIVE \ --disable BUILD_NATIVE \