From: Eneas U de Queiroz Date: Thu, 6 Dec 2018 14:03:02 +0000 (-0200) Subject: unixodbc: fix clean-build compilation X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=01a2f4353e289e6438ce24b870e15dfe02c65017;p=feed%2Fpackages.git unixodbc: fix clean-build compilation For host compilation, the configure-generated config.h from the target compilation is used in place of the host-generated file. When the target package is compiled with clean-build, that file is gone. This saves the file under $(STAGING_DIR), and fetch it from there. Signed-off-by: Eneas U de Queiroz --- diff --git a/libs/unixodbc/Makefile b/libs/unixodbc/Makefile index c9fcfbade1..21154627af 100644 --- a/libs/unixodbc/Makefile +++ b/libs/unixodbc/Makefile @@ -92,6 +92,8 @@ endef define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(CP) $(PKG_INSTALL_DIR)/$(STAGING_DIR)/usr/include/*.h $(1)/usr/include/ + # Save autoconf config.h file for host build + $(CP) $(PKG_BUILD_DIR)/config.h $(1)/usr/include/unixodbc_ac_config.h $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ $(INSTALL_DIR) $(1)/etc @@ -126,7 +128,8 @@ endef define Host/Configure $(call Host/Configure/Default) - cp $(PKG_BUILD_DIR)/config.h $(HOST_BUILD_DIR) + # copy target autoconf config.h file for host build + cp $(STAGING_DIR)/usr/include/unixodbc_ac_config.h $(HOST_BUILD_DIR) sed -i -e 's!\(LIB_PREFIX \).*$$$$!\1"$(STAGING_DIR)/usr/lib"!' $(HOST_BUILD_DIR)/config.h cp $(PKG_BUILD_DIR)/unixodbc_conf.h $(HOST_BUILD_DIR) endef