Bug 1527483 [wpt PR 15346] - Update wpt metadata, a=testonly
[gecko.git] / tools / update-packaging / Makefile.in
blobf8fc6140818c62b6e71201843dd963b4d17d390e
1 # vim:set ts=8 sw=8 sts=8 noet:
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 STANDALONE_MAKEFILE := 1
9 # input location for the build, usually $(DIST)
10 # set this to $(DIST)/l10n-stage per override for L10n builds
11 PACKAGE_BASE_DIR = $(DIST)
13 # Default output location for update archive
14 STAGE_DIR = $(ABS_DIST)/$(PKG_UPDATE_PATH)
16 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
17 PACKAGE_DIR = $(PACKAGE_BASE_DIR)/$(MOZ_PKG_DIR)/$(MOZ_MACBUNDLE_NAME)
18 else
19 PACKAGE_DIR = $(PACKAGE_BASE_DIR)/$(MOZ_PKG_DIR)
20 endif
22 MAR_BIN = $(DIST)/host/bin/mar$(HOST_BIN_SUFFIX)
23 MBSDIFF_BIN = $(DIST)/host/bin/mbsdiff$(HOST_BIN_SUFFIX)
25 OVERRIDE_DEFAULT_GOAL := full-update
26 full-update:: complete-patch
28 ifeq ($(OS_TARGET), WINNT)
29 MOZ_PKG_FORMAT := SFX7Z
30 UNPACKAGE = '$(subst $(DIST),$(ABS_DIST),$(INSTALLER_PACKAGE))'
31 endif
33 include $(topsrcdir)/config/rules.mk
34 include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
36 ifdef MOZ_EXTERNAL_SIGNING_FORMAT
37 # We can't use sha2signcode on mar files
38 MOZ_EXTERNAL_SIGNING_FORMAT := $(filter-out sha2signcode,$(MOZ_EXTERNAL_SIGNING_FORMAT))
39 MOZ_EXTERNAL_SIGNING_FORMAT := mar $(MOZ_EXTERNAL_SIGNING_FORMAT)
40 endif
42 ifndef MAR_OLD_FORMAT
43 MAR_SIGN_FORMAT=mar_sha384
44 else
45 MAR_SIGN_FORMAT=mar
46 endif
48 dir-stage := $(call mkdir_deps,$(STAGE_DIR))
50 complete-patch:: $(dir-stage)
51 # unpack the windows installer, unless we're an l10n repack, we just packed this
52 ifndef IS_LANGUAGE_REPACK
53 ifeq ($(OS_TARGET), WINNT)
54 test -f $(UNPACKAGE)
55 $(RM) -rf '$(PACKAGE_DIR)'
56 cd $(PACKAGE_BASE_DIR) && $(INNER_UNMAKE_PACKAGE)
57 endif
58 endif
59 MAR=$(MAR_BIN) \
60 MOZ_PRODUCT_VERSION=$(MOZ_APP_VERSION) \
61 $(srcdir)/make_full_update.sh \
62 '$(DIST)/$(COMPLETE_MAR)' \
63 '$(PACKAGE_DIR)'
65 partial-patch:: $(dir-stage)
66 MAR=$(MAR_BIN) \
67 MBSDIFF=$(MBSDIFF_BIN) \
68 MOZ_PRODUCT_VERSION=$(MOZ_APP_VERSION) \
69 $(srcdir)/make_incremental_update.sh \
70 '$(STAGE_DIR)/$(PKG_UPDATE_BASENAME).partial.$(SRC_BUILD_ID)-$(DST_BUILD_ID).mar' \
71 '$(SRC_BUILD)' \
72 '$(DST_BUILD)'