[CRIU] [PATCH] zdtm: autodetect the target machine
Andrew Vagin
avagin at parallels.com
Thu Jan 24 02:15:17 EST 2013
On Wed, Jan 23, 2013 at 06:22:05PM +0400, Alexander Kartashov wrote:
> Andrew Vagin pointed out that the static testsuite compilation
> may run as standalone so the variable ARCH won't be available.
>
> This patch enables test/zdtm/live/static/Makefile to detect
> the target machine automatically if the variable ARCH isn't defined.
I want to execute make not only in live/static, but in other diretories
too.
zdtm/lib, zdtm/live/*
Could we save a common part in a separate file and then include it in
all Makefiles?
>
> Signed-off-by: Alexander Kartashov <alekskartashov at parallels.com>
> ---
> test/zdtm/live/static/Makefile | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/test/zdtm/live/static/Makefile b/test/zdtm/live/static/Makefile
> index 194930b..23bc605 100644
> --- a/test/zdtm/live/static/Makefile
> +++ b/test/zdtm/live/static/Makefile
> @@ -1,3 +1,22 @@
> +ifeq ($(ARCH),)
> +
> +MACH := $(shell uname -m | sed -e s/i.86/i386/)
> +
> +ifeq ($(MACH),i386)
> + ARCH := x86
> +endif
> +
> +ifeq ($(MACH),x86_64)
> + ARCH := x86
> +endif
> +
> +ifeq ($(findstring arm,$(MACH)),arm)
> + ARCH := arm
> +endif
> +
> +endif
> +
> +
> LIBDIR = ../../lib
> LIB = $(LIBDIR)/libzdtmtst.a
> override CPPFLAGS += -I$(LIBDIR) -iquote $(LIBDIR)/arch/$(ARCH)/include
> --
> 1.7.10.4
>
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu
More information about the CRIU
mailing list