diff --git a/include/host-build.mk b/include/host-build.mk index 246f248e26e..7e64fc16fe3 100644 --- a/include/host-build.mk +++ b/include/host-build.mk @@ -110,11 +110,11 @@ define Host/Compile/Default endef define Host/Compile - $(call Host/Compile/Default) + $(call Host/Compile/Default,$(if $(PKG_SUBDIRS),SUBDIRS='$$$$(wildcard $(PKG_SUBDIRS))')) endef define Host/Install/Default - $(call Host/Compile/Default,install) + $(call Host/Compile/Default,$(if $(PKG_SUBDIRS),SUBDIRS='$$$$(wildcard $(PKG_SUBDIRS))') install) endef define Host/Install diff --git a/include/package-defaults.mk b/include/package-defaults.mk index 37de9f0ccba..6a401dde2c9 100644 --- a/include/package-defaults.mk +++ b/include/package-defaults.mk @@ -151,6 +151,7 @@ define Build/Install/Default $(MAKE_VARS) \ $(MAKE) -C $(PKG_BUILD_DIR)/$(MAKE_PATH) \ $(MAKE_INSTALL_FLAGS) \ + $(if $(PKG_SUBDIRS),SUBDIRS='$$$$(wildcard $(PKG_SUBDIRS))') \ $(if $(1), $(1), install); endef diff --git a/include/package.mk b/include/package.mk index 8ee78415df2..7fbecf98dc7 100644 --- a/include/package.mk +++ b/include/package.mk @@ -343,7 +343,7 @@ endef Build/Prepare=$(call Build/Prepare/Default,) Build/Configure=$(call Build/Configure/Default,) -Build/Compile=$(call Build/Compile/Default,) +Build/Compile=$(call Build/Compile/Default,$(if $(PKG_SUBDIRS),SUBDIRS='$$$$(wildcard $(PKG_SUBDIRS))')) Build/Install=$(if $(PKG_INSTALL),$(call Build/Install/Default,)) Build/Dist=$(call Build/Dist/Default,) Build/DistCheck=$(call Build/DistCheck/Default,)