[CRIU] [PATCH v4] make: fix blob dependencies

Kinsbursky Stanislav skinsbursky at openvz.org
Wed May 30 08:22:48 EDT 2012


From: Stanislav Kinsbursky <skinsbursky at openvz.org>

v4:
1) Fixed apply conflicts.

v3:
1) "crtools" goal dependences fixed.

v2:
1) wrong "protobuf/tmp.pb-c.h" inclusion removed from cr-dump.c

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 |   21 +++++++--------------
 1 files changed, 7 insertions(+), 14 deletions(-)
-------------- next part --------------
diff --git a/Makefile b/Makefile
index 80ce31a..13ecd34 100644
--- a/Makefile
+++ b/Makefile
@@ -62,13 +62,12 @@ include Makefile.syscall
 include Makefile.pie
 
 .PHONY: all test-legacy zdtm test rebuild clean distclean tags cscope	\
-	docs help deps preq
+	docs help pie
 
-all: deps $(PROGRAM)
+all: pie
+	$(Q) $(MAKE) $(PROGRAM)
 
-deps: preq $(DEPS)
-
-preq: $(SYS-OBJ) $(PIE-GEN)
+pie: $(PIE-GEN)
 
 %.o: %.c
 	$(E) "  CC      " $@
@@ -86,11 +85,9 @@ preq: $(SYS-OBJ) $(PIE-GEN)
 	$(E) "  DEP     " $@
 	$(Q) $(CC) -M -MT $@ -MT $(patsubst %.d,%.o,$@) $(CFLAGS) $< -o $@
 
-$(DEPS) $(OBJS): $(SYS-OBJ) $(PIE-GEN)
-
-$(PROGRAM): $(OBJS)
+$(PROGRAM): $(OBJS) $(LIBS) $(SYS-OBJ) 
 	$(E) "  LINK    " $@
-	$(Q) $(CC) $(CFLAGS) $(OBJS) $(LIBS) $(SYS-OBJ) -o $@
+	$(Q) $(CC) $(CFLAGS) $^ -o $@
 
 test-legacy: all
 	$(Q) $(MAKE) -C test/legacy all
@@ -153,7 +150,7 @@ 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	:= all
 
@@ -161,10 +158,6 @@ ifneq ($(filter $(deps-targets), $(MAKECMDGOALS)),)
 	INCDEPS := 1
 endif
 
-ifeq ($(MAKECMDGOALS),)
-	INCDEPS := 1
-endif
-
 ifeq ($(INCDEPS),1)
 -include $(DEPS)
 endif


More information about the CRIU mailing list