summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2012-12-14 10:53:43 +0000
committerVincent Sanders <vince@kyllikki.org>2012-12-14 10:53:43 +0000
commit7c5f9ed8cd029dda34b6167520d6b65fbc40fc69 (patch)
treec0b5c6009d3529874ec42a09c96aa4095abeb072 /Makefile
parent44487224252ad91c448373cd1974f1ef6c53579f (diff)
downloadnetsurf-7c5f9ed8cd029dda34b6167520d6b65fbc40fc69.tar.gz
netsurf-7c5f9ed8cd029dda34b6167520d6b65fbc40fc69.tar.bz2
make the Make rules for compiler versioning be more portable with fewer shell calls
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
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