14
14
# MOZ_MAKE_FLAGS - Flags to pass to $(MAKE)
15
15
#
16
16
# ######################################################################
17
- # Defines
18
17
19
- ifdef MACH
20
- ifndef NO_BUILDSTATUS_MESSAGES
21
- define BUILDSTATUS
22
- @echo 'BUILDSTATUS $1'
23
-
24
- endef
25
- endif
26
- endif
27
-
28
-
29
- CWD := $(CURDIR )
30
-
31
- ifeq "$(CWD ) " "/"
32
- CWD := /.
18
+ ifndef MACH
19
+ $(error client.mk must be used via `mach`. Try running \
20
+ `./mach $(firstword $(MAKECMDGOALS) $(.DEFAULT_GOAL))`)
33
21
endif
34
22
35
- PYTHON3 ?= python3
36
-
37
- # ###################################
38
- # Load mozconfig Options
39
-
23
+ # ## Load mozconfig options
40
24
include $(OBJDIR ) /.mozconfig-client-mk
41
25
42
- ifdef MOZ_PARALLEL_BUILD
43
- MOZ_MAKE_FLAGS := $(filter-out -j% ,$(MOZ_MAKE_FLAGS ) )
44
- MOZ_MAKE_FLAGS += -j$(MOZ_PARALLEL_BUILD )
45
- endif
46
-
47
- # Automatically add -jN to make flags if not defined. N defaults to number of cores.
48
- ifeq (,$(findstring -j,$(MOZ_MAKE_FLAGS ) ) )
49
- cores =$(shell $(PYTHON3 ) -c 'import multiprocessing; print(multiprocessing.cpu_count() )')
50
- MOZ_MAKE_FLAGS += -j$(cores )
51
- endif
52
-
26
+ # ## Set up make flags
53
27
ifdef MOZ_AUTOMATION
54
28
ifeq (4.0,$(firstword $(sort 4.0 $(MAKE_VERSION ) ) ) )
55
29
MOZ_MAKE_FLAGS += --output-sync=line
@@ -58,17 +32,10 @@ endif
58
32
59
33
MOZ_MAKE = $(MAKE ) $(MOZ_MAKE_FLAGS ) -C $(OBJDIR )
60
34
61
- # ######################################################################
62
- # Rules
63
-
35
+ # ## Rules
64
36
# The default rule is build
65
37
build ::
66
38
67
- ifndef MACH
68
- $(error client.mk must be used via `mach`. Try running \
69
- `./mach $(firstword $(MAKECMDGOALS) $(.DEFAULT_GOAL))`)
70
- endif
71
-
72
39
# In automation, manage an sccache daemon. The starting of the server
73
40
# needs to be in a make file so sccache inherits the jobserver.
74
41
ifdef MOZBUILD_MANAGE_SCCACHE_DAEMON
@@ -82,9 +49,7 @@ build::
82
49
$(if $(findstring n,$(filter-out --% , $(MAKEFLAGS ) ) ) ,,+) env SCCACHE_LOG=sccache=debug SCCACHE_ERROR_LOG=$(UPLOAD_PATH ) /sccache.log $(MOZBUILD_MANAGE_SCCACHE_DAEMON ) --start-server
83
50
endif
84
51
85
- # ###################################
86
- # Build it
87
-
52
+ # ## Build it
88
53
build ::
89
54
+$(MOZ_MAKE )
90
55
0 commit comments