mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
nmk: Add collect-hostprogs-deps helper
Thus will include hostprogs deps only if requested. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
parent
733c5b0b6f
commit
e4f62b929c
1 changed files with 7 additions and 1 deletions
|
|
@ -255,6 +255,11 @@ $(foreach t,$(libso-y),$(eval $(call gen-so-link-rules,$(t))))
|
|||
|
||||
#
|
||||
# Figure out if the target we're building needs deps to include.
|
||||
define collect-hostprogs-deps
|
||||
ifeq ($(1),$(2))
|
||||
deps-y += $(addprefix $(obj)/,$($(1)-objs:.o=.d))
|
||||
endif
|
||||
endef
|
||||
define collect-deps
|
||||
ifneq ($(filter-out %.d,$(1)),)
|
||||
ifneq ($(filter %.o %.i %.s,$(1)),)
|
||||
|
|
@ -267,11 +272,12 @@ define collect-deps
|
|||
ifeq ($(lib-target),$(1))
|
||||
deps-y += $(lib-y:.o=.d)
|
||||
endif
|
||||
$(foreach t,$(hostprogs-y),$(eval $(call collect-hostprogs-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)
|
||||
deps-y += $(foreach t,$(target),$(call objectify,$($(t)-lib-y:.o=.d)) $(call objectify,$($(t)-obj-y:.o=.d)))
|
||||
deps-y += $(foreach t,$(hostprogs-y),$(addprefix $(obj)/,$($(t)-objs:.o=.d)))
|
||||
$(foreach t,$(hostprogs-y),$(eval $(call collect-hostprogs-deps,$(t),$(t))))
|
||||
endif
|
||||
endef
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue