Bug 716224 - Port
bug 643167 and
bug 707512 for better pymake support. r=Standard8
--- a/client.mk
+++ b/client.mk
@@ -113,17 +113,17 @@ CONFIG_GUESS_SCRIPT := $(wildcard $(TOPS
ifdef CONFIG_GUESS_SCRIPT
CONFIG_GUESS = $(shell $(CONFIG_GUESS_SCRIPT))
endif
####################################
# Sanity checks
-ifneq (,$(filter MINGW%,$(shell uname -s)))
+ifneq (,$(findstring mingw,$(CONFIG_GUESS)))
# 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
@@ -138,16 +138,23 @@ MOZCONFIG_MODULES := build/unix/uniq.pl
run_for_side_effects := \
$(shell $(TOPSRCDIR)/$(MOZCONFIG_LOADER) $(TOPSRCDIR) $(TOPSRCDIR)/.mozconfig.mk > $(TOPSRCDIR)/.mozconfig.out)
include $(TOPSRCDIR)/.mozconfig.mk
ifndef MOZ_OBJDIR
MOZ_OBJDIR = obj-$(CONFIG_GUESS)
+else
+# On Windows Pymake builds check MOZ_OBJDIR doesn't start with "/"
+ ifneq (,$(findstring mingw,$(CONFIG_GUESS)))
+ ifeq (1_a,$(.PYMAKE)_$(firstword a$(subst /, ,$(MOZ_OBJDIR))))
+ $(error For Windows Pymake builds, MOZ_OBJDIR must be a Windows [and not MSYS] style path.)
+ endif
+ endif
endif
ifdef MOZ_BUILD_PROJECTS
ifdef MOZ_CURRENT_PROJECT
OBJDIR = $(MOZ_OBJDIR)/$(MOZ_CURRENT_PROJECT)
MOZ_MAKE = $(MAKE) $(MOZ_MAKE_FLAGS) -C $(OBJDIR)
BUILD_PROJECT_ARG = MOZ_BUILD_APP=$(MOZ_CURRENT_PROJECT)
@@ -297,16 +304,20 @@ CONFIG_STATUS_DEPS := \
$(TOPSRCDIR)/allmakefiles.sh \
$(TOPSRCDIR)/mozilla/allmakefiles.sh \
$(wildcard $(TOPSRCDIR)/mozilla/nsprpub/configure) \
$(wildcard $(TOPSRCDIR)/mozilla/config/milestone.txt) \
$(wildcard $(TOPSRCDIR)/ldap/sdks/c-sdk/configure) \
$(wildcard $(addsuffix confvars.sh,$(wildcard $(TOPSRCDIR)/*/))) \
$(NULL)
+CONFIGURE_ENV_ARGS += \
+ MAKE="$(MAKE)" \
+ $(NULL)
+
# configure uses the program name to determine @srcdir@. Calling it without
# $(TOPSRCDIR) will set @srcdir@ to "."; otherwise, it is set to the full
# path of $(TOPSRCDIR).
ifeq ($(TOPSRCDIR),$(OBJDIR))
CONFIGURE = ./configure
else
CONFIGURE = $(TOPSRCDIR)/configure
endif