소스 검색

- gcc version detection RE tuned to work also for tiger's gcc
(reported by Nils, should close SER-65)

Andrei Pelinescu-Onciul 20 년 전
부모
커밋
10ab7e94b3
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      Makefile.defs

+ 2 - 1
Makefile.defs

@@ -198,7 +198,8 @@ MKTAGS=ctags -R .
 ifneq (,$(findstring gcc, $(CC_LONGVER)))
 	CC_NAME=gcc
 	CC_VER=$(CC) $(shell $(CC) --version|head -n 1| \
-				 sed -e 's/^[^0-9]*\([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/')
+				 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 
 	#transform gcc version into 2.9x or 3.0