Commit afd9559d authored by Kinsbursky Stanislav's avatar Kinsbursky Stanislav Committed by Pavel Emelyanov

make: fix blob dependencies

v5:
1) make change directory messages supressed.

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: 's avatarStanislav Kinsbursky <skinsbursky@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent dfdf54d9
......@@ -58,17 +58,18 @@ OBJS += inotify.o
DEPS := $(patsubst %.o,%.d,$(OBJS))
MAKEFLAGS += --no-print-directory
include Makefile.syscall
include Makefile.pie
.PHONY: all test-legacy zdtm test rebuild clean distclean tags cscope \
docs help deps preq
all: deps $(PROGRAM)
docs help pie
deps: preq $(DEPS)
all: pie
$(Q) $(MAKE) $(PROGRAM)
preq: $(SYS-OBJ) $(PIE-GEN)
pie: $(PIE-GEN)
%.o: %.c
$(E) " CC " $@
......@@ -86,11 +87,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 +152,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 +160,6 @@ ifneq ($(filter $(deps-targets), $(MAKECMDGOALS)),)
INCDEPS := 1
endif
ifeq ($(MAKECMDGOALS),)
INCDEPS := 1
endif
ifeq ($(INCDEPS),1)
-include $(DEPS)
endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment