From: Sebastian Kemper Date: Mon, 5 Feb 2018 22:04:15 +0000 (+0100) Subject: freeswitch-stable: tidy up the Build defines X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=584c9841f37603069ae49047e180151da03cee96;p=feed%2Ftelephony.git freeswitch-stable: tidy up the Build defines This commit changes Build/Compile, Build/Install and Build/InstallDev to prevent building/installing items that are not selected. I.e. when freeswitch-stable is not selected, only libfreetdm-stable gets built. Signed-off-by: Sebastian Kemper --- diff --git a/net/freeswitch-stable/Makefile b/net/freeswitch-stable/Makefile index b811f14..e13b508 100644 --- a/net/freeswitch-stable/Makefile +++ b/net/freeswitch-stable/Makefile @@ -998,12 +998,12 @@ endif endef define Build/Compile - $(call Build/Compile/Default) -# FreeTDM is only compiled/installed automatically if mod_freetdm is selected +# Compile FreeTDM first ifneq ($(CONFIG_PACKAGE_$(PKG_LIBFTDM)),) -ifeq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-freetdm),) $(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/$(FTDM)) endif +ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)),) + $(call Build/Compile/Default) endif ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-perl-esl),) $(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/esl perlmod) @@ -1014,11 +1014,12 @@ endif endef define Build/Install - $(call Build/Install/Default) +# Again, FreeTDM first ifneq ($(CONFIG_PACKAGE_$(PKG_LIBFTDM)),) -ifeq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-freetdm),) $(call Build/Install/Default,-C $(PKG_BUILD_DIR)/libs/$(FTDM) install) endif +ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)),) + $(call Build/Install/Default) endif ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-perl-esl),) $(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/esl DESTDIR=$(PKG_INSTALL_DIR) perlmod-install) @@ -1028,19 +1029,30 @@ ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-python-esl),) endif endef -define Build/InstallDev +define Build/InstallDev/$(PKG_LIBFTDM) + $(INSTALL_DIR) $(1)/usr/include + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)$(FS_STABLE_PKGCONFIG_DIR)/$(FTDM).pc \ + $(1)$(FS_STABLE_PKGCONFIG_DIR) + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include +endef + +define Build/InstallDev/$(PKG_NAME) $(INSTALL_DIR) $(1)$(FS_STABLE_INCLUDES_DIR) - $(INSTALL_DIR) $(1)$(FS_STABLE_PKGCONFIG_DIR) $(INSTALL_DATA) $(PKG_INSTALL_DIR)$(FS_STABLE_INCLUDES_DIR)/*.h \ $(1)$(FS_STABLE_INCLUDES_DIR) $(INSTALL_DATA) \ $(PKG_INSTALL_DIR)$(FS_STABLE_PKGCONFIG_DIR)/$(PRG_NAME).pc \ $(1)$(FS_STABLE_PKGCONFIG_DIR) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)$(FS_STABLE_PKGCONFIG_DIR) ifneq ($(CONFIG_PACKAGE_$(PKG_LIBFTDM)),) - $(INSTALL_DATA) \ - $(PKG_INSTALL_DIR)$(FS_STABLE_PKGCONFIG_DIR)/$(FTDM).pc \ - $(1)$(FS_STABLE_PKGCONFIG_DIR) - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include + $(call Build/InstallDev/$(PKG_LIBFTDM),$(1)) +endif +ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)),) + $(call Build/InstallDev/$(PKG_NAME),$(1)) endif endef