Browse code

- gcc version detection fix

Andrei Pelinescu-Onciul authored on 04/09/2002 20:30:01
Showing 1 changed files
... ...
@@ -138,7 +138,7 @@ MKTAGS=ctags -R .
138 138
 ifneq (,$(findstring gcc, $(CC_LONGVER)))
139 139
 	CC_NAME=gcc
140 140
 	CC_VER=$(CC) $(shell $(CC) --version|head -1| \
141
-				 sed -e 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/')
141
+				 sed -e 's/[^0-9]*\([0-9][0-9]*\.[0-9][0-9]*\(\.[0-9][0-9]*\)\?\).*/\1/')
142 142
 	MKDEP=$(CC) -MM $(DEFS)
143 143
 	#transform gcc version into 2.9x or 3.0
144 144
 	CC_SHORTVER=$(shell echo "$(CC_VER)" | cut -d" " -f 2| \