[CRIU] [PATCH 5/6] make: remove config tests

Ruslan Kuprieiev kupruser at gmail.com
Fri Mar 21 00:27:06 PDT 2014


Signed-off-by: Ruslan Kuprieiev <kupruser at gmail.com>
---
 Makefile.config           | 32 ----------------------
 scripts/feature-tests.mak | 70 -----------------------------------------------
 scripts/utilities.mak     | 15 ----------
 3 files changed, 117 deletions(-)
 delete mode 100644 Makefile.config
 delete mode 100644 scripts/feature-tests.mak
 delete mode 100644 scripts/utilities.mak

diff --git a/Makefile.config b/Makefile.config
deleted file mode 100644
index 880d97c..0000000
--- a/Makefile.config
+++ /dev/null
@@ -1,32 +0,0 @@
-include scripts/utilities.mak
-include scripts/feature-tests.mak
-
-CONFIG		:= include/config.h
-
-$(CONFIG): scripts/utilities.mak scripts/feature-tests.mak include/config-base.h
-	$(E) "  GEN     " $@
-	$(Q) @echo '#ifndef __CR_CONFIG_H__' > $@
-	$(Q) @echo '#define __CR_CONFIG_H__' >> $@
-	$(Q) @echo '' >> $@
-	$(Q) @echo '#include "config-base.h"' >> $@
-	$(Q) @echo '' >> $@
-ifeq ($(call try-cc,$(TCP_REPAIR_TEST),,),y)
-	$(Q) @echo '#define CONFIG_HAS_TCP_REPAIR' >> $@
-endif
-ifeq ($(call try-cc,$(PRLIMIT_TEST),,),y)
-	$(Q) @echo '#define CONFIG_HAS_PRLIMIT' >> $@
-endif
-ifeq ($(call try-cc,$(STRLCPY_TEST),,),y)
-	$(Q) @echo '#define CONFIG_HAS_STRLCPY' >> $@
-endif
-ifeq ($(call try-cc,$(STRLCAT_TEST),,),y)
-	$(Q) @echo '#define CONFIG_HAS_STRLCAT' >> $@
-endif
-ifeq ($(call try-cc,$(PTRACE_PEEKSIGINFO_TEST),,),y)
-	$(Q) @echo '#define CONFIG_HAS_PEEKSIGINFO_ARGS' >> $@
-endif
-	$(Q) @echo '#endif /* __CR_CONFIG_H__ */' >> $@
-
-config: $(CONFIG)
-
-.PHONY: config
diff --git a/scripts/feature-tests.mak b/scripts/feature-tests.mak
deleted file mode 100644
index be65dfa..0000000
--- a/scripts/feature-tests.mak
+++ /dev/null
@@ -1,70 +0,0 @@
-define TCP_REPAIR_TEST
-
-#include <netinet/tcp.h>
-
-int main(void)
-{
-	struct tcp_repair_opt opts;
-	opts.opt_code = TCP_NO_QUEUE;
-	opts.opt_val = 0;
-
-	return opts.opt_val;
-}
-endef
-
-define PRLIMIT_TEST
-
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-
-int main(void)
-{
-	struct rlimit limit = {
-		.rlim_cur = RLIM_INFINITY,
-		.rlim_max = RLIM_INFINITY,
-	};
-
-	return prlimit(getpid(), RLIMIT_CPU, &limit, NULL);
-}
-endef
-
-define STRLCPY_TEST
-
-#include <string.h>
-
-int main(void)
-{
-	char src[32] = "strlcpy";
-	char dst[32];
-
-	return strlcpy(dst, src, sizeof(dst));
-}
-endef
-
-define STRLCAT_TEST
-
-#include <string.h>
-
-int main(void)
-{
-	char src[32] = "strlcat";
-	char dst[32];
-
-	return strlcat(dst, src, sizeof(dst));
-}
-endef
-
-define PTRACE_PEEKSIGINFO_TEST
-
-#include <sys/ptrace.h>
-
-int main(void)
-{
-	struct ptrace_peeksiginfo_args args = {};
-
-	return 0;
-}
-
-endef
diff --git a/scripts/utilities.mak b/scripts/utilities.mak
deleted file mode 100644
index b2eb430..0000000
--- a/scripts/utilities.mak
+++ /dev/null
@@ -1,15 +0,0 @@
-# try-cc
-# Usage: option = $(call try-cc, source-to-build, cc-options)
-try-cc = $(shell sh -c						  \
-	'TMP="$(OUTPUT)$(TMPOUT).$$$$";				  \
-	 echo "$(1)" |						  \
-	 $(CC) -x c - $(2) -o "$$TMP" > /dev/null 2>&1 && echo y; \
-	 rm -f "$$TMP"')
-
-# try-build
-# Usage: option = $(call try-build, source-to-build, cc-options, link-options)
-try-build = $(shell sh -c							\
-	'TMP="$(OUTPUT)$(TMPOUT).$$$$";						\
-	echo "$(1)" |								\
-	$(CC) -x c - $(2) $(3) -o "$$TMP" > /dev/null 2>&1 && echo y;		\
-	rm -f "$$TMP"')
-- 
1.8.3.2



More information about the CRIU mailing list