[CRIU] [PATCH] compel: Fix version file generation

Cyrill Gorcunov gorcunov at openvz.org
Fri Aug 26 03:51:36 PDT 2016


Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---

The patch is on top of [PATCH 0/9] compel: Initial rework draft
https://lists.openvz.org/pipermail/criu/2016-August/031174.html

 Makefile        | 1 +
 Makefile.compel | 5 +----
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 049bb8b76006..c03a0b439142 100644
--- a/Makefile
+++ b/Makefile
@@ -232,6 +232,7 @@ mrproper: subclean
 	$(Q) $(MAKE) $(build)=criu $@
 	$(Q) $(MAKE) $(build)=compel $@
 	$(Q) $(RM) $(VERSION_HEADER)
+	$(Q) $(RM) $(COMPEL_VERSION_HEADER)
 	$(Q) $(RM) cscope.*
 	$(Q) $(RM) tags TAGS
 .PHONY: mrproper
diff --git a/Makefile.compel b/Makefile.compel
index c42ad903cf77..7f2f62f6c4d0 100644
--- a/Makefile.compel
+++ b/Makefile.compel
@@ -1,4 +1,3 @@
-ifneq ($(filter-out clean mrproper,$(MAKECMDGOALS)),)
 COMPEL_VERSION_HEADER	:= compel/include/version.h
 
 $(COMPEL_VERSION_HEADER): $(SRC_DIR)/Makefile.versions
@@ -11,8 +10,6 @@ $(COMPEL_VERSION_HEADER): $(SRC_DIR)/Makefile.versions
 	$(Q) echo "#define COMPEL_SO_VERSION_MINOR " $(COMPEL_SO_VERSION_MINOR)		>> $(COMPEL_VERSION_HEADER)
 	$(Q) echo "#define COMPEL_SO_VERSION_SUBLEVEL " $(COMPEL_SO_VERSION_SUBLEVEL)	>> $(COMPEL_VERSION_HEADER)
 	$(Q) echo "#endif /* COMPEL_SO_VERSION_H__ */"					>> $(COMPEL_VERSION_HEADER)
-endif
-cleanup-y += $(COMPEL_VERSION_HEADER)
 
 #
 # Compel itself.
@@ -24,7 +21,7 @@ compel/%: $(COMPEL_VERSION_HEADER) .FORCE
 compel/plugins/%: $(COMPEL_VERSION_HEADER) .FORCE
 	$(Q) $(MAKE) $(build)=compel/plugins $@
 
-compel/compel: compel/built-in.o compel/lib.a
+compel/compel: compel/built-in.o compel/lib.a $(COMPEL_VERSION_HEADER)
 	$(call msg-link, $@)
 	$(Q) $(CC) $(CFLAGS) $^ $(WRAPFLAGS) $(LDFLAGS) -rdynamic -o $@
 
-- 
2.7.4



More information about the CRIU mailing list