freeswitch-stable: move source file copying to Build/Compile
authorSebastian Kemper <sebastian_ml@gmx.net>
Sun, 4 Mar 2018 17:09:29 +0000 (18:09 +0100)
committerSebastian Kemper <sebastian_ml@gmx.net>
Sun, 4 Mar 2018 17:09:35 +0000 (18:09 +0100)
Some source files need to be copied into PKG_BUILD_DIR. This is
currently done in Build/Prepare.

When PKG_CONFIG_DEPENDS causes a reconfiguration, Build/Prepare is not
triggered again, meaning needed source files would not be copied.

Move these lines to Build/Compile to address this.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
net/freeswitch-stable/Makefile

index 9b44730d667c7e10e1fcc918b8f83e83c241b57d..d62740b2508aea63fbd9bcda4c400983fbb79516 100644 (file)
@@ -957,24 +957,6 @@ define Build/Prepare
        $(SED) 's|$(FS_STABLE_ANCHOR)|APR_SETVAR(LDFLAGS,$(FS_STABLE_APR_LIBS) $(TARGET_LDFLAGS))|' \
                $(PKG_BUILD_DIR)/libs/unimrcp/build/acmacros/apr.m4
 
-ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-event_zmq),)
-       $(CP) $(DL_DIR)/$(FS_STABLE_ZEROMQ_FILE) $(PKG_BUILD_DIR)/libs
-endif
-
-ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-pocketsphinx)$(CONFIG_PACKAGE_$(PKG_NAME)-misc-grammar),)
-       $(CP) $(DL_DIR)/$(FS_STABLE_POCKETSPHINX_FILE) $(PKG_BUILD_DIR)/libs
-       $(CP) $(DL_DIR)/$(FS_STABLE_SPHINXBASE_FILE) $(PKG_BUILD_DIR)/libs
-       $(CP) $(DL_DIR)/$(FS_STABLE_SPHINXMODEL_FILE) $(PKG_BUILD_DIR)/libs
-endif
-
-ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-radius_cdr),)
-       $(CP) $(DL_DIR)/$(FS_STABLE_FREERADIUS_CLIENT_FILE) $(PKG_BUILD_DIR)/libs
-endif
-
-ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-v8),)
-       $(CP) $(DL_DIR)/$(FS_STABLE_V8_FILE) $(PKG_BUILD_DIR)/libs
-endif
-
 # Hack for misc-grammar - needs mod_pocketsphinx to provide grammar files
 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-grammar),)
 ifeq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-pocketsphinx),)
@@ -998,6 +980,25 @@ endif
 endef
 
 define Build/Compile
+# Copy some source files if certain modules are selected
+ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-event_zmq),)
+       $(CP) $(DL_DIR)/$(FS_STABLE_ZEROMQ_FILE) $(PKG_BUILD_DIR)/libs
+endif
+
+ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-pocketsphinx)$(CONFIG_PACKAGE_$(PKG_NAME)-misc-grammar),)
+       $(CP) $(DL_DIR)/$(FS_STABLE_POCKETSPHINX_FILE) $(PKG_BUILD_DIR)/libs
+       $(CP) $(DL_DIR)/$(FS_STABLE_SPHINXBASE_FILE) $(PKG_BUILD_DIR)/libs
+       $(CP) $(DL_DIR)/$(FS_STABLE_SPHINXMODEL_FILE) $(PKG_BUILD_DIR)/libs
+endif
+
+ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-radius_cdr),)
+       $(CP) $(DL_DIR)/$(FS_STABLE_FREERADIUS_CLIENT_FILE) $(PKG_BUILD_DIR)/libs
+endif
+
+ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-v8),)
+       $(CP) $(DL_DIR)/$(FS_STABLE_V8_FILE) $(PKG_BUILD_DIR)/libs
+endif
+
 # Compile FreeTDM first
 ifneq ($(CONFIG_PACKAGE_$(PKG_LIBFTDM)),)
        $(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/$(FTDM))