Skip to content

Commit

Permalink
Bug 1416034 - Refuse to run client.mk unless using mach; r=ted
Browse files Browse the repository at this point in the history
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
  • Loading branch information
indygreg committed Nov 9, 2017
1 parent 6f6c9fd commit 62421c9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions client.mk
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ OBJDIR_TARGETS = install export libs clean realclean distclean upload sdk instal
# 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

Expand Down

0 comments on commit 62421c9

Please sign in to comment.