Bug 1416034 - Refuse to run client.mk unless using mach; r=ted
authorGregory Szorc <gps@mozilla.com>
Thu, 09 Nov 2017 15:03:57 -0800
changeset 391152 79f2b6f0c44c6d61f2ac2aa92c73882aff7d7e29
parent 391151 44ad5267ace904c837b80ad073f4d744f2202d15
child 391153 53edee7389e5bb34e564a37fa10b8b33edcd7af9
push id32866
push userryanvm@gmail.com
push dateFri, 10 Nov 2017 21:06:07 +0000
treeherdermozilla-central@9da355ba1fe3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs1416034
milestone58.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 1416034 - Refuse to run client.mk unless using mach; r=ted We will soon begin the process of moving logic from client.mk into mach. Once we start this process, it won't be possible to invoke client.mk in isolation. This commit introduces a check in client.mk that will error unless client.mk is executed from mach. This should help more easily identify users of client.mk during the transition period - before client.mk is removed and callers start getting missing file errors. Obviously the check can be bypassed easily. If someone does this, upcoming changes will quickly break that workflow. So this isn't a big deal. MozReview-Commit-ID: JB7hXlvTKWe
client.mk
--- a/client.mk
+++ b/client.mk
@@ -114,16 +114,21 @@ CONFIGURES += $(TOPSRCDIR)/js/src/config
 OBJDIR_TARGETS = install export libs clean realclean distclean upload sdk installer package package-compare stage-package source-package l10n-check automation/build
 
 #######################################################################
 # Rules
 
 # The default rule is build
 build::
 
+ifndef MACH
+$(error client.mk must be used via `mach`. Try running \
+`./mach $(firstword $(MAKECMDGOALS) $(.DEFAULT_GOAL))`)
+endif
+
 # Include baseconfig.mk for its $(MAKE) validation.
 include $(TOPSRCDIR)/config/baseconfig.mk
 
 # Define mkdir
 include $(TOPSRCDIR)/config/makefiles/makeutils.mk
 include $(TOPSRCDIR)/config/makefiles/autotargets.mk
 
 # For now, only output "export" lines and lines containing UPLOAD_EXTRA_FILES