[CRIU] [PATCH] build: Don't treat criu/criu as a .PHONY target

Cyrill Gorcunov gorcunov at openvz.org
Wed Feb 24 08:15:07 PST 2016


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.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 Makefile      | 11 ++++++-----
 criu/Makefile |  1 -
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index 290624917aea..defa7e3667c4 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 1e1c73ce22d3..32e738a61819 100644
--- a/criu/Makefile
+++ b/criu/Makefile
@@ -149,7 +149,6 @@ built-in.o: pie
 criu: $(PROGRAM-BUILTINS)
 	$(call msg-link, $@)
 	$(Q) $(CC) $(CFLAGS) $^ $(LIBS) $(LDFLAGS) $(GMONLDOPT) -rdynamic -o $@
-PHONY += criu
 
 #
 # Cleanup everything.
-- 
2.5.0



More information about the CRIU mailing list