aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2022-09-27 13:39:12 +0200
committerFelix Fietkau <nbd@nbd.name>2022-09-27 13:41:12 +0200
commit3a8825ad6acbf18b2b472ace56be58868af78be7 (patch)
treeaca639577b15e1dac7a6ca86ad1152e29d57c5c1 /package
parentf1b3958d02ba8b8a8bf2182599653ddd553906a8 (diff)
downloadupstream-3a8825ad6acbf18b2b472ace56be58868af78be7.tar.gz
upstream-3a8825ad6acbf18b2b472ace56be58868af78be7.tar.bz2
upstream-3a8825ad6acbf18b2b472ace56be58868af78be7.zip
build: fix issues with targets installed via feeds
- fix including modules.mk when a target is being replaced - fix calling make targets from target/linux Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package')
-rw-r--r--package/kernel/linux/Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/package/kernel/linux/Makefile b/package/kernel/linux/Makefile
index ad68bde9b3..ff91760270 100644
--- a/package/kernel/linux/Makefile
+++ b/package/kernel/linux/Makefile
@@ -12,7 +12,9 @@ PKG_NAME:=kernel
PKG_FLAGS:=hold
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/packages
-SCAN_DEPS=modules/*.mk $(TOPDIR)/target/linux/*/modules.mk $(TOPDIR)/target/linux/*/*/modules.mk $(TOPDIR)/include/netfilter.mk
+SUBTARGETS = $(sort $(filter-out feeds,$(notdir $(wildcard $(TOPDIR)/target/linux/* $(TOPDIR)/target/linux/feeds/*))))
+SUBTARGET_MODULES = $(foreach t,$(SUBTARGETS),$(firstword $(wildcard $(TOPDIR)/target/linux/feeds/$(t)/modules.mk $(TOPDIR)/target/linux/$(t)/modules.mk)))
+SCAN_DEPS=modules/*.mk $(SUBTARGET_MODULES) $(TOPDIR)/include/netfilter.mk
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=
@@ -63,5 +65,4 @@ endef
$(eval $(if $(DUMP),,$(call BuildPackage,kernel)))
include $(sort $(wildcard ./modules/*.mk))
--include $(TOPDIR)/target/linux/*/modules.mk
--include $(TOPDIR)/target/linux/*/*/modules.mk
+-include $(SUBTARGET_MODULES)