2014-05-16 18:37:31 +00:00
|
|
|
#
|
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
2014-06-19 00:06:13 +00:00
|
|
|
ifneq (,$(filter automation/%,$(MAKECMDGOALS)))
|
|
|
|
ifeq (4.0,$(firstword $(sort 4.0 $(MAKE_VERSION))))
|
|
|
|
MAKEFLAGS += --output-sync=target
|
|
|
|
else
|
|
|
|
.NOTPARALLEL:
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2016-05-30 17:45:19 +00:00
|
|
|
ifndef JS_STANDALONE
|
2016-05-19 14:35:39 +00:00
|
|
|
include $(topsrcdir)/toolkit/mozapps/installer/package-name.mk
|
|
|
|
include $(topsrcdir)/toolkit/mozapps/installer/upload-files.mk
|
|
|
|
|
|
|
|
# Clear out DIST_FILES if it was set by upload-files.mk (for Android builds)
|
|
|
|
DIST_FILES =
|
2016-05-30 17:45:19 +00:00
|
|
|
endif
|
2016-05-19 14:35:39 +00:00
|
|
|
|
2014-06-16 17:17:21 +00:00
|
|
|
# Helper variables to convert from MOZ_AUTOMATION_* variables to the
|
|
|
|
# corresponding the make target
|
2015-06-17 20:58:26 +00:00
|
|
|
tier_MOZ_AUTOMATION_BUILD_SYMBOLS = buildsymbols
|
|
|
|
tier_MOZ_AUTOMATION_L10N_CHECK = l10n-check
|
|
|
|
tier_MOZ_AUTOMATION_PRETTY_L10N_CHECK = pretty-l10n-check
|
|
|
|
tier_MOZ_AUTOMATION_INSTALLER = installer
|
|
|
|
tier_MOZ_AUTOMATION_PRETTY_INSTALLER = pretty-installer
|
|
|
|
tier_MOZ_AUTOMATION_PACKAGE = package
|
|
|
|
tier_MOZ_AUTOMATION_PRETTY_PACKAGE = pretty-package
|
|
|
|
tier_MOZ_AUTOMATION_PACKAGE_TESTS = package-tests
|
|
|
|
tier_MOZ_AUTOMATION_PRETTY_PACKAGE_TESTS = pretty-package-tests
|
|
|
|
tier_MOZ_AUTOMATION_UPDATE_PACKAGING = update-packaging
|
|
|
|
tier_MOZ_AUTOMATION_PRETTY_UPDATE_PACKAGING = pretty-update-packaging
|
|
|
|
tier_MOZ_AUTOMATION_UPLOAD_SYMBOLS = uploadsymbols
|
|
|
|
tier_MOZ_AUTOMATION_UPLOAD = upload
|
|
|
|
tier_MOZ_AUTOMATION_SDK = sdk
|
2014-06-16 17:17:21 +00:00
|
|
|
|
2014-05-16 18:37:31 +00:00
|
|
|
# Automation build steps. Everything in MOZ_AUTOMATION_TIERS also gets used in
|
|
|
|
# TIERS for mach display. As such, the MOZ_AUTOMATION_TIERS are roughly sorted
|
|
|
|
# here in the order that they will be executed (since mach doesn't know of the
|
|
|
|
# dependencies between them).
|
2014-07-03 03:15:10 +00:00
|
|
|
moz_automation_symbols = \
|
2015-06-17 20:58:26 +00:00
|
|
|
MOZ_AUTOMATION_PACKAGE_TESTS \
|
|
|
|
MOZ_AUTOMATION_PRETTY_PACKAGE_TESTS \
|
|
|
|
MOZ_AUTOMATION_BUILD_SYMBOLS \
|
|
|
|
MOZ_AUTOMATION_UPLOAD_SYMBOLS \
|
|
|
|
MOZ_AUTOMATION_PACKAGE \
|
|
|
|
MOZ_AUTOMATION_PRETTY_PACKAGE \
|
|
|
|
MOZ_AUTOMATION_INSTALLER \
|
|
|
|
MOZ_AUTOMATION_PRETTY_INSTALLER \
|
|
|
|
MOZ_AUTOMATION_UPDATE_PACKAGING \
|
|
|
|
MOZ_AUTOMATION_PRETTY_UPDATE_PACKAGING \
|
|
|
|
MOZ_AUTOMATION_L10N_CHECK \
|
|
|
|
MOZ_AUTOMATION_PRETTY_L10N_CHECK \
|
|
|
|
MOZ_AUTOMATION_UPLOAD \
|
|
|
|
MOZ_AUTOMATION_SDK \
|
2014-07-03 03:15:10 +00:00
|
|
|
$(NULL)
|
2015-06-17 20:58:26 +00:00
|
|
|
MOZ_AUTOMATION_TIERS := $(foreach sym,$(moz_automation_symbols),$(if $(filter 1,$($(sym))),$(tier_$(sym))))
|
2014-05-16 18:37:31 +00:00
|
|
|
|
2014-06-16 17:17:21 +00:00
|
|
|
# Dependencies between automation build steps
|
|
|
|
automation/uploadsymbols: automation/buildsymbols
|
2014-05-16 18:37:31 +00:00
|
|
|
|
|
|
|
automation/update-packaging: automation/package
|
2015-02-19 15:04:16 +00:00
|
|
|
automation/update-packaging: automation/installer
|
2014-07-03 23:28:43 +00:00
|
|
|
automation/pretty-update-packaging: automation/pretty-package
|
|
|
|
automation/pretty-update-packaging: automation/pretty-installer
|
2014-05-16 18:37:31 +00:00
|
|
|
|
|
|
|
automation/l10n-check: automation/package
|
2014-07-03 23:28:43 +00:00
|
|
|
automation/l10n-check: automation/installer
|
|
|
|
automation/pretty-l10n-check: automation/pretty-package
|
|
|
|
automation/pretty-l10n-check: automation/pretty-installer
|
2014-05-16 18:37:31 +00:00
|
|
|
|
2014-07-03 23:28:43 +00:00
|
|
|
automation/upload: automation/installer
|
2014-05-16 18:37:31 +00:00
|
|
|
automation/upload: automation/package
|
|
|
|
automation/upload: automation/package-tests
|
|
|
|
automation/upload: automation/buildsymbols
|
2014-06-16 17:17:21 +00:00
|
|
|
automation/upload: automation/update-packaging
|
2015-02-25 09:39:25 +00:00
|
|
|
automation/upload: automation/sdk
|
2014-05-16 18:37:31 +00:00
|
|
|
|
2014-10-23 15:30:17 +00:00
|
|
|
# automation/{pretty-}package should depend on build (which is implicit due to
|
|
|
|
# the way client.mk invokes automation/build), but buildsymbols changes the
|
|
|
|
# binaries/libs, and that's what we package/test.
|
2014-07-03 23:28:43 +00:00
|
|
|
automation/pretty-package: automation/buildsymbols
|
2014-05-16 18:37:31 +00:00
|
|
|
|
2015-02-25 09:39:25 +00:00
|
|
|
# The installer, sdk and packager all run stage-package, and may conflict
|
2015-02-19 15:04:16 +00:00
|
|
|
# with each other.
|
|
|
|
automation/installer: automation/package
|
2015-02-25 09:39:25 +00:00
|
|
|
automation/sdk: automation/installer automation/package
|
2015-02-19 15:04:16 +00:00
|
|
|
|
2014-07-03 03:15:10 +00:00
|
|
|
# The 'pretty' versions of targets run before the regular ones to avoid
|
|
|
|
# conflicts in writing to the same files.
|
2014-07-03 23:28:43 +00:00
|
|
|
automation/installer: automation/pretty-installer
|
2014-07-03 03:15:10 +00:00
|
|
|
automation/package: automation/pretty-package
|
|
|
|
automation/package-tests: automation/pretty-package-tests
|
|
|
|
automation/l10n-check: automation/pretty-l10n-check
|
|
|
|
automation/update-packaging: automation/pretty-update-packaging
|
|
|
|
|
2014-06-16 17:17:21 +00:00
|
|
|
automation/build: $(addprefix automation/,$(MOZ_AUTOMATION_TIERS))
|
2015-08-25 15:42:44 +00:00
|
|
|
@echo Automation steps completed.
|
2014-05-16 18:37:31 +00:00
|
|
|
|
2014-07-03 23:28:43 +00:00
|
|
|
# Note: We have to force -j1 here, at least until bug 1036563 is fixed.
|
|
|
|
AUTOMATION_EXTRA_CMDLINE-l10n-check = -j1
|
2014-09-26 03:13:27 +00:00
|
|
|
AUTOMATION_EXTRA_CMDLINE-pretty-l10n-check = -j1
|
2014-07-03 23:28:43 +00:00
|
|
|
|
2014-06-16 17:17:21 +00:00
|
|
|
# The commands only run if the corresponding MOZ_AUTOMATION_* variable is
|
|
|
|
# enabled. This means, for example, if we enable MOZ_AUTOMATION_UPLOAD, then
|
|
|
|
# 'buildsymbols' will only run if MOZ_AUTOMATION_BUILD_SYMBOLS is also set.
|
|
|
|
# However, the target automation/buildsymbols will still be executed in this
|
|
|
|
# case because it is a prerequisite of automation/upload.
|
|
|
|
define automation_commands
|
2015-10-13 21:10:10 +00:00
|
|
|
@+$(MAKE) $1 $(AUTOMATION_EXTRA_CMDLINE-$1)
|
2014-06-16 17:17:21 +00:00
|
|
|
$(call BUILDSTATUS,TIER_FINISH $1)
|
|
|
|
endef
|
|
|
|
|
2015-06-17 20:59:20 +00:00
|
|
|
# The tier start message is in a separate target so make doesn't buffer it
|
|
|
|
# until the step completes with output syncing enabled.
|
|
|
|
automation-start/%:
|
|
|
|
$(if $(filter $*,$(MOZ_AUTOMATION_TIERS)),$(call BUILDSTATUS,TIER_START $*))
|
|
|
|
|
|
|
|
automation/%: automation-start/%
|
2014-06-16 17:17:21 +00:00
|
|
|
$(if $(filter $*,$(MOZ_AUTOMATION_TIERS)),$(call automation_commands,$*))
|