[CRIU] [PATCH 37/38] compel: Generate link to config.h
Cyrill Gorcunov
gorcunov at openvz.org
Tue Oct 11 09:04:27 PDT 2016
We need it for our headers.
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
Makefile | 1 +
Makefile.compel | 9 +++++++--
compel/include/compel/ptrace.h | 2 +-
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index 7a57aa5ae3ab..2c74703431f6 100644
--- a/Makefile
+++ b/Makefile
@@ -267,6 +267,7 @@ mrproper: subclean
$(Q) $(RM) $(CONFIG_HEADER)
$(Q) $(RM) $(VERSION_HEADER)
$(Q) $(RM) $(COMPEL_VERSION_HEADER)
+ $(Q) $(RM) $(COMPEL_CONFIG_HEADER)
$(Q) $(RM) cscope.*
$(Q) $(RM) tags TAGS
.PHONY: mrproper
diff --git a/Makefile.compel b/Makefile.compel
index ac20d0e55d42..0b3f807de6c6 100644
--- a/Makefile.compel
+++ b/Makefile.compel
@@ -1,4 +1,5 @@
COMPEL_VERSION_HEADER := compel/include/compel/version.h
+COMPEL_CONFIG_HEADER := compel/include/compel/config.h
$(COMPEL_VERSION_HEADER): $(SRC_DIR)/Makefile.versions
$(call msg-gen, $(COMPEL_VERSION_HEADER))
@@ -11,14 +12,18 @@ $(COMPEL_VERSION_HEADER): $(SRC_DIR)/Makefile.versions
$(Q) echo "#define COMPEL_SO_VERSION_SUBLEVEL " $(COMPEL_SO_VERSION_SUBLEVEL) >> $(COMPEL_VERSION_HEADER)
$(Q) echo "#endif /* COMPEL_SO_VERSION_H__ */" >> $(COMPEL_VERSION_HEADER)
+$(COMPEL_CONFIG_HEADER): $(CONFIG_HEADER)
+ $(call msg-gen, $@)
+ $(Q) ln -s $^ $@
+
#
# Compel itself.
-compel/%: $(COMPEL_VERSION_HEADER) $(CONFIG_HEADER) .FORCE
+compel/%: $(COMPEL_VERSION_HEADER) $(COMPEL_CONFIG_HEADER) .FORCE
$(Q) $(MAKE) $(build)=compel $@
#
# Plugins
-compel/plugins/%: $(COMPEL_VERSION_HEADER) $(CONFIG_HEADER) .FORCE
+compel/plugins/%: $(COMPEL_VERSION_HEADER) $(COMPEL_CONFIG_HEADER) .FORCE
$(Q) $(MAKE) $(build)=compel/plugins $@
#
diff --git a/compel/include/compel/ptrace.h b/compel/include/compel/ptrace.h
index e9c362a30ac5..db0f777a70e3 100644
--- a/compel/include/compel/ptrace.h
+++ b/compel/include/compel/ptrace.h
@@ -5,7 +5,7 @@
#include <sys/ptrace.h>
#include <stdint.h>
-//#include "config.h"
+#include "config.h"
/* some constants for ptrace */
#ifndef PTRACE_SEIZE
--
2.7.4
More information about the CRIU
mailing list