unixodbc: save unixodbc_conf.h for host build

Save a copy of unixodbc_conf.h in STAGING_DIR to be used by host build.
Use STAGING_DIR/tmp/unixodbc instead of include.

Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
This commit is contained in:
Eneas U de Queiroz 2018-12-11 21:12:24 -02:00 committed by Rosen Penev
parent 01a2f4353e
commit 7220dab755
No known key found for this signature in database
GPG key ID: 36D31CFA845F0E3B

View file

@ -93,7 +93,10 @@ define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include $(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/$(STAGING_DIR)/usr/include/*.h $(1)/usr/include/ $(CP) $(PKG_INSTALL_DIR)/$(STAGING_DIR)/usr/include/*.h $(1)/usr/include/
# Save autoconf config.h file for host build # Save autoconf config.h file for host build
$(CP) $(PKG_BUILD_DIR)/config.h $(1)/usr/include/unixodbc_ac_config.h # copy target autoconf config.h and unixodbc_conf.h file for host build
$(INSTALL_DIR) $(1)/tmp/unixodbc
$(CP) $(PKG_BUILD_DIR)/config.h $(1)/tmp/unixodbc/
$(CP) $(PKG_BUILD_DIR)/unixodbc_conf.h $(1)/tmp/unixodbc/
$(INSTALL_DIR) $(1)/usr/lib $(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/etc $(INSTALL_DIR) $(1)/etc
@ -128,10 +131,9 @@ endef
define Host/Configure define Host/Configure
$(call Host/Configure/Default) $(call Host/Configure/Default)
# copy target autoconf config.h file for host build cp $(STAGING_DIR)/tmp/unixodbc/config.h $(HOST_BUILD_DIR)
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 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) cp $(STAGING_DIR)/tmp/unixodbc/unixodbc_conf.h $(HOST_BUILD_DIR)
endef endef
define Host/Compile define Host/Compile