[CRIU] [PATCH 11/24] Makefiles: introduce/use COMPEL_BIN

Kir Kolyshkin kir at openvz.org
Sat Dec 17 03:22:04 PST 2016


We call compel-host binary from a number of places, so
let's add COMPEL_BIN variable and use it.

Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
 Makefile.compel   | 3 +++
 criu/pie/Makefile | 8 ++++----
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/Makefile.compel b/Makefile.compel
index d15b267..43d3255 100644
--- a/Makefile.compel
+++ b/Makefile.compel
@@ -1,3 +1,6 @@
+COMPEL_BIN		:= $(SRC_DIR)/compel/compel-host
+export COMPEL_BIN
+
 COMPEL_VERSION_HEADER	:= compel/include/version.h
 
 $(COMPEL_VERSION_HEADER): $(SRC_DIR)/Makefile.versions
diff --git a/criu/pie/Makefile b/criu/pie/Makefile
index c06fb01..9af9155 100644
--- a/criu/pie/Makefile
+++ b/criu/pie/Makefile
@@ -33,7 +33,7 @@ ccflags-y	+= -DCR_NOGLIBC
 ccflags-y	+= -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
 
 ifneq ($(filter-out clean mrproper,$(MAKECMDGOALS)),)
-        CFLAGS	+= $(shell $(SRC_DIR)/compel/compel-host cflags)
+        CFLAGS	+= $(shell $(COMPEL_BIN) cflags)
 endif
 
 ifeq ($(SRCARCH),arm)
@@ -60,9 +60,9 @@ $(obj)/%.built-in.bin.o: $(obj)/%.built-in.o $(obj)/pie.lib.a $(compel_lds)
 
 $(obj)/%-blob.h: $(obj)/%.built-in.bin.o $(SRC_DIR)/compel/compel-host-bin
 	$(call msg-gen, $@)
-	$(Q) $(SRC_DIR)/compel/compel-host hgen -f $<			\
-		-l 4							\
-		-p $(call target-name,$@)				\
+	$(Q) $(COMPEL_BIN) hgen -f $<		\
+		-l 4				\
+		-p $(call target-name,$@)	\
 		-o $@ $(piegen_stdout)
 
 all-y += $(BLOBS)
-- 
2.7.4



More information about the CRIU mailing list