Browse code

- sun sed is more brain damaged than I thought

Andrei Pelinescu-Onciul authored on 04/09/2002 20:46:52
Showing 1 changed files
... ...
@@ -138,7 +138,8 @@ 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][0-9]*\)\?\).*/\1/')
141
+				 sed -e 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/' -e 's/[^0-9]*\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/')
142
+	# sun sed is a little brain damaged => this complicated expression
142 143
 	MKDEP=$(CC) -MM $(DEFS)
143 144
 	#transform gcc version into 2.9x or 3.0
144 145
 	CC_SHORTVER=$(shell echo "$(CC_VER)" | cut -d" " -f 2| \