2012-05-21 15:12:37 +04: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/.
|
2004-03-12 02:18:19 +03:00
|
|
|
|
2013-02-26 00:47:18 +04:00
|
|
|
STANDALONE_MAKEFILE := 1
|
2013-10-21 22:10:04 +04:00
|
|
|
DIST_SUBDIR := browser
|
2013-02-26 00:47:18 +04:00
|
|
|
|
2004-12-02 03:52:27 +03:00
|
|
|
include $(topsrcdir)/config/rules.mk
|
2004-03-25 06:49:32 +03:00
|
|
|
|
2005-09-15 22:09:56 +04:00
|
|
|
MOZ_PKG_REMOVALS = $(srcdir)/removed-files.in
|
|
|
|
|
2015-07-15 10:31:53 +03:00
|
|
|
MOZ_PKG_MANIFEST = $(srcdir)/package-manifest.in
|
2016-10-31 22:54:42 +03:00
|
|
|
MOZ_PKG_DUPEFLAGS = -f $(srcdir)/allowed-dupes.mn
|
2014-05-26 17:18:00 +04:00
|
|
|
|
2012-04-25 03:49:59 +04:00
|
|
|
# Some files have been already bundled with xulrunner
|
2014-05-26 17:18:00 +04:00
|
|
|
ifndef MOZ_MULET
|
2012-03-18 20:56:09 +04:00
|
|
|
MOZ_PKG_FATAL_WARNINGS = 1
|
2015-07-15 10:31:53 +03:00
|
|
|
else
|
|
|
|
DEFINES += -DMOZ_MULET
|
2012-04-25 03:49:59 +04:00
|
|
|
endif
|
2005-06-30 23:22:39 +04:00
|
|
|
|
2016-08-18 01:02:31 +03:00
|
|
|
# When packaging an artifact build not all xpt files expected by the
|
|
|
|
# packager will be present.
|
|
|
|
ifdef MOZ_ARTIFACT_BUILDS
|
|
|
|
MOZ_PKG_FATAL_WARNINGS =
|
|
|
|
endif
|
|
|
|
|
2014-08-01 20:53:05 +04:00
|
|
|
DEFINES += -DMOZ_APP_NAME=$(MOZ_APP_NAME) -DPREF_DIR=$(PREF_DIR)
|
2012-01-28 21:13:09 +04:00
|
|
|
|
|
|
|
ifdef MOZ_DEBUG
|
|
|
|
DEFINES += -DMOZ_DEBUG=1
|
|
|
|
endif
|
|
|
|
|
2016-03-16 08:06:26 +03:00
|
|
|
ifneq (,$(filter gtk%,$(MOZ_WIDGET_TOOLKIT)))
|
2013-06-11 21:40:28 +04:00
|
|
|
DEFINES += -DMOZ_GTK=1
|
2016-03-16 07:32:47 +03:00
|
|
|
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk3)
|
2014-05-01 15:36:05 +04:00
|
|
|
DEFINES += -DMOZ_GTK3=1
|
|
|
|
endif
|
2009-08-28 01:22:04 +04:00
|
|
|
endif
|
2005-06-30 23:22:39 +04:00
|
|
|
|
2016-02-01 18:49:34 +03:00
|
|
|
ifdef MOZ_SYSTEM_NSPR
|
|
|
|
DEFINES += -DMOZ_SYSTEM_NSPR=1
|
2012-06-12 11:10:09 +04:00
|
|
|
endif
|
|
|
|
|
2016-02-01 18:49:34 +03:00
|
|
|
ifdef MOZ_SYSTEM_NSS
|
|
|
|
DEFINES += -DMOZ_SYSTEM_NSS=1
|
2012-06-12 11:10:09 +04:00
|
|
|
endif
|
|
|
|
|
2009-09-08 22:09:12 +04:00
|
|
|
ifdef NSS_DISABLE_DBM
|
|
|
|
DEFINES += -DNSS_DISABLE_DBM=1
|
|
|
|
endif
|
|
|
|
|
2016-08-18 01:02:31 +03:00
|
|
|
ifdef MOZ_ARTIFACT_BUILDS
|
|
|
|
DEFINES += -DMOZ_ARTIFACT_BUILDS=1
|
|
|
|
endif
|
|
|
|
|
2010-08-13 08:33:52 +04:00
|
|
|
DEFINES += -DJAREXT=
|
|
|
|
|
2012-07-11 06:33:03 +04:00
|
|
|
ifdef MOZ_ANGLE_RENDERER
|
|
|
|
DEFINES += -DMOZ_ANGLE_RENDERER=$(MOZ_ANGLE_RENDERER)
|
2014-05-03 11:59:00 +04:00
|
|
|
ifdef MOZ_D3DCOMPILER_VISTA_DLL
|
2014-05-03 02:31:05 +04:00
|
|
|
DEFINES += -DMOZ_D3DCOMPILER_VISTA_DLL=$(MOZ_D3DCOMPILER_VISTA_DLL)
|
2014-05-03 11:59:00 +04:00
|
|
|
endif
|
|
|
|
endif
|
2011-02-08 04:11:52 +03:00
|
|
|
|
2010-04-10 02:40:14 +04:00
|
|
|
DEFINES += -DMOZ_CHILD_PROCESS_NAME=$(MOZ_CHILD_PROCESS_NAME)
|
|
|
|
|
2012-03-20 06:05:20 +04:00
|
|
|
# Set MSVC dlls version to package, if any.
|
2014-05-30 04:39:44 +04:00
|
|
|
ifdef MOZ_NO_DEBUG_RTL
|
2016-02-02 18:42:04 +03:00
|
|
|
ifdef WIN32_REDIST_DIR
|
2017-04-20 22:26:49 +03:00
|
|
|
ifndef MOZ_ARTIFACT_BUILDS
|
2014-06-27 19:24:29 +04:00
|
|
|
DEFINES += -DMOZ_PACKAGE_MSVC_DLLS=1
|
|
|
|
DEFINES += -DMSVC_C_RUNTIME_DLL=$(MSVC_C_RUNTIME_DLL)
|
|
|
|
DEFINES += -DMSVC_CXX_RUNTIME_DLL=$(MSVC_CXX_RUNTIME_DLL)
|
2012-03-20 06:05:20 +04:00
|
|
|
endif
|
2016-02-02 18:42:04 +03:00
|
|
|
ifdef WIN_UCRT_REDIST_DIR
|
|
|
|
DEFINES += -DMOZ_PACKAGE_WIN_UCRT_DLLS=1
|
|
|
|
endif
|
2014-05-30 04:39:44 +04:00
|
|
|
endif
|
2017-04-20 22:26:49 +03:00
|
|
|
endif
|
2012-03-20 06:05:20 +04:00
|
|
|
|
2012-01-20 15:49:23 +04:00
|
|
|
ifneq (,$(filter WINNT Darwin Android,$(OS_TARGET)))
|
|
|
|
DEFINES += -DMOZ_SHARED_MOZGLUE=1
|
|
|
|
endif
|
|
|
|
|
2012-05-05 00:19:02 +04:00
|
|
|
ifdef NECKO_WIFI
|
|
|
|
DEFINES += -DNECKO_WIFI
|
|
|
|
endif
|
|
|
|
|
2015-04-01 13:50:44 +03:00
|
|
|
ifdef MAKENSISU
|
|
|
|
DEFINES += -DHAVE_MAKENSISU=1
|
|
|
|
endif
|
|
|
|
|
2009-09-19 06:59:53 +04:00
|
|
|
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
2005-08-18 17:11:46 +04:00
|
|
|
MOZ_PKG_MAC_DSSTORE=branding/dsstore
|
|
|
|
MOZ_PKG_MAC_BACKGROUND=branding/background.png
|
|
|
|
MOZ_PKG_MAC_ICON=branding/disk.icns
|
2013-12-03 01:34:21 +04:00
|
|
|
MOZ_PKG_MAC_EXTRA=--symlink '/Applications:/ '
|
2005-08-18 17:11:46 +04:00
|
|
|
endif
|
|
|
|
|
2011-12-08 02:06:52 +04:00
|
|
|
include $(topsrcdir)/toolkit/mozapps/installer/signing.mk
|
2004-12-02 03:52:27 +03:00
|
|
|
include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
|
2004-03-25 08:15:34 +03:00
|
|
|
|
2010-03-07 12:51:24 +03:00
|
|
|
ifeq (bundle, $(MOZ_FS_LAYOUT))
|
2010-02-22 08:55:51 +03:00
|
|
|
BINPATH = $(_BINPATH)
|
|
|
|
DEFINES += -DAPPNAME=$(_APPNAME)
|
2009-08-28 01:22:04 +04:00
|
|
|
else
|
|
|
|
# Every other platform just winds up in dist/bin
|
2010-02-22 08:55:51 +03:00
|
|
|
BINPATH = bin
|
2009-08-21 21:05:28 +04:00
|
|
|
endif
|
2010-02-22 08:55:51 +03:00
|
|
|
DEFINES += -DBINPATH=$(BINPATH)
|
2009-08-21 21:05:28 +04:00
|
|
|
|
2014-11-18 20:15:03 +03:00
|
|
|
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
|
|
|
RESPATH = $(_APPNAME)/Contents/Resources
|
|
|
|
else
|
|
|
|
RESPATH = $(BINPATH)
|
|
|
|
endif
|
|
|
|
DEFINES += -DRESPATH=$(RESPATH)
|
|
|
|
|
2015-07-22 09:02:28 +03:00
|
|
|
LPROJ_ROOT = $(firstword $(subst -, ,$(AB_CD)))
|
|
|
|
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
|
|
|
ifeq (zh-TW,$(AB_CD))
|
|
|
|
LPROJ_ROOT := $(subst -,_,$(AB_CD))
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
DEFINES += -DLPROJ_ROOT=$(LPROJ_ROOT)
|
2014-10-21 22:50:10 +04:00
|
|
|
|
2013-12-06 17:08:52 +04:00
|
|
|
DEFINES += -DMOZ_ICU_VERSION=$(MOZ_ICU_VERSION)
|
2016-02-01 18:49:34 +03:00
|
|
|
ifdef MOZ_SYSTEM_ICU
|
|
|
|
DEFINES += -DMOZ_SYSTEM_ICU
|
2013-12-08 22:03:10 +04:00
|
|
|
endif
|
2016-07-21 01:13:17 +03:00
|
|
|
ifdef MOZ_ICU_DATA_ARCHIVE
|
|
|
|
DEFINES += -DMOZ_ICU_DATA_ARCHIVE
|
|
|
|
endif
|
2014-05-30 04:37:24 +04:00
|
|
|
DEFINES += -DMOZ_ICU_DBG_SUFFIX=$(MOZ_ICU_DBG_SUFFIX)
|
2016-04-05 17:09:12 +03:00
|
|
|
DEFINES += -DICU_DATA_FILE=$(ICU_DATA_FILE)
|
2014-06-06 03:15:56 +04:00
|
|
|
ifdef CLANG_CXX
|
|
|
|
DEFINES += -DCLANG_CXX
|
|
|
|
endif
|
2014-10-17 05:40:00 +04:00
|
|
|
ifdef CLANG_CL
|
|
|
|
DEFINES += -DCLANG_CL
|
|
|
|
endif
|
2014-12-24 11:13:42 +03:00
|
|
|
|
2017-03-24 11:58:27 +03:00
|
|
|
ifdef LLVM_SYMBOLIZER
|
|
|
|
DEFINES += -DLLVM_SYMBOLIZER=$(notdir $(LLVM_SYMBOLIZER))
|
|
|
|
endif
|
|
|
|
ifdef MOZ_CLANG_RT_ASAN_LIB_PATH
|
|
|
|
DEFINES += -DMOZ_CLANG_RT_ASAN_LIB=$(notdir $(MOZ_CLANG_RT_ASAN_LIB_PATH))
|
|
|
|
endif
|
2013-12-06 17:08:52 +04:00
|
|
|
|
2016-02-12 05:46:46 +03:00
|
|
|
# Builds using the hybrid FasterMake/RecursiveMake backend will
|
|
|
|
# fail to produce a langpack. See bug 1255096.
|
2009-04-07 21:21:57 +04:00
|
|
|
libs::
|
2016-02-12 05:46:46 +03:00
|
|
|
ifeq (,$(filter FasterMake+RecursiveMake,$(BUILD_BACKENDS)))
|
2010-10-08 21:00:28 +04:00
|
|
|
$(MAKE) -C $(DEPTH)/browser/locales langpack
|
2016-02-12 05:46:46 +03:00
|
|
|
endif
|
2009-04-07 21:21:57 +04:00
|
|
|
|
2010-02-22 08:55:51 +03:00
|
|
|
ifeq (WINNT,$(OS_ARCH))
|
|
|
|
PKGCOMP_FIND_OPTS =
|
|
|
|
else
|
|
|
|
PKGCOMP_FIND_OPTS = -L
|
|
|
|
endif
|
|
|
|
ifeq (Darwin, $(OS_ARCH))
|
|
|
|
FINDPATH = $(_APPNAME)/Contents/MacOS
|
|
|
|
else
|
|
|
|
FINDPATH=bin
|
|
|
|
endif
|
|
|
|
|
2015-07-15 10:31:53 +03:00
|
|
|
package-compare::
|
2010-02-22 08:55:51 +03:00
|
|
|
cd $(DIST); find $(PKGCOMP_FIND_OPTS) $(FINDPATH) -type f | sort > bin-list.txt
|
2015-07-15 10:31:53 +03:00
|
|
|
$(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) $(MOZ_PKG_MANIFEST)) | grep '^$(BINPATH)' | sed -e 's/^\///' | sort > $(DIST)/pack-list.txt
|
2010-02-22 08:55:51 +03:00
|
|
|
-diff -u $(DIST)/pack-list.txt $(DIST)/bin-list.txt
|
|
|
|
rm -f $(DIST)/pack-list.txt $(DIST)/bin-list.txt
|
|
|
|
|
2013-01-23 14:23:15 +04:00
|
|
|
installer::
|
2004-12-02 03:52:27 +03:00
|
|
|
ifdef INSTALLER_DIR
|
|
|
|
$(MAKE) -C $(INSTALLER_DIR)
|
2004-03-25 08:15:34 +03:00
|
|
|
endif
|
2012-06-14 22:38:31 +04:00
|
|
|
|
|
|
|
ifdef ENABLE_MARIONETTE
|
|
|
|
DEFINES += -DENABLE_MARIONETTE=1
|
|
|
|
endif
|