[CRIU] [PATCH 09/11] nmk: Make collect-deps to be more precise about targets
Cyrill Gorcunov
gorcunov at gmail.com
Thu Jul 12 15:51:40 MSK 2018
Thus to choose which deps to include, for example if only
particular file is being build there is no need to include
any other deps.
Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
---
scripts/nmk/scripts/build.mk | 26 ++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/scripts/nmk/scripts/build.mk b/scripts/nmk/scripts/build.mk
index bf5048fcaab1..d01d2b72c9d6 100644
--- a/scripts/nmk/scripts/build.mk
+++ b/scripts/nmk/scripts/build.mk
@@ -277,20 +277,22 @@ define collect-target-deps
endif
endef
define collect-deps
- ifneq ($(filter-out %.d,$(1)),)
- ifneq ($(filter %.o %.i %.s,$(1)),)
- deps-y += $(addsuffix .d,$(basename $(1)))
- endif
- endif
- $(eval $(call collect-builtin-deps,$(builtin-target),$(1)))
- $(eval $(call collect-lib-deps,$(lib-target),$(1)))
- $(foreach t,$(hostprogs-y),$(eval $(call collect-hostprogs-deps,$(t),$(1))))
- $(foreach t,$(target),$(eval $(call collect-target-deps,$(t),$(1))))
- ifneq ($(filter all $(filter-out $(builtin-target) $(lib-target), $(all-y)) $(hostprogs-y),$(1)),)
- deps-y += $(obj-y:.o=.d)
- deps-y += $(lib-y:.o=.d)
+ ifneq ($(filter all,$(1)),)
+ $(eval $(call collect-builtin-deps,$(builtin-target),$(builtin-target)))
+ $(eval $(call collect-lib-deps,$(lib-target),$(lib-target)))
$(foreach t,$(hostprogs-y),$(eval $(call collect-hostprogs-deps,$(t),$(t))))
$(foreach t,$(target),$(eval $(call collect-target-deps,$(t),$(t))))
+ else
+ ifneq ($(filter-out %.d $(builtin-target) $(lib-target) $(hostprogs-y) $(target),$(1)),)
+ ifneq ($(filter %.o %.i %.s,$(1)),)
+ deps-y += $(addsuffix .d,$(basename $(1)))
+ endif
+ else
+ $(eval $(call collect-builtin-deps,$(builtin-target),$(1)))
+ $(eval $(call collect-lib-deps,$(lib-target),$(1)))
+ $(foreach t,$(hostprogs-y),$(eval $(call collect-hostprogs-deps,$(t),$(1))))
+ $(foreach t,$(target),$(eval $(call collect-target-deps,$(t),$(1))))
+ endif
endif
endef
--
2.14.4
More information about the CRIU
mailing list