2 # This Source Code Form is subject to the terms of the Mozilla Public
3 # License, v. 2.0. If a copy of the MPL was not distributed with this
4 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 # We can't package tests if they aren't enabled.
8 MOZ_AUTOMATION_PACKAGE_TESTS
= 0
11 ifneq (,$(filter automation
/%,$(MAKECMDGOALS
)))
12 ifeq (4.0,$(firstword $(sort 4.0 $(MAKE_VERSION
))))
13 MAKEFLAGS
+= --output-sync
=target
20 include $(topsrcdir
)/toolkit
/mozapps
/installer
/package-name.mk
21 include $(topsrcdir
)/toolkit
/mozapps
/installer
/upload-files.mk
23 # Clear out DIST_FILES if it was set by upload-files.mk (for Android builds)
27 # Helper variables to convert from MOZ_AUTOMATION_* variables to the
28 # corresponding the make target
29 tier_MOZ_AUTOMATION_BUILD_SYMBOLS
= buildsymbols
30 tier_MOZ_AUTOMATION_L10N_CHECK
= l10n-check
31 tier_MOZ_AUTOMATION_PACKAGE
= package
32 tier_MOZ_AUTOMATION_PACKAGE_TESTS
= package-tests
33 tier_MOZ_AUTOMATION_PACKAGE_GENERATED_SOURCES
= package-generated-sources
34 tier_MOZ_AUTOMATION_UPLOAD_SYMBOLS
= uploadsymbols
35 tier_MOZ_AUTOMATION_UPLOAD
= upload
37 # Automation build steps. Everything in MOZ_AUTOMATION_TIERS also gets used in
38 # TIERS for mach display. As such, the MOZ_AUTOMATION_TIERS are roughly sorted
39 # here in the order that they will be executed (since mach doesn't know of the
40 # dependencies between them).
41 moz_automation_symbols
= \
42 MOZ_AUTOMATION_PACKAGE_TESTS \
43 MOZ_AUTOMATION_BUILD_SYMBOLS \
44 MOZ_AUTOMATION_UPLOAD_SYMBOLS \
45 MOZ_AUTOMATION_PACKAGE \
46 MOZ_AUTOMATION_PACKAGE_GENERATED_SOURCES \
47 MOZ_AUTOMATION_L10N_CHECK \
48 MOZ_AUTOMATION_UPLOAD \
50 MOZ_AUTOMATION_TIERS
:= $(foreach sym
,$(moz_automation_symbols
),$(if
$(filter 1,$($(sym
))),$(tier_
$(sym
))))
52 # Dependencies between automation build steps
53 automation
/uploadsymbols
: automation
/buildsymbols
55 automation
/l10n-check
: automation
/package
57 automation
/upload
: automation
/package
58 automation
/upload
: automation
/package-tests
59 automation
/upload
: automation
/buildsymbols
60 automation
/upload
: automation
/package-generated-sources
62 automation
/build
: $(addprefix automation
/,$(MOZ_AUTOMATION_TIERS
))
63 @echo Automation steps completed.
65 # Note: We have to force -j1 here, at least until bug 1036563 is fixed.
66 AUTOMATION_EXTRA_CMDLINE-l10n-check
= -j1
68 # The commands only run if the corresponding MOZ_AUTOMATION_* variable is
69 # enabled. This means, for example, if we enable MOZ_AUTOMATION_UPLOAD, then
70 # 'buildsymbols' will only run if MOZ_AUTOMATION_BUILD_SYMBOLS is also set.
71 # However, the target automation/buildsymbols will still be executed in this
72 # case because it is a prerequisite of automation/upload.
73 define automation_commands
74 @
+$(PYTHON
) $(topsrcdir
)/config
/run-and-prefix.py
$1 $(MAKE
) $1 $(AUTOMATION_EXTRA_CMDLINE-
$1)
75 $(call BUILDSTATUS
,TIER_FINISH
$1)
78 # The tier start message is in a separate target so make doesn't buffer it
79 # until the step completes with output syncing enabled.
81 $(if
$(filter $*,$(MOZ_AUTOMATION_TIERS
)),$(call BUILDSTATUS
,TIER_START
$*))
83 automation
/%: automation-start
/%
84 $(if
$(filter $*,$(MOZ_AUTOMATION_TIERS
)),$(call automation_commands
,$*))