Bug 608173 - Build system should provide an intelligible error when switching from gmake to pymake or vice versa on an absolutely configured objdir. r=KaiRo
authorJustin Wood <Callek@gmail.com>
Thu, 28 Oct 2010 22:51:00 -0400
changeset 6666 6079fc2d2702e6e1f1323a46fa914bde75470921
parent 6657 2161775b088dcb7814d63e15ab63b72914c44ee5
child 6667 dd6047e7dd183dbf03d8cda8f829e20b2a9c5e93
push idunknown
push userunknown
push dateunknown
reviewersKaiRo
bugs608173
Bug 608173 - Build system should provide an intelligible error when switching from gmake to pymake or vice versa on an absolutely configured objdir. r=KaiRo
config/autoconf.mk.in
--- a/config/autoconf.mk.in
+++ b/config/autoconf.mk.in
@@ -534,8 +534,21 @@ HAS_XCODE_2_1	= @HAS_XCODE_2_1@
 UNIVERSAL_BINARY= @UNIVERSAL_BINARY@
 HAVE_DTRACE= @HAVE_DTRACE@
 
 VISIBILITY_FLAGS = @VISIBILITY_FLAGS@
 
 MOZ_OFFICIAL_BRANDING = @MOZ_OFFICIAL_BRANDING@
 
 JS_SHARED_LIBRARY = @JS_SHARED_LIBRARY@
+
+# We only want to do the pymake sanity on Windows, other os's can cope
+ifeq (,$(filter-out WINNT WINCE,$(HOST_OS_ARCH)))
+# Ensure invariants between GNUMake and PyMake
+# Checked here since we want the sane error in a file that
+# actually can be found regardless of path-style.
+ifeq (_:,$(.PYMAKE)_$(findstring :,$(srcdir)))
+$(error Windows-style srcdir being used with GNU make. Did you mean to run $(topsrcdir)/mozilla/build/pymake/make.py instead? [see-also: https://developer.mozilla.org/en/Gmake_vs._Pymake])
+endif
+ifeq (1_a,$(.PYMAKE)_$(firstword a$(subst /, ,$(srcdir))))
+$(error MSYS-style srcdir being used with PyMake. Did you mean to run GNU-Make instead? [see-also: https://developer.mozilla.org/en/Gmake_vs._Pymake])
+endif
+endif # Windows