Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
Bug 707512 - Abort Windows Pymake builds with a clearer error if MOZ_…
Browse files Browse the repository at this point in the history
…OBJDIR is an MSYS style path; r=ted
  • Loading branch information
Ed Morley committed Dec 8, 2011
1 parent bc03fd6 commit 2f6bdc9
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions client.mk
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ 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 \
Expand All @@ -133,15 +133,20 @@ MOZCONFIG_LOADER := build/autoconf/mozconfig2client-mk
MOZCONFIG_FINDER := build/autoconf/mozconfig-find
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
Expand Down

0 comments on commit 2f6bdc9

Please sign in to comment.