[CRIU] [PATCH] make: fix blob dependencies

Kinsbursky Stanislav skinsbursky at openvz.org
Tue May 29 11:55:37 EDT 2012


From: Stanislav Kinsbursky <skinsbursky at openvz.org>

Without this patch "touch parasite.c" will lead to rebuild of the whole
project.
This patch also introduces "pie" goal as a subsystem. This will be usefull,
when other subsystems will apper, because it allows to build them in parallel.
"all" becomes default goal. This allows to skip deps inclusion for empty,
"all", "zdtm" and "test-legacy" goals.

Signed-off-by: Stanislav Kinsbursky <skinsbursky at openvz.org>
---
 Makefile  |   22 ++++++++++------------
 cr-dump.c |    2 ++
 2 files changed, 12 insertions(+), 12 deletions(-)
-------------- next part --------------
diff --git a/Makefile b/Makefile
index 52abbbd..f3284e8 100644
--- a/Makefile
+++ b/Makefile
@@ -61,9 +61,13 @@ DEPS		:= $(patsubst %.o,%.d,$(OBJS))
 include Makefile.syscall
 include Makefile.pie
 
-.PHONY: all test-legacy zdtm test rebuild clean distclean tags cscope docs help
+.PHONY: all test-legacy zdtm test rebuild clean distclean tags cscope	\
+	docs help pie
 
-all: $(PROGRAM)
+all: pie
+	$(Q) $(MAKE) $(PROGRAM)
+
+pie: $(PIE-GEN)
 
 %.o: %.c
 	$(E) "  CC      " $@
@@ -81,16 +85,14 @@ all: $(PROGRAM)
 	$(E) "  DEP     " $@
 	$(Q) $(CC) -M -MT $@ -MT $(patsubst %.d,%.o,$@) $(CFLAGS) $< -o $@
 
-$(DEPS) $(OBJS): $(SYS-OBJ) $(PIE-GEN)
-
 $(PROGRAM): $(OBJS)
 	$(E) "  LINK    " $@
 	$(Q) $(CC) $(CFLAGS) $(OBJS) $(LIBS) $(SYS-OBJ) -o $@
 
-test-legacy: $(PROGRAM)
+test-legacy: all
 	$(Q) $(MAKE) -C test/legacy all
 
-zdtm: $(PROGRAM)
+zdtm: all
 	$(Q) $(MAKE) -C test/zdtm all
 
 test: zdtm
@@ -148,18 +150,14 @@ help:
 	$(E) '      rebuild         - Force-rebuild of [*] targets'
 	$(E) '      test            - Run zdtm test-suite'
 
-deps-targets := $(OBJS) $(patsubst %.o,%.s,$(OBJS)) $(patsubst %.o,%.i,$(OBJS)) $(PROGRAM) zdtm test-legacy
+deps-targets := $(OBJS) $(patsubst %.o,%.s,$(OBJS)) $(patsubst %.o,%.i,$(OBJS)) $(PROGRAM)
 
-.DEFAULT_GOAL	:= $(PROGRAM)
+.DEFAULT_GOAL	:= all
 
 ifneq ($(filter $(deps-targets), $(MAKECMDGOALS)),)
 	INCDEPS := 1
 endif
 
-ifeq ($(MAKECMDGOALS),)
-	INCDEPS := 1
-endif
-
 ifeq ($(INCDEPS),1)
 -include $(DEPS)
 endif
diff --git a/cr-dump.c b/cr-dump.c
index ec0d049..416cd8f 100644
--- a/cr-dump.c
+++ b/cr-dump.c
@@ -41,6 +41,8 @@
 #include "eventpoll.h"
 #include "inotify.h"
 
+#include "protobuf/tmp.pb-c.h"
+
 #ifndef CONFIG_X86_64
 # error No x86-32 support yet
 #endif


More information about the CRIU mailing list