--- a/client.mk 2020-12-22 05:23:56.000000000 +0300
+++ a/client.mk-OK 2020-12-24 19:54:52.834091571 +0300
@@ -281,17 +281,25 @@
configure-preqs = \
$(OBJDIR)/CLOBBER \
configure-files \
$(call mkdir_deps,$(OBJDIR)) \
save-mozconfig \
$(OBJDIR)/.mozconfig.json \
$(NULL)
-CREATE_MOZCONFIG_JSON = $(shell $(TOPSRCDIR)/mach environment --format=json -o $(OBJDIR)/.mozconfig.json)
+# Do not try to re-create .mozconfig.json when running
+# directly under `make -f client.mk'
+ifndef MACH
+ifneq (,$(wildcard $(OBJDIR)/.mozconfig.json))
+CREATE_MOZCONFIG_JSON =
+endif
+endif
+
+CREATE_MOZCONFIG_JSON ?= $(shell $(TOPSRCDIR)/mach environment --format=json -o $(OBJDIR)/.mozconfig.json)
# Force CREATE_MOZCONFIG_JSON above to be resolved, without side effects in
# case the result is non empty, and allowing an override on the make command
# line not running the command (using := $(shell) still runs the shell command).
ifneq (,$(CREATE_MOZCONFIG_JSON))
endif
$(OBJDIR)/.mozconfig.json: $(call mkdir_deps,$(OBJDIR)) ;