tools/update-packaging/Makefile.in
author Chris Manchester <cmanchester@mozilla.com>
Wed, 16 Jan 2019 22:46:38 +0000
changeset 514323 471d9fab61b34671f974dfa349e7972c200faa2b
parent 447051 a3e00fccf66070dd20cb51cc758e0e3bce919e5e
permissions -rw-r--r--
Bug 1507631 - Remove mentions of MOZ_SIGN_CMD from the build system. r=nalexander Differential Revision: https://phabricator.services.mozilla.com/D16754

# vim:set ts=8 sw=8 sts=8 noet:
#
# 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/.

STANDALONE_MAKEFILE := 1

# input location for the build, usually $(DIST)
# set this to $(DIST)/l10n-stage per override for L10n builds
PACKAGE_BASE_DIR	= $(DIST)

# Default output location for update archive
STAGE_DIR      = $(ABS_DIST)/$(PKG_UPDATE_PATH)

ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
PACKAGE_DIR	= $(PACKAGE_BASE_DIR)/$(MOZ_PKG_DIR)/$(MOZ_MACBUNDLE_NAME)
else
PACKAGE_DIR	= $(PACKAGE_BASE_DIR)/$(MOZ_PKG_DIR)
endif

MAR_BIN	= $(DIST)/host/bin/mar$(HOST_BIN_SUFFIX)
MBSDIFF_BIN	= $(DIST)/host/bin/mbsdiff$(HOST_BIN_SUFFIX)

OVERRIDE_DEFAULT_GOAL := full-update
full-update:: complete-patch

ifeq ($(OS_TARGET), WINNT)
MOZ_PKG_FORMAT	:= SFX7Z
UNPACKAGE	= '$(subst $(DIST),$(ABS_DIST),$(INSTALLER_PACKAGE))'
endif

include $(topsrcdir)/config/rules.mk
include $(topsrcdir)/toolkit/mozapps/installer/packager.mk

ifdef MOZ_EXTERNAL_SIGNING_FORMAT
# We can't use sha2signcode on mar files
MOZ_EXTERNAL_SIGNING_FORMAT := $(filter-out sha2signcode,$(MOZ_EXTERNAL_SIGNING_FORMAT))
MOZ_EXTERNAL_SIGNING_FORMAT := mar $(MOZ_EXTERNAL_SIGNING_FORMAT)
endif

ifndef MAR_OLD_FORMAT
MAR_SIGN_FORMAT=mar_sha384
else
MAR_SIGN_FORMAT=mar
endif

dir-stage := $(call mkdir_deps,$(STAGE_DIR))

complete-patch:: $(dir-stage)
# unpack the windows installer, unless we're an l10n repack, we just packed this
ifndef IS_LANGUAGE_REPACK
ifeq ($(OS_TARGET), WINNT)
	test -f $(UNPACKAGE)
	$(RM) -rf '$(PACKAGE_DIR)'
	cd $(PACKAGE_BASE_DIR) && $(INNER_UNMAKE_PACKAGE)
endif
endif
	MAR=$(MAR_BIN) \
	MOZ_PRODUCT_VERSION=$(MOZ_APP_VERSION) \
	  $(srcdir)/make_full_update.sh \
	  '$(DIST)/$(COMPLETE_MAR)' \
	  '$(PACKAGE_DIR)'

partial-patch:: $(dir-stage)
	MAR=$(MAR_BIN) \
	MBSDIFF=$(MBSDIFF_BIN) \
	MOZ_PRODUCT_VERSION=$(MOZ_APP_VERSION) \
	  $(srcdir)/make_incremental_update.sh \
	  '$(STAGE_DIR)/$(PKG_UPDATE_BASENAME).partial.$(SRC_BUILD_ID)-$(DST_BUILD_ID).mar' \
	  '$(SRC_BUILD)' \
	  '$(DST_BUILD)'