Bug 828317 - Require pymake to build on Windows; r=ted
authorGregory Szorc <gps@mozilla.com>
Wed, 06 Mar 2013 12:05:24 -0800
changeset 132474 c750d5d003ddf4433c97ca48c849f248a358473e
parent 132473 011a86ed18fe8efd3bc15be91ef5cbd4046ce271
child 132475 69a8f7b3a2e22666f53bd40a595d9ab767f2aec3
push id24705
push userryanvm@gmail.com
push dateTue, 21 May 2013 17:24:33 +0000
treeherderautoland@97f49d0b228c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs828317
milestone24.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 828317 - Require pymake to build on Windows; r=ted
browser/build.mk
client.mk
config/rules.mk
js/src/config/rules.mk
--- a/browser/build.mk
+++ b/browser/build.mk
@@ -1,28 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-################################################
-# Parallel build on Windows with GNU make check
-
-default::
-ifeq (,$(findstring pymake,$(MAKE)))
-ifeq ($(HOST_OS_ARCH),WINNT)
-ifneq (1,$(NUMBER_OF_PROCESSORS))
-	@echo $(if $(findstring -j,$(value MAKEFLAGS)), \
-$(error You are using GNU make to build Firefox with -jN on Windows. \
-This will randomly deadlock. To compile a parallel build on Windows \
-run "python -OO build/pymake/make.py -f client.mk build". \
-See https://developer.mozilla.org/en/pymake for more details.))
-endif
-endif
-endif
-
 installer:
 	@$(MAKE) -C browser/installer installer
 
 package:
 	@$(MAKE) -C browser/installer
 
 package-compare:
 	@$(MAKE) -C browser/installer package-compare
--- a/client.mk
+++ b/client.mk
@@ -77,17 +77,26 @@ CONFIG_GUESS_SCRIPT := $(wildcard $(TOPS
 ifdef CONFIG_GUESS_SCRIPT
   CONFIG_GUESS := $(shell $(CONFIG_GUESS_SCRIPT))
 endif
 
 
 ####################################
 # Sanity checks
 
+# Windows checks.
 ifneq (,$(findstring mingw,$(CONFIG_GUESS)))
+
+# Require pymake (as opposed to GNU make).
+ifndef .PYMAKE
+$(error Pymake is required to build on Windows. Run |./mach build| to \
+automatically use pymake. Or, invoke pymake directly via \
+|python build/pymake/make.py|.)
+endif
+
 # check for CRLF line endings
 ifneq (0,$(shell $(PERL) -e 'binmode(STDIN); while (<STDIN>) { if (/\r/) { print "1"; exit } } print "0"' < $(TOPSRCDIR)/client.mk))
 $(error This source tree appears to have Windows-style line endings. To \
 convert it to Unix-style line endings, run \
 "python mozilla/build/win32/mozilla-dos2unix.py")
 endif
 endif
 
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -61,16 +61,27 @@ endif
 
 ifndef INCLUDED_VERSION_MK
 include $(topsrcdir)/config/version.mk
 endif
 
 USE_AUTOTARGETS_MK = 1
 include $(topsrcdir)/config/makefiles/makeutils.mk
 
+# Only build with Pymake (not GNU make) on Windows.
+ifeq ($(HOST_OS_ARCH),WINNT)
+ifndef L10NBASEDIR
+ifndef .PYMAKE
+$(error Pymake is required to build on Windows. Run |./mach build| to \
+automatically use pymake or invoke pymake directly via \
+|python build/pymake/make.py|.)
+endif
+endif
+endif
+
 ifdef SDK_HEADERS
 _EXTRA_EXPORTS := $(filter-out $(EXPORTS),$(SDK_HEADERS))
 EXPORTS += $(_EXTRA_EXPORTS)
 endif
 
 REPORT_BUILD = $(info $(notdir $<))
 
 ifeq ($(OS_ARCH),OS2)
--- a/js/src/config/rules.mk
+++ b/js/src/config/rules.mk
@@ -61,16 +61,27 @@ endif
 
 ifndef INCLUDED_VERSION_MK
 include $(topsrcdir)/config/version.mk
 endif
 
 USE_AUTOTARGETS_MK = 1
 include $(topsrcdir)/config/makefiles/makeutils.mk
 
+# Only build with Pymake (not GNU make) on Windows.
+ifeq ($(HOST_OS_ARCH),WINNT)
+ifndef L10NBASEDIR
+ifndef .PYMAKE
+$(error Pymake is required to build on Windows. Run |./mach build| to \
+automatically use pymake or invoke pymake directly via \
+|python build/pymake/make.py|.)
+endif
+endif
+endif
+
 ifdef SDK_HEADERS
 _EXTRA_EXPORTS := $(filter-out $(EXPORTS),$(SDK_HEADERS))
 EXPORTS += $(_EXTRA_EXPORTS)
 endif
 
 REPORT_BUILD = $(info $(notdir $<))
 
 ifeq ($(OS_ARCH),OS2)