[2/3] zdtm/make: Include Makefile.inc after defining $(DEP)

Submitted by Dmitry Safonov on April 30, 2018, 6:41 p.m.

Details

Message ID 20180430184158.3527-3-dima@arista.com
State New
Series "Series without cover letter"
Headers show

Commit Message

Dmitry Safonov April 30, 2018, 6:41 p.m.
Otherwise, tests dependencies are not considered for build.
Add an error in Makefile.inc so this won't happen again.

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Reported-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Dmitry Safonov <dima@arista.com>
---
 test/zdtm/Makefile.inc    | 3 +++
 test/zdtm/static/Makefile | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/test/zdtm/Makefile.inc b/test/zdtm/Makefile.inc
index 12fa86e0880c..170f31632e9e 100644
--- a/test/zdtm/Makefile.inc
+++ b/test/zdtm/Makefile.inc
@@ -98,6 +98,9 @@  dep: $(DEP)
 
 no-deps-targets	:= clean cleandep cleanout realclean groups.cleanout
 
+ifeq ($(strip $(DEP)),)
+$(error No DEP defined in sub-make)
+endif
 ifeq ($(filter $(no-deps-targets), $(MAKECMDGOALS)),)
 -include $(wildcard $(DEP))
 endif
diff --git a/test/zdtm/static/Makefile b/test/zdtm/static/Makefile
index 244b7070640e..3c42c68b43b5 100644
--- a/test/zdtm/static/Makefile
+++ b/test/zdtm/static/Makefile
@@ -216,8 +216,6 @@  TST_NOFILE	:=				\
 		unlink_multiple_largefiles	\
 #		jobctl00			\
 
-include ../Makefile.inc
-
 ifneq ($(SRCARCH),arm)
 ifneq ($(COMPAT_TEST),y)
         TST_NOFILE += maps03
@@ -376,6 +374,8 @@  OUT	= $(TST:%=%.out)
 STATE	= $(TST_STATE:%=%.state)
 STATE_OUT	= $(TST_STATE:%=%.out)
 
+include ../Makefile.inc
+
 all:	$(TST) criu-rtc.so
 install: all
 .PHONY: all install