[CRIU] [PATCH] build: Simplify piegen usage

Cyrill Gorcunov gorcunov at openvz.org
Wed Feb 17 05:34:33 PST 2016


- no need for phony pie/piegen, redundant and rather may
  cause double execution of a target;
- drop $(ARCH_DIR) from pie deps, initially it should be syscall-lib,
  but pie/lib.a already has it.

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

diff --git a/criu/Makefile b/criu/Makefile
index b009c7b92fdb..73889f2b7381 100644
--- a/criu/Makefile
+++ b/criu/Makefile
@@ -110,16 +110,13 @@ PHONY += $(ARCH-LIB)
 #
 # piegen tool needed for PIE code.
 ifeq ($(piegen-y),y)
-piegen			:= pie/piegen/piegen
+piegen-bin		:= pie/piegen/piegen
 
 pie/piegen/%: config
 	$(Q) CC=$(HOSTCC) LD=$(HOSTLD) CFLAGS="$(HOSTCFLAGS) $(WARNINGS) $(DEFINES)" $(MAKE) $(build)=pie/piegen $@
-pie/piegen: config
-	$(Q) CC=$(HOSTCC) LD=$(HOSTLD) CFLAGS="$(HOSTCFLAGS) $(WARNINGS) $(DEFINES)" $(MAKE) $(build)=pie/piegen all
-$(piegen): pie/piegen/built-in.o
+$(piegen-bin): pie/piegen/built-in.o
 	$(call msg-link, $@)
 	$(Q) $(HOSTCC) $(HOSTCFLAGS) $^ $(LDFLAGS) -o $@
-PHONY += pie/piegen
 endif
 
 #
@@ -129,7 +126,7 @@ pie/lib.a: $(ARCH-LIB) $(SYSCALL-LIB)
 
 #
 # PIE code blobs themseves.
-pie: $(ARCH_DIR) $(piegen) pie/lib.a
+pie: $(piegen-bin) pie/lib.a
 	$(Q) $(MAKE) $(build)=pie all
 PHONY += pie
 
-- 
2.5.0



More information about the CRIU mailing list