Bug 1237502 - Make --disable-compile-environment work without a Windows toolchain. r?gps
The configure.in parts are ready to go. The Makefile.in parts are
just workarounds; I'll try to replace the $(CPP) invocations with
Preprocessor.py sometime soon. (The preprocessing is tricky, so I'm
not sure it'll Just Work.) It's worth noting that the Windows Make is
behaving differently than both Mac and Linux Make: the $(CPP) failures
abort the build, where-as on Mac and Linux the failures are logged and
ignored. I can't explain this -- perhaps it's the piping?
--- a/configure.in
+++ b/configure.in
@@ -3489,18 +3489,22 @@ if test -n "$MOZ_NATIVE_NSS"; then
else
NSS_CFLAGS="-I${DIST}/include/nss"
fi
dnl ======================
dnl Detect yasm
dnl ======================
-AC_MSG_CHECKING([for YASM assembler])
-AC_CHECK_PROGS(YASM, yasm, "")
+dnl MozillaBuild ships yasm on Windows, but the configure test pops up a modal
+dnl dialog about a missing DLL.
+if test "$COMPILE_ENVIRONMENT"; then
+ AC_MSG_CHECKING([for YASM assembler])
+ AC_CHECK_PROGS(YASM, yasm, "")
+fi # COMPILE_ENVIRONMENT
if test -n "$YASM"; then
dnl Pull out yasm's version string
YASM_VERSION=`yasm --version | $AWK '/^yasm/ { print $2 }'`
_YASM_MAJOR_VERSION=`echo ${YASM_VERSION} | $AWK -F\. '{ print $1 }'`
_YASM_MINOR_VERSION=`echo ${YASM_VERSION} | $AWK -F\. '{ print $2 }'`
_YASM_RELEASE=` echo ${YASM_VERSION} | $AWK -F\. '{ print $3 }'`
_YASM_BUILD=` echo ${YASM_VERSION} | $AWK -F\. '{ print $4 }'`
@@ -5726,17 +5730,16 @@ MOZ_ANGLE_RENDERER=
MOZ_D3D_CPU_SUFFIX=
MOZ_HAS_WINSDK_WITH_D3D=
MOZ_D3DCOMPILER_VISTA_DLL=
MOZ_D3DCOMPILER_VISTA_DLL_PATH=
MOZ_DIRECTX_SDK_PATH=
MOZ_D3DCOMPILER_XP_DLL=
MOZ_D3DCOMPILER_XP_CAB=
-if test "$COMPILE_ENVIRONMENT" ; then
case "$target_os" in
*mingw*)
MOZ_ANGLE_RENDERER=1
;;
esac
# The DirectX SDK libraries are split into x86 and x64 sub-directories
case "${target_cpu}" in
@@ -5755,16 +5758,18 @@ MOZ_ARG_ENABLE_BOOL(require-all-d3dc-ver
# This is potentially set in external mozconfig files; if it's set,
# then the build exposes the "webgl" context name, which is reserved
# for conformant implementations.
if test -n "$MOZ_WEBGL_CONFORMANT"; then
AC_DEFINE(MOZ_WEBGL_CONFORMANT)
fi
+if test "$COMPILE_ENVIRONMENT"; then
+
dnl ========================================================
dnl D3D compiler DLL
dnl ========================================================
MOZ_FOUND_D3D_COMPILERS=
if test -n "$MOZ_ANGLE_RENDERER"; then
if test -z "$MOZ_D3D_CPU_SUFFIX"; then
AC_MSG_ERROR([Couldn't determine MOZ_D3D_CPU_SUFFIX.])
@@ -6035,16 +6040,18 @@ MOZ_ARG_DISABLE_BOOL(libjpeg_turbo,
[ --disable-libjpeg-turbo Disable optimized jpeg decoding routines],
MOZ_LIBJPEG_TURBO=,
MOZ_LIBJPEG_TURBO=1)
if test "$MOZ_NATIVE_JPEG" = 1 -a "$MOZ_LIBJPEG_TURBO" = 1; then
AC_MSG_ERROR([cannot use --with-system-jpeg with --enable-libjpeg-turbo.])
fi
+if test "$COMPILE_ENVIRONMENT"; then
+
dnl Detect if we can use yasm to compile libjpeg-turbo's optimized assembly
dnl files.
if test -n "$MOZ_LIBJPEG_TURBO"; then
dnl Do we support libjpeg-turbo on this platform?
case "$OS_ARCH:$CPU_ARCH" in
Darwin:x86)
@@ -6181,16 +6188,18 @@ if test -n "$LIBAV_FFT_ASFLAGS"; then
AC_MSG_ERROR([Yasm 1.1 or greater is required to build with libav's optimized FFT routines, but you do not appear to have Yasm installed. See https://developer.mozilla.org/en/YASM for more details.])
fi
fi
elif test -n "$MOZ_LIBAV_FFT" -a "${CPU_ARCH}" != "arm"; then
dnl Warn if we're not building either libav or opendl-max optimized routines.
AC_MSG_WARN([No assembler or assembly support for libav-fft. Using unoptimized C routines.])
fi
+fi # COMPILE_ENVIRONMENT
+
dnl ========================================================
dnl = Enable compilation of specific extension modules
dnl ========================================================
MOZ_ARG_ENABLE_STRING(extensions,
[ --enable-extensions Enable extensions],
[ for option in `echo $enableval | sed 's/,/ /g'`; do
if test "$option" = "yes" -o "$option" = "all"; then
--- a/dom/bindings/Makefile.in
+++ b/dom/bindings/Makefile.in
@@ -20,21 +20,23 @@ css2properties_dependencies = \
$(topsrcdir)/layout/style/nsCSSPropAliasList.h \
$(webidl_base)/CSS2Properties.webidl.in \
$(topsrcdir)/layout/style/PythonCSSProps.h \
$(srcdir)/GenerateCSS2PropertiesWebIDL.py \
$(GLOBAL_DEPS) \
$(NULL)
CSS2Properties.webidl: $(css2properties_dependencies)
- $(CPP) $(DEFINES) $(ACDEFINES) -I$(topsrcdir)/layout/style \
- $(topsrcdir)/layout/style/PythonCSSProps.h | \
- PYTHONDONTWRITEBYTECODE=1 $(PYTHON) \
- $(srcdir)/GenerateCSS2PropertiesWebIDL.py \
- $(webidl_base)/CSS2Properties.webidl.in > $@
+ $(TOUCH) $@
+
+# $(CPP) $(DEFINES) $(ACDEFINES) -I$(topsrcdir)/layout/style \
+# $(topsrcdir)/layout/style/PythonCSSProps.h | \
+# PYTHONDONTWRITEBYTECODE=1 $(PYTHON) \
+# $(srcdir)/GenerateCSS2PropertiesWebIDL.py \
+# $(webidl_base)/CSS2Properties.webidl.in > $@
# Most of the logic for dependencies lives inside Python so it can be
# used by multiple build backends. We simply have rules to generate
# and include the .pp file.
#
# The generated .pp file contains all the important dependencies such as
# changes to .webidl or .py files should result in code generation being
# performed. But we do pull in file-lists.jon to catch file additions.
--- a/layout/style/Makefile.in
+++ b/layout/style/Makefile.in
@@ -14,13 +14,15 @@ csspropsidlnames_dependencies = \
$(srcdir)/nsCSSPropAliasList.h \
$(srcdir)/nsCSSPropsGenerated.inc.in \
$(srcdir)/PythonCSSProps.h \
$(srcdir)/GenerateCSSPropsGenerated.py \
$(GLOBAL_DEPS) \
$(NULL)
nsCSSPropsGenerated.inc : $(csspropsidlnames_dependencies)
- $(CPP) $(DEFINES) $(ACDEFINES) \
- $(srcdir)/PythonCSSProps.h | \
- PYTHONDONTWRITEBYTECODE=1 $(PYTHON) \
- $(srcdir)/GenerateCSSPropsGenerated.py \
- $(srcdir)/nsCSSPropsGenerated.inc.in > $@
+ $(TOUCH) $@
+
+# $(CPP) $(DEFINES) $(ACDEFINES) \
+# $(srcdir)/PythonCSSProps.h | \
+# PYTHONDONTWRITEBYTECODE=1 $(PYTHON) \
+# $(srcdir)/GenerateCSSPropsGenerated.py \
+# $(srcdir)/nsCSSPropsGenerated.inc.in > $@