Commit 38eacf5e authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

build: criu -- Drop redundant phonies

Everytime we build the executable we've to check
all the deps and sources for changes, thus
don't protvide criu/criu on toplevel as
a target file (my bug in 496b51b6).

Instead bring this target as a phony back
but drop phony from criu/Makefile itself,
as it should be from the beginning.

Same time remove unneeded phonies over
the targets which are real files.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Tested-by: 's avatarTycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 1ec3a107
......@@ -116,20 +116,21 @@ PHONY += images
# the nmk so we can reuse it there.
criu/%: images/built-in.o
$(Q) $(MAKE) -C criu $@
criu/criu: images/built-in.o
$(Q) $(MAKE) -C criu criu
criu: images/built-in.o
$(Q) $(MAKE) -C criu all
.PHONY: criu
#
# Libraries next once criu it ready
# (we might generate headers and such
# when building criu itself).
lib/%: criu/criu
lib/%: criu
$(Q) $(MAKE) -C lib $@
lib: criu/criu
lib: criu
$(Q) $(MAKE) -C lib all
PHONY += lib
all: criu/criu lib
all: criu lib
PHONY += all
clean-built:
......
......@@ -89,14 +89,12 @@ config: $(VERSION_HEADER)
SYSCALL-LIB := $(ARCH_DIR)/syscalls.built-in.o
$(SYSCALL-LIB): config
$(Q) $(MAKE) $(call build-as,Makefile.syscalls,$(ARCH_DIR)) all
PHONY += $(SYSCALL-LIB)
#
# Architecture dependant part.
ARCH-LIB := $(ARCH_DIR)/crtools.built-in.o
$(ARCH-LIB): config $(SYSCALL-LIB)
$(Q) $(MAKE) $(call build-as,Makefile,$(ARCH_DIR)) $@
PHONY += $(ARCH-LIB)
#
# piegen tool needed for PIE code.
......@@ -119,7 +117,7 @@ pie/lib.a: $(ARCH-LIB) $(SYSCALL-LIB)
# PIE code blobs themseves.
pie: $(piegen-bin) pie/lib.a
$(Q) $(MAKE) $(build)=pie all
PHONY += pie
.PHONY: pie
#
# CRIU executable
......@@ -136,7 +134,6 @@ built-in.o: pie
criu: $(PROGRAM-BUILTINS)
$(call msg-link, $@)
$(Q) $(CC) $(CFLAGS) $^ $(LIBS) $(LDFLAGS) $(GMONLDOPT) -rdynamic -o $@
PHONY += criu
#
# Cleanup everything.
......@@ -153,6 +150,7 @@ clean:
$(Q) $(RM) $(VERSION_HEADER)
$(Q) $(RM) $(CONFIG_HEADER)
$(Q) $(RM) criu
.PHONY: clean
UAPI_HEADERS := include/criu-plugin.h include/criu-log.h
......@@ -162,10 +160,10 @@ install: criu
$(Q) install -m 755 criu $(DESTDIR)$(SBINDIR)
$(Q) mkdir -p $(DESTDIR)$(INCLUDEDIR)
$(Q) install -m 644 $(UAPI_HEADERS) $(DESTDIR)$(INCLUDEDIR)
.PHONY: install
#
# Final @all target.
all: $(PHONY)
all: criu
@true
.PHONY: $(PHONY) clean install
.PHONY: all
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