[CRIU] Re: [PATCH] make: Fix dependency generation

Cyrill Gorcunov gorcunov at openvz.org
Fri Apr 6 13:37:12 EDT 2012


On Fri, Apr 06, 2012 at 09:31:31PM +0400, Pavel Emelyanov wrote:
> > 
> > Agreed. Patch is good (except these circular dependences). But this problem 
> > can't be fixed easily and actually is another task.
> > 
> 
> So, where in this thread the proper patch sits?
> 

I add it here

	Cyrill
-------------- next part --------------
>From a36a961d39ee1180e9173864e6342da272a45389 Mon Sep 17 00:00:00 2001
From: Cyrill Gorcunov <gorcunov at openvz.org>
Date: Thu, 5 Apr 2012 16:49:12 +0400
Subject: [PATCH] make: Fix dependency generation

In case if no goals specified the all
goal is implied so don't forget to generate
deps. This as well fixes a problem where
two "make clean" in a row forced build system
to regenerate deps.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 Makefile |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 40e3249..cc490c8 100644
--- a/Makefile
+++ b/Makefile
@@ -200,8 +200,16 @@ help:
 	$(E) '      test            - Run zdtm test-suite'
 .PHONY: help
 
-deps-targets := %.o %.s %.i
+deps-targets := %.o %.s %.i $(PROGRAM) zdtm test-legacy
 
-ifeq ($(filter deps-targets, $(MAKECMDGOALS)),)
+ifneq ($(filter $(deps-targets), $(MAKECMDGOALS)),)
+	INCDEPS := 1
+endif
+
+ifeq ($(MAKECMDGOALS),)
+	INCDEPS := 1
+endif
+
+ifeq ($(INCDEPS),1)
 -include $(DEPS)
 endif
-- 
1.7.7.6



More information about the CRIU mailing list