mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-07 09:54:42 +00:00
Bug 1683797: Removes unnecessary lines from client.mk r=sheehan,firefox-build-system-reviewers,glandium
CWD and BUILDSTATUS are never used. Differential Revision: https://phabricator.services.mozilla.com/D102661
This commit is contained in:
parent
b9681ed33e
commit
3ff2d684e9
40
client.mk
40
client.mk
@ -14,29 +14,13 @@
|
|||||||
# MOZ_MAKE_FLAGS - Flags to pass to $(MAKE)
|
# MOZ_MAKE_FLAGS - Flags to pass to $(MAKE)
|
||||||
#
|
#
|
||||||
#######################################################################
|
#######################################################################
|
||||||
# Defines
|
|
||||||
|
|
||||||
ifdef MACH
|
ifndef MACH
|
||||||
ifndef NO_BUILDSTATUS_MESSAGES
|
$(error client.mk must be used via `mach`. Try running \
|
||||||
define BUILDSTATUS
|
`./mach $(firstword $(MAKECMDGOALS) $(.DEFAULT_GOAL))`)
|
||||||
@echo 'BUILDSTATUS $1'
|
|
||||||
|
|
||||||
endef
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
### Load mozconfig options
|
||||||
CWD := $(CURDIR)
|
|
||||||
|
|
||||||
ifeq "$(CWD)" "/"
|
|
||||||
CWD := /.
|
|
||||||
endif
|
|
||||||
|
|
||||||
PYTHON3 ?= python3
|
|
||||||
|
|
||||||
####################################
|
|
||||||
# Load mozconfig Options
|
|
||||||
|
|
||||||
include $(OBJDIR)/.mozconfig-client-mk
|
include $(OBJDIR)/.mozconfig-client-mk
|
||||||
|
|
||||||
ifdef MOZ_PARALLEL_BUILD
|
ifdef MOZ_PARALLEL_BUILD
|
||||||
@ -46,10 +30,11 @@ endif
|
|||||||
|
|
||||||
# Automatically add -jN to make flags if not defined. N defaults to number of cores.
|
# Automatically add -jN to make flags if not defined. N defaults to number of cores.
|
||||||
ifeq (,$(findstring -j,$(MOZ_MAKE_FLAGS)))
|
ifeq (,$(findstring -j,$(MOZ_MAKE_FLAGS)))
|
||||||
cores=$(shell $(PYTHON3) -c 'import multiprocessing; print(multiprocessing.cpu_count())')
|
cores=$(shell python3 -c 'import multiprocessing; print(multiprocessing.cpu_count())')
|
||||||
MOZ_MAKE_FLAGS += -j$(cores)
|
MOZ_MAKE_FLAGS += -j$(cores)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
### Set up make flags
|
||||||
ifdef MOZ_AUTOMATION
|
ifdef MOZ_AUTOMATION
|
||||||
ifeq (4.0,$(firstword $(sort 4.0 $(MAKE_VERSION))))
|
ifeq (4.0,$(firstword $(sort 4.0 $(MAKE_VERSION))))
|
||||||
MOZ_MAKE_FLAGS += --output-sync=line
|
MOZ_MAKE_FLAGS += --output-sync=line
|
||||||
@ -58,17 +43,10 @@ endif
|
|||||||
|
|
||||||
MOZ_MAKE = $(MAKE) $(MOZ_MAKE_FLAGS) -C $(OBJDIR)
|
MOZ_MAKE = $(MAKE) $(MOZ_MAKE_FLAGS) -C $(OBJDIR)
|
||||||
|
|
||||||
#######################################################################
|
### Rules
|
||||||
# Rules
|
|
||||||
|
|
||||||
# The default rule is build
|
# The default rule is build
|
||||||
build::
|
build::
|
||||||
|
|
||||||
ifndef MACH
|
|
||||||
$(error client.mk must be used via `mach`. Try running \
|
|
||||||
`./mach $(firstword $(MAKECMDGOALS) $(.DEFAULT_GOAL))`)
|
|
||||||
endif
|
|
||||||
|
|
||||||
# In automation, manage an sccache daemon. The starting of the server
|
# In automation, manage an sccache daemon. The starting of the server
|
||||||
# needs to be in a make file so sccache inherits the jobserver.
|
# needs to be in a make file so sccache inherits the jobserver.
|
||||||
ifdef MOZBUILD_MANAGE_SCCACHE_DAEMON
|
ifdef MOZBUILD_MANAGE_SCCACHE_DAEMON
|
||||||
@ -82,9 +60,7 @@ build::
|
|||||||
$(if $(findstring n,$(filter-out --%, $(MAKEFLAGS))),,+)env SCCACHE_LOG=sccache=debug SCCACHE_ERROR_LOG=$(UPLOAD_PATH)/sccache.log $(MOZBUILD_MANAGE_SCCACHE_DAEMON) --start-server
|
$(if $(findstring n,$(filter-out --%, $(MAKEFLAGS))),,+)env SCCACHE_LOG=sccache=debug SCCACHE_ERROR_LOG=$(UPLOAD_PATH)/sccache.log $(MOZBUILD_MANAGE_SCCACHE_DAEMON) --start-server
|
||||||
endif
|
endif
|
||||||
|
|
||||||
####################################
|
### Build it
|
||||||
# Build it
|
|
||||||
|
|
||||||
build::
|
build::
|
||||||
+$(MOZ_MAKE)
|
+$(MOZ_MAKE)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user