浏览代码

- sun sed is more brain damaged than I thought

Andrei Pelinescu-Onciul 23 年之前
父节点
当前提交
6d244fb573
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      Makefile.defs

+ 2 - 1
Makefile.defs

@@ -138,7 +138,8 @@ MKTAGS=ctags -R .
 ifneq (,$(findstring gcc, $(CC_LONGVER)))
 	CC_NAME=gcc
 	CC_VER=$(CC) $(shell $(CC) --version|head -1| \
-				 sed -e 's/[^0-9]*\([0-9][0-9]*\.[0-9][0-9]*\(\.[0-9][0-9]*\)\?\).*/\1/')
+				 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/')
+	# sun sed is a little brain damaged => this complicated expression
 	MKDEP=$(CC) -MM $(DEFS)
 	#transform gcc version into 2.9x or 3.0
 	CC_SHORTVER=$(shell echo "$(CC_VER)" | cut -d" " -f 2| \