2005-06-16 22:28:09 +00:00
|
|
|
# vim:set ts=8 sw=8 sts=8 noet:
|
|
|
|
#
|
2012-05-21 11:12:37 +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/.
|
2005-06-16 22:28:09 +00:00
|
|
|
|
2013-02-25 21:20:01 +00:00
|
|
|
STANDALONE_MAKEFILE := 1
|
|
|
|
|
2008-09-17 20:53:09 +00:00
|
|
|
# input location for the build, usually $(DIST)
|
|
|
|
# set this to $(DIST)/l10n-stage per override for L10n builds
|
|
|
|
PACKAGE_BASE_DIR = $(DIST)
|
|
|
|
|
2005-06-16 22:28:09 +00:00
|
|
|
# Default output location for update archive
|
2015-02-27 16:49:29 +00:00
|
|
|
STAGE_DIR = $(abspath $(DIST)/$(PKG_UPDATE_PATH))
|
2005-06-16 22:28:09 +00:00
|
|
|
|
2009-09-19 02:59:53 +00:00
|
|
|
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
2006-02-24 18:17:31 +00:00
|
|
|
ifdef UNIVERSAL_BINARY
|
2008-09-17 20:53:09 +00:00
|
|
|
ifneq (,$(filter %/l10n-stage,$(PACKAGE_BASE_DIR)))
|
2011-10-27 17:27:56 +00:00
|
|
|
PACKAGE_DIR = $(PACKAGE_BASE_DIR)/$(MOZ_PKG_DIR)/$(MOZ_MACBUNDLE_NAME)
|
2008-03-13 18:39:38 +00:00
|
|
|
else
|
2011-10-27 17:27:56 +00:00
|
|
|
PACKAGE_DIR = $(PACKAGE_BASE_DIR)/universal/$(MOZ_PKG_DIR)/$(MOZ_MACBUNDLE_NAME)
|
2008-03-13 18:39:38 +00:00
|
|
|
endif
|
2006-02-24 18:17:31 +00:00
|
|
|
else
|
2011-10-27 17:27:56 +00:00
|
|
|
PACKAGE_DIR = $(PACKAGE_BASE_DIR)/$(MOZ_PKG_DIR)/$(MOZ_MACBUNDLE_NAME)
|
2006-02-24 18:17:31 +00:00
|
|
|
endif
|
2005-07-05 21:51:26 +00:00
|
|
|
else
|
2008-12-24 14:08:08 +00:00
|
|
|
PACKAGE_DIR = $(PACKAGE_BASE_DIR)/$(MOZ_PKG_DIR)
|
2005-07-05 21:51:26 +00:00
|
|
|
endif
|
|
|
|
|
2009-12-15 21:36:13 +00:00
|
|
|
MAR_BIN = $(LIBXUL_DIST)/host/bin/mar$(HOST_BIN_SUFFIX)
|
|
|
|
MBSDIFF_BIN = $(LIBXUL_DIST)/host/bin/mbsdiff$(HOST_BIN_SUFFIX)
|
2006-03-08 00:48:57 +00:00
|
|
|
|
2013-05-05 08:16:25 +00:00
|
|
|
OVERRIDE_DEFAULT_GOAL := full-update
|
2014-10-24 22:24:33 +00:00
|
|
|
full-update:: complete-patch $(if $(MOZ_AUTOMATION_UPDATE_PACKAGING),automation-partial-patch)
|
2005-08-28 03:27:14 +00:00
|
|
|
|
2011-04-11 16:23:26 +00:00
|
|
|
ifeq ($(OS_TARGET), WINNT)
|
|
|
|
MOZ_PKG_FORMAT := SFX7Z
|
2013-12-02 21:34:21 +00:00
|
|
|
UNPACKAGE = '$(subst $(DIST),$(_ABS_DIST),$(INSTALLER_PACKAGE))'
|
2011-04-11 16:23:26 +00:00
|
|
|
ifdef AB_CD
|
2013-12-02 21:34:21 +00:00
|
|
|
UNPACKAGE = '$(PACKAGE_BASE_DIR)/$(PACKAGE)'
|
2011-04-11 16:23:26 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2011-12-07 22:06:52 +00:00
|
|
|
include $(topsrcdir)/config/rules.mk
|
|
|
|
include $(topsrcdir)/toolkit/mozapps/installer/signing.mk
|
|
|
|
include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
|
|
|
|
|
|
|
|
ifdef MOZ_EXTERNAL_SIGNING_FORMAT
|
|
|
|
# We can't use signcode on mar files
|
2014-10-06 16:21:29 +00:00
|
|
|
MOZ_EXTERNAL_SIGNING_FORMAT := $(filter-out osslsigncode signcode,$(MOZ_EXTERNAL_SIGNING_FORMAT))
|
2011-12-07 22:06:52 +00:00
|
|
|
MOZ_EXTERNAL_SIGNING_FORMAT := mar $(MOZ_EXTERNAL_SIGNING_FORMAT)
|
|
|
|
endif
|
|
|
|
|
2012-05-03 10:22:33 +00:00
|
|
|
dir-stage := $(call mkdir_deps,$(STAGE_DIR))
|
|
|
|
|
|
|
|
complete-patch:: $(dir-stage)
|
2011-04-11 16:23:26 +00:00
|
|
|
ifeq ($(OS_TARGET), WINNT)
|
|
|
|
test -f $(UNPACKAGE)
|
2013-12-02 21:34:21 +00:00
|
|
|
$(RM) -rf '$(PACKAGE_DIR)'
|
2011-04-11 16:23:26 +00:00
|
|
|
cd $(PACKAGE_BASE_DIR) && $(INNER_UNMAKE_PACKAGE)
|
|
|
|
endif
|
2006-03-08 00:48:57 +00:00
|
|
|
MAR=$(MAR_BIN) \
|
2005-08-28 03:27:14 +00:00
|
|
|
$(srcdir)/make_full_update.sh \
|
2014-10-24 22:24:33 +00:00
|
|
|
'$(DIST)/$(COMPLETE_MAR)' \
|
2013-12-02 21:34:21 +00:00
|
|
|
'$(PACKAGE_DIR)'
|
2014-02-20 15:00:53 +00:00
|
|
|
ifdef MOZ_SIGN_CMD
|
2014-10-24 22:24:33 +00:00
|
|
|
$(MOZ_SIGN_CMD) -f mar '$(DIST)/$(COMPLETE_MAR)'
|
2011-12-07 22:06:52 +00:00
|
|
|
endif
|
2005-08-28 03:27:14 +00:00
|
|
|
|
2012-05-03 10:22:33 +00:00
|
|
|
partial-patch:: $(dir-stage)
|
2006-03-08 00:48:57 +00:00
|
|
|
MAR=$(MAR_BIN) \
|
|
|
|
MBSDIFF=$(MBSDIFF_BIN) \
|
2005-08-28 03:27:14 +00:00
|
|
|
$(srcdir)/make_incremental_update.sh \
|
2013-12-02 21:34:21 +00:00
|
|
|
'$(STAGE_DIR)/$(PKG_UPDATE_BASENAME).partial.$(SRC_BUILD_ID)-$(DST_BUILD_ID).mar' \
|
|
|
|
'$(SRC_BUILD)' \
|
|
|
|
'$(DST_BUILD)'
|
2014-02-20 15:00:53 +00:00
|
|
|
ifdef MOZ_SIGN_CMD
|
|
|
|
$(MOZ_SIGN_CMD) -f mar '$(STAGE_DIR)/$(PKG_UPDATE_BASENAME).partial.$(SRC_BUILD_ID)-$(DST_BUILD_ID).mar'
|
2011-12-07 22:06:52 +00:00
|
|
|
endif
|
2014-10-24 22:24:33 +00:00
|
|
|
|
|
|
|
automation-partial-patch: complete-patch
|
|
|
|
rm -rf current current.work previous
|
|
|
|
mkdir current previous
|
|
|
|
latestmar=$$(ssh -l $(UPLOAD_USER) -i $(UPLOAD_SSH_KEY) $(UPLOAD_HOST) 'ls -1t $(LATEST_MAR_DIR) | grep $(MOZ_PKG_PLATFORM).complete.mar$$ | head -n 1'); \
|
|
|
|
if test -n "$$latestmar"; then \
|
|
|
|
wget -O $(STAGE_DIR)/previous.mar http://$(UPLOAD_HOST)/$(LATEST_MAR_DIR)/$$latestmar && \
|
|
|
|
(cd previous; \
|
2015-02-27 16:49:29 +00:00
|
|
|
MAR=$(MAR_BIN) perl $(topsrcdir)/tools/update-packaging/unwrap_full_update.pl '$(STAGE_DIR)/previous.mar') && \
|
2014-10-24 22:24:33 +00:00
|
|
|
(cd current; \
|
2015-02-27 16:49:29 +00:00
|
|
|
MAR=$(MAR_BIN) perl $(topsrcdir)/tools/update-packaging/unwrap_full_update.pl '$(abspath $(DIST)/$(COMPLETE_MAR))') && \
|
2014-10-24 22:24:33 +00:00
|
|
|
find current -name \*.pgc -print -delete && \
|
|
|
|
find previous -name \*.pgc -print -delete && \
|
|
|
|
rm -f $(STAGE_DIR)/*.partial.*.mar && \
|
|
|
|
SRC_BUILD_ID=$$(python $(topsrcdir)/config/printconfigsetting.py $$(find previous -maxdepth 4 -type f -name application.ini) App BuildID) \
|
|
|
|
DST_BUILD_ID=$$(cat $(DEPTH)/config/buildid) \
|
|
|
|
SRC_BUILD=previous DST_BUILD=current \
|
|
|
|
$(MAKE) partial-patch && \
|
|
|
|
rm -f $(STAGE_DIR)/previous.mar; \
|
|
|
|
else \
|
|
|
|
echo "No previous MAR found; not creating a partial MAR"; \
|
|
|
|
fi
|