[CRIU] [PATCH 2/6] test/zdtm/Makefile.inc: don't regen all deps

Kir Kolyshkin kir at openvz.org
Tue May 2 16:51:43 PDT 2017


As it was pointed out by our esteemed maintainer (let his light shine),
after my recent changes to test/zdtm Makefiles all dependencies are
regenerated even if we only need to build a single test (for example,
cd test/zdtm/static && make env00).

This was caused by "-include $(DEP)" statement. Make sees that these files
are need to be included, but are missing, and since it knows how to generate
them it goes on to do so.

The solution is to use $(wildcard) function which returns the list of
_existing_ files, and so include will only receive the files that exist.

Reported-by: Andrei Vagin <avagin at virtuozzo.com>
Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
 test/zdtm/Makefile.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/zdtm/Makefile.inc b/test/zdtm/Makefile.inc
index 91d9a36..9b758c3 100644
--- a/test/zdtm/Makefile.inc
+++ b/test/zdtm/Makefile.inc
@@ -89,7 +89,7 @@ dep: $(DEP)
 no-deps-targets	:= clean cleandep cleanout realclean groups.cleanout
 
 ifeq ($(filter $(no-deps-targets), $(MAKECMDGOALS)),)
--include $(DEP)
+-include $(wildcard $(DEP))
 endif
 
 .SECONDARY:
-- 
2.9.3



More information about the CRIU mailing list