From 7c5f9ed8cd029dda34b6167520d6b65fbc40fc69 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Fri, 14 Dec 2012 10:53:43 +0000 Subject: make the Make rules for compiler versioning be more portable with fewer shell calls --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 1f83cba58..2d61411c7 100644 --- a/Makefile +++ b/Makefile @@ -283,8 +283,9 @@ else endif # compiler versioning to adjust warning flags -CC_MAJOR := $(shell $(CC) -dumpversion | cut -f1 -d. ) -CC_MINOR := $(shell $(CC) -dumpversion | cut -f2 -d. ) +CC_VERSION := $(shell $(CC) -dumpversion) +CC_MAJOR := $(word 1,$(subst ., ,$(CC_VERSION))) +CC_MINOR := $(word 2,$(subst ., ,$(CC_VERSION))) define cc_ver_ge $(shell expr $(CC_MAJOR) \>= $(1) \& $(CC_MINOR) \>= $(2)) endef -- cgit v1.2.3