From 7d7858f6f1b95f1f11e02bb0e6e386f4fa93bcf5 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 6 Oct 2016 03:07:04 +0200 Subject: include/host-build.mk: pass HOST_BUILD_PREFIX to Host/install Makes it more consistent with package builds. Based-on-patch-by: Felix Fietkau Signed-off-by: Matthias Schiffer --- include/host-build.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/host-build.mk b/include/host-build.mk index a494ceddf3..0b10c7cdf9 100644 --- a/include/host-build.mk +++ b/include/host-build.mk @@ -111,7 +111,7 @@ define Host/Install/Default endef define Host/Install - $(call Host/Install/Default) + $(call Host/Install/Default,$(HOST_BUILD_PREFIX)) endef @@ -173,7 +173,7 @@ ifndef DUMP touch $$@ $(HOST_STAMP_INSTALLED): $(HOST_STAMP_BUILT) $(if $(FORCE_HOST_INSTALL),FORCE) - $(call Host/Install) + $(call Host/Install,$(HOST_BUILD_PREFIX)) $(foreach hook,$(Hooks/HostInstall/Post),$(call $(hook))$(sep)) mkdir -p $$(shell dirname $$@) touch $(HOST_STAMP_BUILT) -- cgit v1.2.3 From 69ae4b5e66322bfd10adbba08d819ecfa3889108 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 6 Oct 2016 03:07:05 +0200 Subject: include/host-build.mk: fix ACLOCAL_INCLUDE It seems the intention was to add both $(STAGING_DIR_HOST)/... and $(STAGING_DIR)/host/... instead of passing $(STAGING_DIR_HOST) twice. This makes the definition match HOST_CPPFLAGS and HOST_LDFLAGS. Signed-off-by: Matthias Schiffer --- include/host-build.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/host-build.mk b/include/host-build.mk index 0b10c7cdf9..688f8d8442 100644 --- a/include/host-build.mk +++ b/include/host-build.mk @@ -133,7 +133,7 @@ define Download/default endef define Host/Exports/Default - $(1) : export ACLOCAL_INCLUDE=$$(foreach p,$$(wildcard $$(STAGING_DIR_HOST)/share/aclocal $$(STAGING_DIR_HOST)/share/aclocal-* $(if $(IS_PACKAGE_BUILD),$$(STAGING_DIR_HOST)/share/aclocal $$(STAGING_DIR_HOST)/share/aclocal-*)),-I $$(p)) + $(1) : export ACLOCAL_INCLUDE=$$(foreach p,$$(wildcard $$(STAGING_DIR_HOST)/share/aclocal $$(STAGING_DIR_HOST)/share/aclocal-* $(if $(IS_PACKAGE_BUILD),$$(STAGING_DIR)/host/share/aclocal $$(STAGING_DIR)/host/share/aclocal-*)),-I $$(p)) $(1) : export STAGING_PREFIX=$$(HOST_BUILD_PREFIX) $(1) : export PKG_CONFIG_PATH=$$(STAGING_DIR_HOST)/lib/pkgconfig:$$(HOST_BUILD_PREFIX)/lib/pkgconfig $(1) : export PKG_CONFIG_LIBDIR=$$(HOST_BUILD_PREFIX)/lib/pkgconfig -- cgit v1.2.3 From 8c658e15cc162c46c18dfc5b4b65be9ed03a9fb1 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 6 Oct 2016 03:07:05 +0200 Subject: include/host-build.mk: set Host/Exports for Host/Install step Having a different PATH in Host/Install than in other steps like Host/Build is confusing and easily leads to mistakes. Setting all of Host/Exports makes host builds match target builds (Build/Install is part of $(STAMP_BUILT), which has Build/Exports set). Signed-off-by: Matthias Schiffer --- include/host-build.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/include/host-build.mk b/include/host-build.mk index 688f8d8442..72b32597d4 100644 --- a/include/host-build.mk +++ b/include/host-build.mk @@ -172,6 +172,7 @@ ifndef DUMP $(foreach hook,$(Hooks/HostCompile/Post),$(call $(hook))$(sep)) touch $$@ + $(call Host/Exports,$(HOST_STAMP_INSTALLED)) $(HOST_STAMP_INSTALLED): $(HOST_STAMP_BUILT) $(if $(FORCE_HOST_INSTALL),FORCE) $(call Host/Install,$(HOST_BUILD_PREFIX)) $(foreach hook,$(Hooks/HostInstall/Post),$(call $(hook))$(sep)) -- cgit v1.2.3 From 8bd198f171b76b834e1462e1789ae060a42d983e Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 6 Oct 2016 03:07:05 +0200 Subject: include/package-ipkg.mk: use TARGET_PATH_PKG in Package/*/install steps Package/*/install was using a different PATH than all other steps like Build/Install, which was confusing and easily led to mistakes. Signed-off-by: Matthias Schiffer --- include/package-ipkg.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/package-ipkg.mk b/include/package-ipkg.mk index eb4c874047..f06b651e07 100644 --- a/include/package-ipkg.mk +++ b/include/package-ipkg.mk @@ -131,6 +131,7 @@ ifeq ($(DUMP),) $(eval $(call BuildIPKGVariable,$(1),prerm,-pkg,1)) $(eval $(call BuildIPKGVariable,$(1),postrm,,1)) + $(STAGING_DIR_ROOT)/stamp/.$(1)_installed : export PATH=$$(TARGET_PATH_PKG) $(STAGING_DIR_ROOT)/stamp/.$(1)_installed: $(STAMP_BUILT) rm -rf $(STAGING_DIR_ROOT)/tmp-$(1) mkdir -p $(STAGING_DIR_ROOT)/stamp $(STAGING_DIR_ROOT)/tmp-$(1) @@ -170,6 +171,7 @@ $(_endef) $(PKG_INFO_DIR)/$(1).provides: $$(IPKG_$(1)) $$(IPKG_$(1)) : export CONTROL=$$(Package/$(1)/CONTROL) $$(IPKG_$(1)) : export DESCRIPTION=$$(Package/$(1)/description) + $$(IPKG_$(1)) : export PATH=$$(TARGET_PATH_PKG) $$(IPKG_$(1)): $(STAMP_BUILT) $(INCLUDE_DIR)/package-ipkg.mk @rm -rf $$(PDIR_$(1))/$(1)_* $$(IDIR_$(1)) mkdir -p $(PACKAGE_DIR) $$(IDIR_$(1))/CONTROL $(PKG_INFO_DIR) -- cgit v1.2.3