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
--- 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