From 38eacf5edb7da899b1e79a4512843f64f7f09a2f Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Wed, 24 Feb 2016 19:10:38 +0300 Subject: [PATCH] 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 496b51b64a6). 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: Cyrill Gorcunov Tested-by: Tycho Andersen Signed-off-by: Pavel Emelyanov --- Makefile | 11 ++++++----- criu/Makefile | 12 +++++------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 8263b6a09..7d1eed663 100644 --- a/Makefile +++ b/Makefile @@ -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: diff --git a/criu/Makefile b/criu/Makefile index 9190b1108..3954b4a61 100644 --- a/criu/Makefile +++ b/criu/Makefile @@ -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