2007-03-22 10:30:00 -07:00
|
|
|
# vim:set ts=8 sw=8 sts=8 noet:
|
|
|
|
#
|
2012-05-21 04:12:37 -07: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/.
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
DEPTH = ../..
|
|
|
|
topsrcdir = @top_srcdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
|
|
|
|
include $(DEPTH)/config/autoconf.mk
|
|
|
|
|
2008-09-17 13:53:09 -07:00
|
|
|
# input location for the build, usually $(DIST)
|
|
|
|
# set this to $(DIST)/l10n-stage per override for L10n builds
|
|
|
|
PACKAGE_BASE_DIR = $(DIST)
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
# Default output location for update archive
|
2008-09-17 13:53:09 -07:00
|
|
|
STAGE_DIR = $(DIST)/$(PKG_UPDATE_PATH)
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2009-09-18 19:59:53 -07:00
|
|
|
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
2007-03-22 10:30:00 -07:00
|
|
|
ifdef UNIVERSAL_BINARY
|
2008-09-17 13:53:09 -07:00
|
|
|
ifneq (,$(filter %/l10n-stage,$(PACKAGE_BASE_DIR)))
|
2011-10-27 10:27:56 -07:00
|
|
|
PACKAGE_DIR = $(PACKAGE_BASE_DIR)/$(MOZ_PKG_DIR)/$(MOZ_MACBUNDLE_NAME)
|
2008-03-13 11:39:38 -07:00
|
|
|
else
|
2011-10-27 10:27:56 -07:00
|
|
|
PACKAGE_DIR = $(PACKAGE_BASE_DIR)/universal/$(MOZ_PKG_DIR)/$(MOZ_MACBUNDLE_NAME)
|
2008-03-13 11:39:38 -07:00
|
|
|
endif
|
2007-03-22 10:30:00 -07:00
|
|
|
else
|
2011-10-27 10:27:56 -07:00
|
|
|
PACKAGE_DIR = $(PACKAGE_BASE_DIR)/$(MOZ_PKG_DIR)/$(MOZ_MACBUNDLE_NAME)
|
2007-03-22 10:30:00 -07:00
|
|
|
endif
|
|
|
|
else
|
2008-12-24 06:08:08 -08:00
|
|
|
PACKAGE_DIR = $(PACKAGE_BASE_DIR)/$(MOZ_PKG_DIR)
|
2007-03-22 10:30:00 -07:00
|
|
|
endif
|
|
|
|
|
2009-12-15 13:36:13 -08:00
|
|
|
MAR_BIN = $(LIBXUL_DIST)/host/bin/mar$(HOST_BIN_SUFFIX)
|
|
|
|
MBSDIFF_BIN = $(LIBXUL_DIST)/host/bin/mbsdiff$(HOST_BIN_SUFFIX)
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
full-update:: complete-patch
|
|
|
|
|
2011-04-11 09:23:26 -07:00
|
|
|
ifeq ($(OS_TARGET), WINNT)
|
|
|
|
MOZ_PKG_FORMAT := SFX7Z
|
|
|
|
UNPACKAGE = "$(subst $(DIST),$(_ABS_DIST),$(INSTALLER_PACKAGE))"
|
|
|
|
ifdef AB_CD
|
|
|
|
UNPACKAGE = "$(PACKAGE_BASE_DIR)/$(PACKAGE)"
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2011-12-07 14:06:52 -08: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
|
|
|
|
MOZ_EXTERNAL_SIGNING_FORMAT := $(filter-out signcode,$(MOZ_EXTERNAL_SIGNING_FORMAT))
|
|
|
|
MOZ_EXTERNAL_SIGNING_FORMAT := mar $(MOZ_EXTERNAL_SIGNING_FORMAT)
|
|
|
|
endif
|
|
|
|
|
2012-05-03 03:22:33 -07:00
|
|
|
dir-stage := $(call mkdir_deps,$(STAGE_DIR))
|
|
|
|
|
|
|
|
complete-patch:: $(dir-stage)
|
2011-04-11 09:23:26 -07:00
|
|
|
ifeq ($(OS_TARGET), WINNT)
|
|
|
|
test -f $(UNPACKAGE)
|
|
|
|
$(RM) -rf "$(PACKAGE_DIR)"
|
|
|
|
cd $(PACKAGE_BASE_DIR) && $(INNER_UNMAKE_PACKAGE)
|
|
|
|
endif
|
2007-03-22 10:30:00 -07:00
|
|
|
MAR=$(MAR_BIN) \
|
|
|
|
$(srcdir)/make_full_update.sh \
|
2008-09-17 13:53:09 -07:00
|
|
|
"$(STAGE_DIR)/$(PKG_UPDATE_BASENAME).complete.mar" \
|
2007-03-22 10:30:00 -07:00
|
|
|
"$(PACKAGE_DIR)"
|
2011-12-07 14:06:52 -08:00
|
|
|
ifdef MOZ_SIGN_PACKAGE_CMD
|
|
|
|
$(MOZ_SIGN_PACKAGE_CMD) "$(STAGE_DIR)/$(PKG_UPDATE_BASENAME).complete.mar"
|
|
|
|
endif
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-05-03 03:22:33 -07:00
|
|
|
partial-patch:: $(dir-stage)
|
2007-03-22 10:30:00 -07:00
|
|
|
MAR=$(MAR_BIN) \
|
|
|
|
MBSDIFF=$(MBSDIFF_BIN) \
|
|
|
|
$(srcdir)/make_incremental_update.sh \
|
2008-09-17 13:53:09 -07:00
|
|
|
"$(STAGE_DIR)/$(PKG_UPDATE_BASENAME).partial.$(SRC_BUILD_ID)-$(DST_BUILD_ID).mar" \
|
2007-03-22 10:30:00 -07:00
|
|
|
"$(SRC_BUILD)" \
|
|
|
|
"$(DST_BUILD)"
|
2011-12-07 14:06:52 -08:00
|
|
|
ifdef MOZ_SIGN_PACKAGE_CMD
|
|
|
|
$(MOZ_SIGN_PACKAGE_CMD) "$(STAGE_DIR)/$(PKG_UPDATE_BASENAME).partial.$(SRC_BUILD_ID)-$(DST_BUILD_ID).mar"
|
|
|
|
endif
|