[source] build: make <subdir>/install opt-in, use it for target/ only

LEDE Commits lede-commits at lists.infradead.org
Thu Feb 9 04:51:51 PST 2017


nbd pushed a commit to source.git, branch master:
https://git.lede-project.org/d826af2cbbc7ff9781d6b9fdde5866f6e6367ec6

commit d826af2cbbc7ff9781d6b9fdde5866f6e6367ec6
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Feb 9 13:21:53 2017 +0100

    build: make <subdir>/install opt-in, use it for target/ only
    
    Fixes buildbot errors on running make target/install or
    toolchain/install
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 include/subdir.mk | 4 ++--
 package/Makefile  | 1 -
 rules.mk          | 2 +-
 target/Makefile   | 1 +
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/subdir.mk b/include/subdir.mk
index 6bbf23a..6db4eaa 100644
--- a/include/subdir.mk
+++ b/include/subdir.mk
@@ -61,7 +61,7 @@ define subdir
   $(call warn,$(1),d,D $(1))
   $(foreach bd,$($(1)/builddirs),
     $(call warn,$(1),d,BD $(1)/$(bd))
-    $(foreach target,$(SUBTARGETS),
+    $(foreach target,$(SUBTARGETS) $($(1)/subtargets),
       $(foreach btype,$(buildtypes-$(bd)),
         $(call warn_eval,$(1)/$(bd),t,T,$(1)/$(bd)/$(btype)/$(target): $(if $(QUILT),,$($(1)/$(bd)/$(btype)/$(target)) $(call $(1)//$(btype)/$(target),$(1)/$(bd)/$(btype))))
 		  $(call log_make,$(1)/$(bd),$(target),$(btype),$(filter-out __default,$(variant))) \
@@ -81,7 +81,7 @@ define subdir
 	  )
 	)
   )
-  $(foreach target,$(SUBTARGETS),$(call subtarget,$(1),$(target)))
+  $(foreach target,$(SUBTARGETS) $($(1)/subtargets),$(call subtarget,$(1),$(target)))
 endef
 
 ifndef DUMP_TARGET_DB
diff --git a/package/Makefile b/package/Makefile
index 6929c47..fd0e88f 100644
--- a/package/Makefile
+++ b/package/Makefile
@@ -12,7 +12,6 @@ include $(INCLUDE_DIR)/rootfs.mk
 -include $(TMP_DIR)/.packagedeps
 $(curdir)/autoremove:=1
 $(curdir)/builddirs:=$(sort $(package-) $(package-y) $(package-m))
-$(curdir)/builddirs-install:=.
 $(curdir)/builddirs-default:=. $(sort $(package-y) $(package-m))
 $(curdir)/builddirs-prereq:=. $(sort $(prereq-y) $(prereq-m))
 ifdef CHECK_ALL
diff --git a/rules.mk b/rules.mk
index 83d7167..5d30bab 100644
--- a/rules.mk
+++ b/rules.mk
@@ -101,7 +101,7 @@ ifdef CONFIG_MIPS64_ABI
   endif
 endif
 
-DEFAULT_SUBDIR_TARGETS:=clean download prepare compile install update refresh prereq dist distcheck configure check check-depends
+DEFAULT_SUBDIR_TARGETS:=clean download prepare compile update refresh prereq dist distcheck configure check check-depends
 
 define DefaultTargets
 $(foreach t,$(DEFAULT_SUBDIR_TARGETS) $(1),
diff --git a/target/Makefile b/target/Makefile
index db87c78..7ad26c7 100644
--- a/target/Makefile
+++ b/target/Makefile
@@ -6,6 +6,7 @@
 #
 curdir:=target
 
+$(curdir)/subtargets:=install
 $(curdir)/builddirs:=linux sdk imagebuilder toolchain
 $(curdir)/builddirs-default:=linux
 $(curdir)/builddirs-install:=linux $(if $(CONFIG_SDK),sdk) $(if $(CONFIG_IB),imagebuilder) $(if $(CONFIG_MAKE_TOOLCHAIN),toolchain)



More information about the lede-commits mailing list