From d62e46ac77464ff218d0bb50af857c28f97ecb02 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Mon, 15 Apr 2019 21:47:29 +0200 Subject: [PATCH] fs: introduce variable with all recursive dependencies This allows getting all the recursive dependencies of filesystems, ike we have for packages, and allows us to treat both in a similar fashion. Reported-by: Arnout Vandecappelle Signed-off-by: "Yann E. MORIN" Cc: Arnout Vandecappelle Cc: Thomas Petazzoni Cc: Thomas De Schampheleire Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- fs/common.mk | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/fs/common.mk b/fs/common.mk index 286d671d06..5ec28ca183 100644 --- a/fs/common.mk +++ b/fs/common.mk @@ -49,6 +49,18 @@ ROOTFS_COMMON_DEPENDENCIES = \ $(BR2_TAR_HOST_DEPENDENCY) \ $(if $(PACKAGES_USERS)$(ROOTFS_USERS_TABLES),host-mkpasswd) +ROOTFS_COMMON_FINAL_RECURSIVE_DEPENDENCIES = $(sort \ + $(if $(filter undefined,$(origin ROOTFS_COMMON_FINAL_RECURSIVE_DEPENDENCIES__X)), \ + $(eval ROOTFS_COMMON_FINAL_RECURSIVE_DEPENDENCIES__X := \ + $(foreach p, \ + $(ROOTFS_COMMON_DEPENDENCIES), \ + $(p) \ + $($(call UPPERCASE,$(p))_FINAL_RECURSIVE_DEPENDENCIES) \ + ) \ + ) \ + ) \ + $(ROOTFS_COMMON_FINAL_RECURSIVE_DEPENDENCIES__X)) + rootfs-common-show-dependency-tree: $(patsubst %,%-show-dependency-tree,$(ROOTFS_COMMON_DEPENDENCIES)) $(info rootfs-common: host) $(info rootfs-common -> $(foreach d,$(ROOTFS_COMMON_DEPENDENCIES),$(d))) @@ -88,6 +100,18 @@ ROOTFS_$(2)_TARGET_DIR = $$(ROOTFS_$(2)_DIR)/target ROOTFS_$(2)_DEPENDENCIES += rootfs-common +ROOTFS_$(2)_FINAL_RECURSIVE_DEPENDENCIES = $$(sort \ + $$(if $$(filter undefined,$$(origin ROOTFS_$(2)_FINAL_RECURSIVE_DEPENDENCIES__X)), \ + $$(eval ROOTFS_$(2)_FINAL_RECURSIVE_DEPENDENCIES__X := \ + $$(foreach p, \ + $$(ROOTFS_$(2)_DEPENDENCIES), \ + $$(p) \ + $$($$(call UPPERCASE,$$(p))_FINAL_RECURSIVE_DEPENDENCIES) \ + ) \ + ) \ + ) \ + $$(ROOTFS_$(2)_FINAL_RECURSIVE_DEPENDENCIES__X)) + rootfs-$(1)-show-dependency-tree: $$(patsubst %,%-show-dependency-tree,$$(ROOTFS_$(2)_DEPENDENCIES)) $$(info rootfs-$(1): host) $$(info rootfs-$(1) -> $$(foreach d,$$(ROOTFS_$(2)_DEPENDENCIES),$$(d))) -- 2.30.2