Bumping manifests a=b2g-bump
[gecko.git] / build / moz-automation.mk
blob60eff6bb2d5d2ac5912064cc0bfe749fa3a87412
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/.
6 ifneq (,$(filter automation/%,$(MAKECMDGOALS)))
7 ifeq (4.0,$(firstword $(sort 4.0 $(MAKE_VERSION))))
8 MAKEFLAGS += --output-sync=target
9 else
10 .NOTPARALLEL:
11 endif
12 endif
14 include $(topsrcdir)/toolkit/mozapps/installer/package-name.mk
15 include $(topsrcdir)/toolkit/mozapps/installer/upload-files.mk
17 # Clear out DIST_FILES if it was set by upload-files.mk (for Android builds)
18 DIST_FILES =
20 # Log file from the 'make upload' step. We need this to parse out the URLs of
21 # the uploaded files.
22 AUTOMATION_UPLOAD_OUTPUT = $(DIST)/automation-upload.txt
24 # Helper variables to convert from MOZ_AUTOMATION_* variables to the
25 # corresponding the make target
26 tier_BUILD_SYMBOLS = buildsymbols
27 tier_L10N_CHECK = l10n-check
28 tier_PRETTY_L10N_CHECK = pretty-l10n-check
29 tier_INSTALLER = installer
30 tier_PRETTY_INSTALLER = pretty-installer
31 tier_PACKAGE = package
32 tier_PRETTY_PACKAGE = pretty-package
33 tier_PACKAGE_TESTS = package-tests
34 tier_PRETTY_PACKAGE_TESTS = pretty-package-tests
35 tier_UPDATE_PACKAGING = update-packaging
36 tier_PRETTY_UPDATE_PACKAGING = pretty-update-packaging
37 tier_UPLOAD_SYMBOLS = uploadsymbols
38 tier_UPLOAD = upload
40 # Automation build steps. Everything in MOZ_AUTOMATION_TIERS also gets used in
41 # TIERS for mach display. As such, the MOZ_AUTOMATION_TIERS are roughly sorted
42 # here in the order that they will be executed (since mach doesn't know of the
43 # dependencies between them).
44 moz_automation_symbols = \
45 PACKAGE_TESTS \
46 PRETTY_PACKAGE_TESTS \
47 BUILD_SYMBOLS \
48 UPLOAD_SYMBOLS \
49 PACKAGE \
50 PRETTY_PACKAGE \
51 INSTALLER \
52 PRETTY_INSTALLER \
53 UPDATE_PACKAGING \
54 PRETTY_UPDATE_PACKAGING \
55 L10N_CHECK \
56 PRETTY_L10N_CHECK \
57 UPLOAD \
58 $(NULL)
59 MOZ_AUTOMATION_TIERS := $(foreach sym,$(moz_automation_symbols),$(if $(filter 1,$(MOZ_AUTOMATION_$(sym))),$(tier_$(sym))))
61 # Dependencies between automation build steps
62 automation/uploadsymbols: automation/buildsymbols
64 automation/update-packaging: automation/package
65 automation/update-packaging: automation/installer
66 automation/pretty-update-packaging: automation/pretty-package
67 automation/pretty-update-packaging: automation/pretty-installer
69 automation/l10n-check: automation/package
70 automation/l10n-check: automation/installer
71 automation/pretty-l10n-check: automation/pretty-package
72 automation/pretty-l10n-check: automation/pretty-installer
74 automation/upload: automation/installer
75 automation/upload: automation/package
76 automation/upload: automation/package-tests
77 automation/upload: automation/buildsymbols
78 automation/upload: automation/update-packaging
80 # automation/{pretty-}package should depend on build (which is implicit due to
81 # the way client.mk invokes automation/build), but buildsymbols changes the
82 # binaries/libs, and that's what we package/test.
83 automation/pretty-package: automation/buildsymbols
85 # The installer and packager both run stage-package, and may conflict
86 # with each other.
87 automation/installer: automation/package
89 # The 'pretty' versions of targets run before the regular ones to avoid
90 # conflicts in writing to the same files.
91 automation/installer: automation/pretty-installer
92 automation/package: automation/pretty-package
93 automation/package-tests: automation/pretty-package-tests
94 automation/l10n-check: automation/pretty-l10n-check
95 automation/update-packaging: automation/pretty-update-packaging
97 automation/build: $(addprefix automation/,$(MOZ_AUTOMATION_TIERS))
98 $(PYTHON) $(topsrcdir)/build/gen_mach_buildprops.py --complete-mar-file $(DIST)/$(COMPLETE_MAR) $(addprefix --partial-mar-file ,$(wildcard $(DIST)/$(PARTIAL_MAR))) --upload-output $(AUTOMATION_UPLOAD_OUTPUT) --upload-files $(abspath $(UPLOAD_FILES))
100 # We need the log from make upload to grep it for urls in order to set
101 # properties.
102 AUTOMATION_EXTRA_CMDLINE-upload = 2>&1 | tee $(AUTOMATION_UPLOAD_OUTPUT)
104 # Note: We have to force -j1 here, at least until bug 1036563 is fixed.
105 AUTOMATION_EXTRA_CMDLINE-l10n-check = -j1
106 AUTOMATION_EXTRA_CMDLINE-pretty-l10n-check = -j1
108 # And force -j1 here until bug 1077670 is fixed.
109 AUTOMATION_EXTRA_CMDLINE-package-tests = -j1
110 AUTOMATION_EXTRA_CMDLINE-pretty-package-tests = -j1
112 # The commands only run if the corresponding MOZ_AUTOMATION_* variable is
113 # enabled. This means, for example, if we enable MOZ_AUTOMATION_UPLOAD, then
114 # 'buildsymbols' will only run if MOZ_AUTOMATION_BUILD_SYMBOLS is also set.
115 # However, the target automation/buildsymbols will still be executed in this
116 # case because it is a prerequisite of automation/upload.
117 define automation_commands
118 $(call BUILDSTATUS,TIER_START $1)
119 @$(MAKE) $1 $(AUTOMATION_EXTRA_CMDLINE-$1)
120 $(call BUILDSTATUS,TIER_FINISH $1)
121 endef
123 automation/%:
124 $(if $(filter $*,$(MOZ_AUTOMATION_TIERS)),$(call automation_commands,$*))