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 ...@@ -116,20 +116,21 @@ PHONY += images
# the nmk so we can reuse it there. # the nmk so we can reuse it there.
criu/%: images/built-in.o criu/%: images/built-in.o
$(Q) $(MAKE) -C criu $@ $(Q) $(MAKE) -C criu $@
criu/criu: images/built-in.o criu: images/built-in.o
$(Q) $(MAKE) -C criu criu $(Q) $(MAKE) -C criu all
.PHONY: criu
# #
# Libraries next once criu it ready # Libraries next once criu it ready
# (we might generate headers and such # (we might generate headers and such
# when building criu itself). # when building criu itself).
lib/%: criu/criu lib/%: criu
$(Q) $(MAKE) -C lib $@ $(Q) $(MAKE) -C lib $@
lib: criu/criu lib: criu
$(Q) $(MAKE) -C lib all $(Q) $(MAKE) -C lib all
PHONY += lib PHONY += lib
all: criu/criu lib all: criu lib
PHONY += all PHONY += all
clean-built: clean-built:
......
...@@ -89,14 +89,12 @@ config: $(VERSION_HEADER) ...@@ -89,14 +89,12 @@ config: $(VERSION_HEADER)
SYSCALL-LIB := $(ARCH_DIR)/syscalls.built-in.o SYSCALL-LIB := $(ARCH_DIR)/syscalls.built-in.o
$(SYSCALL-LIB): config $(SYSCALL-LIB): config
$(Q) $(MAKE) $(call build-as,Makefile.syscalls,$(ARCH_DIR)) all $(Q) $(MAKE) $(call build-as,Makefile.syscalls,$(ARCH_DIR)) all
PHONY += $(SYSCALL-LIB)
# #
# Architecture dependant part. # Architecture dependant part.
ARCH-LIB := $(ARCH_DIR)/crtools.built-in.o ARCH-LIB := $(ARCH_DIR)/crtools.built-in.o
$(ARCH-LIB): config $(SYSCALL-LIB) $(ARCH-LIB): config $(SYSCALL-LIB)
$(Q) $(MAKE) $(call build-as,Makefile,$(ARCH_DIR)) $@ $(Q) $(MAKE) $(call build-as,Makefile,$(ARCH_DIR)) $@
PHONY += $(ARCH-LIB)
# #
# piegen tool needed for PIE code. # piegen tool needed for PIE code.
...@@ -119,7 +117,7 @@ pie/lib.a: $(ARCH-LIB) $(SYSCALL-LIB) ...@@ -119,7 +117,7 @@ pie/lib.a: $(ARCH-LIB) $(SYSCALL-LIB)
# PIE code blobs themseves. # PIE code blobs themseves.
pie: $(piegen-bin) pie/lib.a pie: $(piegen-bin) pie/lib.a
$(Q) $(MAKE) $(build)=pie all $(Q) $(MAKE) $(build)=pie all
PHONY += pie .PHONY: pie
# #
# CRIU executable # CRIU executable
...@@ -136,7 +134,6 @@ built-in.o: pie ...@@ -136,7 +134,6 @@ built-in.o: pie
criu: $(PROGRAM-BUILTINS) criu: $(PROGRAM-BUILTINS)
$(call msg-link, $@) $(call msg-link, $@)
$(Q) $(CC) $(CFLAGS) $^ $(LIBS) $(LDFLAGS) $(GMONLDOPT) -rdynamic -o $@ $(Q) $(CC) $(CFLAGS) $^ $(LIBS) $(LDFLAGS) $(GMONLDOPT) -rdynamic -o $@
PHONY += criu
# #
# Cleanup everything. # Cleanup everything.
...@@ -153,6 +150,7 @@ clean: ...@@ -153,6 +150,7 @@ clean:
$(Q) $(RM) $(VERSION_HEADER) $(Q) $(RM) $(VERSION_HEADER)
$(Q) $(RM) $(CONFIG_HEADER) $(Q) $(RM) $(CONFIG_HEADER)
$(Q) $(RM) criu $(Q) $(RM) criu
.PHONY: clean
UAPI_HEADERS := include/criu-plugin.h include/criu-log.h UAPI_HEADERS := include/criu-plugin.h include/criu-log.h
...@@ -162,10 +160,10 @@ install: criu ...@@ -162,10 +160,10 @@ install: criu
$(Q) install -m 755 criu $(DESTDIR)$(SBINDIR) $(Q) install -m 755 criu $(DESTDIR)$(SBINDIR)
$(Q) mkdir -p $(DESTDIR)$(INCLUDEDIR) $(Q) mkdir -p $(DESTDIR)$(INCLUDEDIR)
$(Q) install -m 644 $(UAPI_HEADERS) $(DESTDIR)$(INCLUDEDIR) $(Q) install -m 644 $(UAPI_HEADERS) $(DESTDIR)$(INCLUDEDIR)
.PHONY: install
# #
# Final @all target. # Final @all target.
all: $(PHONY) all: criu
@true @true
.PHONY: all
.PHONY: $(PHONY) clean install
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