From 9407621eba08ff339b21de75b8d229788370e7d8 Mon Sep 17 00:00:00 2001 From: Leo Yuriev Date: Thu, 4 Aug 2016 10:41:21 +0300 Subject: [PATCH] mdbx: allow CC=xyz for ci-target rules. Change-Id: Ie5ae783ffde8293b1c6b5c1cfe90f98d829d91ae --- Makefile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 870166c0..62924d7e 100644 --- a/Makefile +++ b/Makefile @@ -198,13 +198,15 @@ bench: bench-lmdb.txt bench-mdbx.txt endif -ci-rule = @( CC=$$(which $1); if [ -n "$$CC" ]; then \ +ci-rule = ( CC=$$(which $1); if [ -n "$$CC" ]; then \ CC=$$(readlink -f $$CC); echo -n "probe by $2 ($$CC): " && \ $(MAKE) clean >$1.log 2>$1.err && $(MAKE) all check 1>$1.log 2>$1.err && echo "OK" \ || ( echo "FAILED"; cat $1.err >&2; exit 1 ); \ else echo "no $2 ($1) for probe"; fi; ) ci: - $(call ci-rule,cc,default C compiler) - $(call ci-rule,gcc,GCC) - $(call ci-rule,clang,clang LLVM) - $(call ci-rule,icc,Intel C) + @if [ "$(CC)" != "gcc" ]; then \ + $(call ci-rule,$(CC),default C compiler); \ + fi + @$(call ci-rule,gcc,GCC) + @$(call ci-rule,clang,clang LLVM) + @$(call ci-rule,icc,Intel C)