Bug 960458 - cl.py doesn't properly parse showIncludes prefix on some localized versions. r=glandium

This commit is contained in:
Marco Bonardo 2014-01-21 10:54:17 +01:00
Родитель 77acc6548b
Коммит 9ed0d4a201
2 изменённых файлов: 14 добавлений и 2 удалений

Просмотреть файл

@ -7733,8 +7733,14 @@ else
else
echo '#include <stdio.h>' > dummy-hello.c
changequote(,)
CL_INCLUDES_PREFIX=`${CC} -showIncludes -c -Fonul dummy-hello.c 2>&1 | sed -ne 's/^\([^:]*:[^:]*:\).*stdio.h$/\1/p'`
dnl This output is localized, split at the first double space.
_CL_PREFIX_REGEX="^\([^:]*:.*\ \ \)\(.*stdio.h\)$"
CL_INCLUDES_PREFIX=`${CC} -showIncludes -c -Fonul dummy-hello.c 2>&1 | sed -ne 's/'"$_CL_PREFIX_REGEX"'/\1/p'`
_CL_STDIO_PATH=`${CC} -showIncludes -c -Fonul dummy-hello.c 2>&1 | sed -ne 's/'"$_CL_PREFIX_REGEX"'/\2/p'`
changequote([,])
if ! test -e "$_CL_STDIO_PATH"; then
AC_MSG_ERROR([Unable to parse cl -showIncludes prefix. This compiler's locale has an unsupported formatting.])
fi
if test -z "$CL_INCLUDES_PREFIX"; then
AC_MSG_ERROR([Cannot find cl -showIncludes prefix.])
fi

Просмотреть файл

@ -3816,8 +3816,14 @@ else
else
echo '#include <stdio.h>' > dummy-hello.c
changequote(,)
CL_INCLUDES_PREFIX=`${CC} -showIncludes -c -Fonul dummy-hello.c 2>&1 | sed -ne 's/^\([^:]*:[^:]*:\).*stdio.h$/\1/p'`
dnl This output is localized, split at the first double space.
_CL_PREFIX_REGEX="^\([^:]*:.*\ \ \)\(.*stdio.h\)$"
CL_INCLUDES_PREFIX=`${CC} -showIncludes -c -Fonul dummy-hello.c 2>&1 | sed -ne 's/'"$_CL_PREFIX_REGEX"'/\1/p'`
_CL_STDIO_PATH=`${CC} -showIncludes -c -Fonul dummy-hello.c 2>&1 | sed -ne 's/'"$_CL_PREFIX_REGEX"'/\2/p'`
changequote([,])
if ! test -e "$_CL_STDIO_PATH"; then
AC_MSG_ERROR([Unable to parse cl -showIncludes prefix. This compiler's locale has an unsupported formatting.])
fi
if test -z "$CL_INCLUDES_PREFIX"; then
AC_MSG_ERROR([Cannot find cl -showIncludes prefix.])
fi