mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Add support for CL_INCLUDES_PREFIX environment variable for handling localized cl.exe /showIncludes output. (Bug 587372) r=ted a2.0=blocking2.0:final
This commit is contained in:
parent
76a39e3812
commit
d6b46ad3d3
@ -40,6 +40,8 @@ import os, os.path
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
CL_INCLUDES_PREFIX = os.environ.get("CL_INCLUDES_PREFIX", "Note: including file:")
|
||||
|
||||
def InvokeClWithDependencyGeneration(cmdline):
|
||||
target = ""
|
||||
# Figure out what the target is
|
||||
@ -61,8 +63,8 @@ def InvokeClWithDependencyGeneration(cmdline):
|
||||
for line in cl.stdout:
|
||||
# cl -showIncludes prefixes every header with "Note: including file:"
|
||||
# and an indentation corresponding to the depth (which we don't need)
|
||||
if line.startswith("Note: including file:"):
|
||||
dep = line[21:].strip()
|
||||
if line.startswith(CL_INCLUDES_PREFIX):
|
||||
dep = line[len(CL_INCLUDES_PREFIX):].strip()
|
||||
# We can't handle pathes with spaces properly in mddepend.pl, but
|
||||
# we can assume that anything in a path with spaces is a system
|
||||
# header and throw it away.
|
||||
|
@ -570,6 +570,8 @@ STATIC_LIBIDL = @STATIC_LIBIDL@
|
||||
|
||||
MOZ_NATIVE_MAKEDEPEND = @SYSTEM_MAKEDEPEND@
|
||||
|
||||
export CL_INCLUDES_PREFIX = @CL_INCLUDES_PREFIX@
|
||||
|
||||
MOZ_AUTO_DEPS = @MOZ_AUTO_DEPS@
|
||||
COMPILER_DEPEND = @COMPILER_DEPEND@
|
||||
MDDEPDIR := @MDDEPDIR@
|
||||
|
@ -8028,6 +8028,15 @@ else
|
||||
_DEFINES_CFLAGS='$(ACDEFINES) -D_MOZILLA_CONFIG_H_ -DMOZILLA_CLIENT'
|
||||
_DEFINES_CXXFLAGS='$(ACDEFINES) -D_MOZILLA_CONFIG_H_ -DMOZILLA_CLIENT'
|
||||
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'`
|
||||
changequote([,])
|
||||
if test -z "$CL_INCLUDES_PREFIX"; then
|
||||
AC_MSG_ERROR([Cannot find cl -showIncludes prefix.])
|
||||
fi
|
||||
AC_SUBST(CL_INCLUDES_PREFIX)
|
||||
rm -f dummy-hello.c
|
||||
_topsrcdirwin=`cd \`dirname $0\`; pwd -W`
|
||||
dnl cl.py provides dependency generation for MSVC
|
||||
CC_WRAPPER="$PYTHON -O $_topsrcdirwin/build/cl.py"
|
||||
|
@ -40,6 +40,8 @@ import os, os.path
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
CL_INCLUDES_PREFIX = os.environ.get("CL_INCLUDES_PREFIX", "Note: including file:")
|
||||
|
||||
def InvokeClWithDependencyGeneration(cmdline):
|
||||
target = ""
|
||||
# Figure out what the target is
|
||||
@ -61,8 +63,8 @@ def InvokeClWithDependencyGeneration(cmdline):
|
||||
for line in cl.stdout:
|
||||
# cl -showIncludes prefixes every header with "Note: including file:"
|
||||
# and an indentation corresponding to the depth (which we don't need)
|
||||
if line.startswith("Note: including file:"):
|
||||
dep = line[21:].strip()
|
||||
if line.startswith(CL_INCLUDES_PREFIX):
|
||||
dep = line[len(CL_INCLUDES_PREFIX):].strip()
|
||||
# We can't handle pathes with spaces properly in mddepend.pl, but
|
||||
# we can assume that anything in a path with spaces is a system
|
||||
# header and throw it away.
|
||||
|
@ -278,6 +278,8 @@ MOZ_TOOLKIT_REGISTRY_CFLAGS = \
|
||||
|
||||
MOZ_NATIVE_MAKEDEPEND = @SYSTEM_MAKEDEPEND@
|
||||
|
||||
export CL_INCLUDES_PREFIX = @CL_INCLUDES_PREFIX@
|
||||
|
||||
MOZ_AUTO_DEPS = @MOZ_AUTO_DEPS@
|
||||
COMPILER_DEPEND = @COMPILER_DEPEND@
|
||||
MDDEPDIR := @MDDEPDIR@
|
||||
|
@ -4966,6 +4966,15 @@ else
|
||||
_DEFINES_CFLAGS='$(ACDEFINES) -D_JS_CONFDEFS_H_ -DMOZILLA_CLIENT'
|
||||
_DEFINES_CXXFLAGS='$(ACDEFINES) -D_JS_CONFDEFS_H_ -DMOZILLA_CLIENT'
|
||||
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'`
|
||||
changequote([,])
|
||||
if test -z "$CL_INCLUDES_PREFIX"; then
|
||||
AC_MSG_ERROR([Cannot find cl -showIncludes prefix.])
|
||||
fi
|
||||
AC_SUBST(CL_INCLUDES_PREFIX)
|
||||
rm -f dummy-hello.c
|
||||
_topsrcdirwin=`cd \`dirname $0\`; pwd -W`
|
||||
dnl cl.py provides dependency generation for MSVC
|
||||
CC_WRAPPER="$PYTHON -O $_topsrcdirwin/build/cl.py"
|
||||
|
Loading…
Reference in New Issue
Block a user