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/.
2004-11-30 22:54:13 +00:00
2008-07-06 20:30:32 +00:00
i n c l u d e $( MOZILLA_DIR ) / t o o l k i t / m o z a p p s / i n s t a l l e r / p a c k a g e - n a m e . m k
2004-11-30 22:54:13 +00:00
2009-09-15 22:11:42 +00:00
# This is how we create the binary packages we release to the public.
2004-11-30 22:54:13 +00:00
i f n d e f M O Z _ P K G _ F O R M A T
2009-09-19 02:59:53 +00:00
i f e q ( c o c o a , $( MOZ_WIDGET_TOOLKIT ) )
2004-11-30 22:54:13 +00:00
MOZ_PKG_FORMAT = DMG
e l s e
2014-02-10 22:57:01 +00:00
i f e q ( , $( filter -out WINNT , $ ( OS_ARCH ) ) )
2004-11-30 22:54:13 +00:00
MOZ_PKG_FORMAT = ZIP
2009-09-15 22:11:42 +00:00
e l s e
i f e q ( , $( filter -out SunOS , $ ( OS_ARCH ) ) )
MOZ_PKG_FORMAT = BZ2
e l s e
2013-06-10 12:36:26 +00:00
ifeq ( ,$( filter-out gtk2 gtk3 qt, $( MOZ_WIDGET_TOOLKIT) ) )
2009-09-15 22:11:42 +00:00
MOZ_PKG_FORMAT = BZ2
else
2011-11-11 00:17:46 +00:00
ifeq ( android,$( MOZ_WIDGET_TOOLKIT) )
2010-10-12 19:30:41 +00:00
MOZ_PKG_FORMAT = APK
else
MOZ_PKG_FORMAT = TGZ
endif
2009-09-15 22:11:42 +00:00
endif
e n d i f
e n d i f
e n d i f
e n d i f # MOZ_PKG_FORMAT
2011-04-29 10:38:26 +00:00
i f e q ( $( OS_ARCH ) , W I N N T )
2004-11-30 22:54:13 +00:00
INSTALLER_DIR = windows
2009-09-15 22:11:42 +00:00
e n d i f
2004-11-30 22:54:13 +00:00
2012-04-05 17:01:17 +00:00
i f e q ( c o c o a , $( MOZ_WIDGET_TOOLKIT ) )
i f n d e f _ A P P N A M E
_APPNAME = $( MOZ_MACBUNDLE_NAME)
e n d i f
i f n d e f _ B I N P A T H
_BINPATH = /$( _APPNAME) /Contents/MacOS
e n d i f # _BINPATH
i f d e f U N I V E R S A L _ B I N A R Y
STAGEPATH = universal/
e n d i f
e n d i f
2012-05-25 13:25:07 +00:00
PACKAGE_BASE_DIR = $( _ABS_DIST)
2008-09-17 20:53:09 +00:00
PACKAGE = $( PKG_PATH) $( PKG_BASENAME) $( PKG_SUFFIX)
2004-11-30 22:54:13 +00:00
2007-08-09 19:53:08 +00:00
# By default, the SDK uses the same packaging type as the main bundle,
# but on mac it is a .tar.bz2
2010-02-12 10:54:24 +00:00
SDK_PATH = $( PKG_PATH)
i f e q ( $( MOZ_APP_NAME ) , x u l r u n n e r )
SDK_PATH = sdk/
2012-03-12 17:39:35 +00:00
# Don't codesign xulrunner internally
MOZ_INTERNAL_SIGNING_FORMAT =
2010-02-12 10:54:24 +00:00
e n d i f
2007-08-09 19:53:08 +00:00
SDK_SUFFIX = $( PKG_SUFFIX)
2010-02-12 10:54:24 +00:00
SDK = $( SDK_PATH) $( PKG_BASENAME) .sdk$( SDK_SUFFIX)
2012-04-23 14:11:19 +00:00
i f d e f U N I V E R S A L _ B I N A R Y
SDK = $( SDK_PATH) $( PKG_BASENAME) -$( TARGET_CPU) .sdk$( SDK_SUFFIX)
e n d i f
2007-08-09 19:53:08 +00:00
2011-06-09 18:03:00 +00:00
# JavaScript Shell packaging
2011-06-26 15:24:59 +00:00
i f n d e f L I B X U L _ S D K
2011-06-09 18:03:00 +00:00
JSSHELL_BINS = \
$( DIST) /bin/js$( BIN_SUFFIX) \
2012-02-22 07:12:15 +00:00
$( DIST) /bin/$( DLL_PREFIX) mozglue$( DLL_SUFFIX) \
2011-06-09 18:03:00 +00:00
$( NULL)
2011-06-26 15:24:59 +00:00
i f n d e f M O Z _ N A T I V E _ N S P R
2011-08-23 13:36:31 +00:00
i f e q ( $( _MSC_VER ) , 1 4 0 0 )
JSSHELL_BINS += $( DIST) /bin/Microsoft.VC80.CRT.manifest
JSSHELL_BINS += $( DIST) /bin/msvcr80.dll
2013-10-25 12:14:51 +00:00
JSSHELL_BINS += $( DIST) /bin/msvcp80.dll
2011-08-23 13:36:31 +00:00
e n d i f
i f e q ( $( _MSC_VER ) , 1 5 0 0 )
JSSHELL_BINS += $( DIST) /bin/Microsoft.VC90.CRT.manifest
JSSHELL_BINS += $( DIST) /bin/msvcr90.dll
2013-10-25 12:14:51 +00:00
JSSHELL_BINS += $( DIST) /bin/msvcp90.dll
2011-08-23 13:36:31 +00:00
e n d i f
2011-08-29 05:23:20 +00:00
i f e q ( $( _MSC_VER ) , 1 6 0 0 )
2011-08-23 13:36:31 +00:00
JSSHELL_BINS += $( DIST) /bin/msvcr100.dll
2013-10-25 12:14:51 +00:00
JSSHELL_BINS += $( DIST) /bin/msvcp100.dll
2011-08-23 13:36:31 +00:00
e n d i f
2011-10-04 01:57:00 +00:00
i f e q ( $( _MSC_VER ) , 1 7 0 0 )
JSSHELL_BINS += $( DIST) /bin/msvcr110.dll
2013-10-25 12:14:51 +00:00
JSSHELL_BINS += $( DIST) /bin/msvcp110.dll
2011-10-04 01:57:00 +00:00
e n d i f
2013-07-03 01:52:32 +00:00
i f e q ( $( _MSC_VER ) , 1 8 0 0 )
JSSHELL_BINS += $( DIST) /bin/msvcr120.dll
2013-10-25 12:14:51 +00:00
JSSHELL_BINS += $( DIST) /bin/msvcp120.dll
2013-07-03 01:52:32 +00:00
e n d i f
2013-03-17 06:53:39 +00:00
i f d e f M O Z _ F O L D _ L I B S
JSSHELL_BINS += $( DIST) /bin/$( DLL_PREFIX) nss3$( DLL_SUFFIX)
e l s e
2011-06-09 18:03:00 +00:00
JSSHELL_BINS += \
2013-03-17 06:53:39 +00:00
$( DIST) /bin/$( DLL_PREFIX) nspr4$( DLL_SUFFIX) \
2012-02-22 07:12:15 +00:00
$( DIST) /bin/$( DLL_PREFIX) plds4$( DLL_SUFFIX) \
$( DIST) /bin/$( DLL_PREFIX) plc4$( DLL_SUFFIX) \
2011-06-09 18:03:00 +00:00
$( NULL)
2013-03-17 06:53:39 +00:00
e n d i f # MOZ_FOLD_LIBS
2011-06-26 15:24:59 +00:00
e n d i f # MOZ_NATIVE_NSPR
2013-12-06 13:08:52 +00:00
i f d e f M O Z _ S H A R E D _ I C U
2014-01-03 13:00:37 +00:00
i f e q ( $( OS_TARGET ) , W I N N T )
2013-12-06 13:08:52 +00:00
JSSHELL_BINS += \
2014-05-30 00:37:24 +00:00
$( DIST) /bin/icudt$( MOZ_ICU_DBG_SUFFIX) $( MOZ_ICU_VERSION) .dll \
$( DIST) /bin/icuin$( MOZ_ICU_DBG_SUFFIX) $( MOZ_ICU_VERSION) .dll \
$( DIST) /bin/icuuc$( MOZ_ICU_DBG_SUFFIX) $( MOZ_ICU_VERSION) .dll \
2013-12-06 13:08:52 +00:00
$( NULL)
e l s e
2014-01-03 13:00:37 +00:00
i f e q ( $( OS_TARGET ) , D a r w i n )
2013-12-06 13:08:52 +00:00
JSSHELL_BINS += \
$( DIST) /bin/libicudata.$( MOZ_ICU_VERSION) .dylib \
$( DIST) /bin/libicui18n.$( MOZ_ICU_VERSION) .dylib \
$( DIST) /bin/libicuuc.$( MOZ_ICU_VERSION) .dylib \
$( NULL)
e l s e
JSSHELL_BINS += \
$( DIST) /bin/libicudata.so.$( MOZ_ICU_VERSION) \
$( DIST) /bin/libicui18n.so.$( MOZ_ICU_VERSION) \
$( DIST) /bin/libicuuc.so.$( MOZ_ICU_VERSION) \
$( NULL)
2014-01-03 13:00:37 +00:00
e n d i f # Darwin
e n d i f # WINNT
2013-12-06 13:08:52 +00:00
e n d i f # MOZ_STATIC_JS
2014-08-13 15:46:26 +00:00
MAKE_JSSHELL = $( PYTHON) $( MOZILLA_DIR) /toolkit/mozapps/installer/dozip.py $( PKG_JSSHELL) $( abspath $( JSSHELL_BINS) )
2011-06-26 15:24:59 +00:00
e n d i f # LIBXUL_SDK
2011-06-09 18:03:00 +00:00
2013-10-16 22:55:16 +00:00
_ABS_DIST = $( abspath $( DIST) )
JARLOG_DIR = $( abspath $( DEPTH) /jarlog/)
2013-02-19 10:02:12 +00:00
JARLOG_FILE_AB_CD = $( JARLOG_DIR) /$( AB_CD) .log
2009-11-26 05:05:00 +00:00
2012-10-05 17:46:13 +00:00
TAR_CREATE_FLAGS := --exclude= .mkdir.done $( TAR_CREATE_FLAGS)
2006-03-27 17:52:05 +00:00
CREATE_FINAL_TAR = $( TAR) -c --owner= 0 --group= 0 --numeric-owner \
2013-12-02 21:34:21 +00:00
--mode= go-w --exclude= .mkdir.done -f
2009-05-15 23:14:15 +00:00
UNPACK_TAR = tar -xf-
2004-11-30 22:54:13 +00:00
i f e q ( $( MOZ_PKG_FORMAT ) , T A R )
PKG_SUFFIX = .tar
2010-08-13 04:33:52 +00:00
INNER_MAKE_PACKAGE = $( CREATE_FINAL_TAR) - $( MOZ_PKG_DIR) > $( PACKAGE)
INNER_UNMAKE_PACKAGE = $( UNPACK_TAR) < $( UNPACKAGE)
2007-08-09 19:53:08 +00:00
MAKE_SDK = $( CREATE_FINAL_TAR) - $( MOZ_APP_NAME) -sdk > $( SDK)
2004-11-30 22:54:13 +00:00
e n d i f
i f e q ( $( MOZ_PKG_FORMAT ) , T G Z )
PKG_SUFFIX = .tar.gz
2010-08-13 04:33:52 +00:00
INNER_MAKE_PACKAGE = $( CREATE_FINAL_TAR) - $( MOZ_PKG_DIR) | gzip -vf9 > $( PACKAGE)
INNER_UNMAKE_PACKAGE = gunzip -c $( UNPACKAGE) | $( UNPACK_TAR)
2007-08-09 19:53:08 +00:00
MAKE_SDK = $( CREATE_FINAL_TAR) - $( MOZ_APP_NAME) -sdk | gzip -vf9 > $( SDK)
2004-11-30 22:54:13 +00:00
e n d i f
i f e q ( $( MOZ_PKG_FORMAT ) , B Z 2 )
PKG_SUFFIX = .tar.bz2
2012-04-05 17:01:17 +00:00
i f e q ( c o c o a , $( MOZ_WIDGET_TOOLKIT ) )
INNER_MAKE_PACKAGE = $( CREATE_FINAL_TAR) - -C $( STAGEPATH) $( MOZ_PKG_DIR) $( _APPNAME) | bzip2 -vf > $( PACKAGE)
e l s e
2010-08-13 04:33:52 +00:00
INNER_MAKE_PACKAGE = $( CREATE_FINAL_TAR) - $( MOZ_PKG_DIR) | bzip2 -vf > $( PACKAGE)
2012-04-05 17:01:17 +00:00
e n d i f
2010-08-13 04:33:52 +00:00
INNER_UNMAKE_PACKAGE = bunzip2 -c $( UNPACKAGE) | $( UNPACK_TAR)
2007-08-09 19:53:08 +00:00
MAKE_SDK = $( CREATE_FINAL_TAR) - $( MOZ_APP_NAME) -sdk | bzip2 -vf > $( SDK)
2004-11-30 22:54:13 +00:00
e n d i f
i f e q ( $( MOZ_PKG_FORMAT ) , Z I P )
2011-12-07 22:06:52 +00:00
i f d e f M O Z _ E X T E R N A L _ S I G N I N G _ F O R M A T
# We can't use signcode on zip files
MOZ_EXTERNAL_SIGNING_FORMAT := $( filter-out signcode,$( MOZ_EXTERNAL_SIGNING_FORMAT) )
e n d i f
2004-11-30 22:54:13 +00:00
PKG_SUFFIX = .zip
2012-08-10 15:29:58 +00:00
INNER_MAKE_PACKAGE = $( ZIP) -r9D $( PACKAGE) $( MOZ_PKG_DIR) \
-x \* /.mkdir.done
2010-08-13 04:33:52 +00:00
INNER_UNMAKE_PACKAGE = $( UNZIP) $( UNPACKAGE)
2007-08-11 20:29:48 +00:00
MAKE_SDK = $( ZIP) -r9D $( SDK) $( MOZ_APP_NAME) -sdk
2009-02-04 03:00:06 +00:00
e n d i f
2010-08-13 04:36:16 +00:00
i f e q ( $( MOZ_PKG_FORMAT ) , S F X 7 Z )
PKG_SUFFIX = .exe
2010-08-13 06:03:24 +00:00
INNER_MAKE_PACKAGE = rm -f app.7z && \
2010-08-13 04:36:16 +00:00
mv $( MOZ_PKG_DIR) core && \
2013-06-05 07:33:38 +00:00
$( CYGWIN_WRAPPER) 7z a -r -t7z app.7z -mx -m0= BCJ2 -m1= LZMA:d25 \
2010-08-13 04:36:16 +00:00
-m2= LZMA:d19 -m3= LZMA:d19 -mb0:1 -mb0s1:2 -mb0s2:3 && \
mv core $( MOZ_PKG_DIR) && \
cat $( SFX_HEADER) app.7z > $( PACKAGE) && \
chmod 0755 $( PACKAGE)
2011-04-11 16:23:26 +00:00
INNER_UNMAKE_PACKAGE = $( CYGWIN_WRAPPER) 7z x $( UNPACKAGE) core && \
2010-08-13 04:36:16 +00:00
mv core $( MOZ_PKG_DIR)
e n d i f
2011-03-30 17:22:36 +00:00
#Create an RPM file
i f e q ( $( MOZ_PKG_FORMAT ) , R P M )
PKG_SUFFIX = .rpm
2013-12-02 21:34:21 +00:00
MOZ_NUMERIC_APP_VERSION = $( shell echo $( MOZ_PKG_VERSION) | sed 's/[^0-9.].*//' )
MOZ_RPM_RELEASE = $( shell echo $( MOZ_PKG_VERSION) | sed 's/[0-9.]*//' )
2011-03-30 17:22:36 +00:00
RPMBUILD_TOPDIR = $( _ABS_DIST) /rpmbuild
RPMBUILD_RPMDIR = $( _ABS_DIST)
RPMBUILD_SRPMDIR = $( _ABS_DIST)
RPMBUILD_SOURCEDIR = $( RPMBUILD_TOPDIR) /SOURCES
RPMBUILD_SPECDIR = $( topsrcdir) /toolkit/mozapps/installer/linux/rpm
RPMBUILD_BUILDDIR = $( _ABS_DIST) /..
SPEC_FILE = $( RPMBUILD_SPECDIR) /mozilla.spec
RPM_INCIDENTALS = $( topsrcdir) /toolkit/mozapps/installer/linux/rpm
RPM_CMD = \
echo Creating RPM && \
2013-11-09 01:35:44 +00:00
$( PYTHON) -m mozbuild.action.preprocessor \
2011-06-28 11:55:56 +00:00
-DMOZ_APP_NAME= $( MOZ_APP_NAME) \
2013-12-02 21:34:21 +00:00
-DMOZ_APP_DISPLAYNAME= '$(MOZ_APP_DISPLAYNAME)' \
2013-11-09 01:35:44 +00:00
$( RPM_INCIDENTALS) /mozilla.desktop \
-o $( RPMBUILD_SOURCEDIR) /$( MOZ_APP_NAME) .desktop && \
2011-03-30 17:22:36 +00:00
rm -rf $( _ABS_DIST) /$( TARGET_CPU) && \
$( RPMBUILD) -bb \
$( SPEC_FILE) \
--target $( TARGET_CPU) \
--buildroot $( RPMBUILD_TOPDIR) /BUILDROOT \
2013-12-02 21:34:21 +00:00
--define 'moz_app_name $(MOZ_APP_NAME)' \
--define 'moz_app_displayname $(MOZ_APP_DISPLAYNAME)' \
--define 'moz_app_version $(MOZ_APP_VERSION)' \
--define 'moz_numeric_app_version $(MOZ_NUMERIC_APP_VERSION)' \
--define 'moz_rpm_release $(MOZ_RPM_RELEASE)' \
--define 'buildid $(BUILDID)' \
2014-08-08 01:29:39 +00:00
$( if $( MOZ_SOURCE_REPO) ,--define 'moz_source_repo $(MOZ_SOURCE_REPO)' ) \
2013-12-02 21:34:21 +00:00
--define 'moz_source_stamp $(MOZ_SOURCE_STAMP)' \
--define 'moz_branding_directory $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)' \
--define '_topdir $(RPMBUILD_TOPDIR)' \
--define '_rpmdir $(RPMBUILD_RPMDIR)' \
--define '_sourcedir $(RPMBUILD_SOURCEDIR)' \
--define '_specdir $(RPMBUILD_SPECDIR)' \
--define '_srcrpmdir $(RPMBUILD_SRPMDIR)' \
--define '_builddir $(RPMBUILD_BUILDDIR)' \
--define '_prefix $(prefix)' \
--define '_libdir $(libdir)' \
--define '_bindir $(bindir)' \
--define '_datadir $(datadir)' \
--define '_installdir $(installdir)'
2011-03-30 17:22:36 +00:00
i f d e f E N A B L E _ T E S T S
RPM_CMD += \
2013-12-02 21:34:21 +00:00
--define 'createtests yes' \
--define '_testsinstalldir $(shell basename $(installdir))'
2011-03-30 17:22:36 +00:00
e n d i f
i f d e f I N S T A L L _ S D K
RPM_CMD += \
2013-12-02 21:34:21 +00:00
--define 'createdevel yes' \
--define '_idldir $(idldir)' \
--define '_sdkdir $(sdkdir)' \
--define '_includedir $(includedir)'
2011-03-30 17:22:36 +00:00
e n d i f
#For each of the main, tests, sdk rpms we want to make sure that
#if they exist that they are in objdir/dist/ and that they get
#uploaded and that they are beside the other build artifacts
MAIN_RPM = $( MOZ_APP_NAME) -$( MOZ_NUMERIC_APP_VERSION) -$( MOZ_RPM_RELEASE) .$( BUILDID) .$( TARGET_CPU) $( PKG_SUFFIX)
UPLOAD_EXTRA_FILES += $( MAIN_RPM)
RPM_CMD += && mv $( TARGET_CPU) /$( MAIN_RPM) $( _ABS_DIST) /
i f d e f E N A B L E _ T E S T S
TESTS_RPM = $( MOZ_APP_NAME) -tests-$( MOZ_NUMERIC_APP_VERSION) -$( MOZ_RPM_RELEASE) .$( BUILDID) .$( TARGET_CPU) $( PKG_SUFFIX)
UPLOAD_EXTRA_FILES += $( TESTS_RPM)
RPM_CMD += && mv $( TARGET_CPU) /$( TESTS_RPM) $( _ABS_DIST) /
e n d i f
i f d e f I N S T A L L _ S D K
SDK_RPM = $( MOZ_APP_NAME) -devel-$( MOZ_NUMERIC_APP_VERSION) -$( MOZ_RPM_RELEASE) .$( BUILDID) .$( TARGET_CPU) $( PKG_SUFFIX)
UPLOAD_EXTRA_FILES += $( SDK_RPM)
RPM_CMD += && mv $( TARGET_CPU) /$( SDK_RPM) $( _ABS_DIST) /
e n d i f
INNER_MAKE_PACKAGE = $( RPM_CMD)
#Avoiding rpm repacks, going to try creating/uploading xpi in rpm files instead
INNER_UNMAKE_PACKAGE = $( error Try using rpm2cpio and cpio)
e n d i f #Create an RPM file
2010-10-12 19:30:41 +00:00
i f e q ( $( MOZ_PKG_FORMAT ) , A P K )
JAVA_CLASSPATH = $( ANDROID_SDK) /android.jar
2012-09-19 01:35:03 +00:00
i n c l u d e $( MOZILLA_DIR ) / c o n f i g / a n d r o i d - c o m m o n . m k
2010-10-12 19:30:41 +00:00
2013-06-20 18:50:28 +00:00
# DEBUG_JARSIGNER is defined by android-common.mk and always debug
# signs. We want to release sign if possible.
2012-11-15 20:31:05 +00:00
i f d e f M O Z _ S I G N _ C M D
2013-06-20 18:50:28 +00:00
RELEASE_JARSIGNER := $( MOZ_SIGN_CMD) -f jar
2012-11-15 20:31:05 +00:00
e l s e
2013-06-20 18:50:28 +00:00
RELEASE_JARSIGNER := $( DEBUG_JARSIGNER)
2012-11-15 20:31:05 +00:00
e n d i f
2010-10-12 19:30:41 +00:00
2012-01-11 10:11:02 +00:00
DIST_FILES =
# Place the files in the order they are going to be opened by the linker
2013-04-08 06:33:38 +00:00
DIST_FILES += libmozalloc.so
i f n d e f M O Z _ F O L D _ L I B S
2012-01-11 10:11:02 +00:00
DIST_FILES += \
2011-09-21 16:06:14 +00:00
libnspr4.so \
libplc4.so \
libplds4.so \
libmozsqlite3.so \
libnssutil3.so \
2013-04-08 06:33:38 +00:00
$( NULL)
e n d i f
DIST_FILES += libnss3.so
i f n d e f M O Z _ F O L D _ L I B S
DIST_FILES += \
2011-09-21 16:06:14 +00:00
libssl3.so \
libsmime3.so \
2013-04-08 06:33:38 +00:00
$( NULL)
e n d i f
DIST_FILES += \
2011-09-21 16:06:14 +00:00
libxul.so \
libnssckbi.so \
libfreebl3.so \
libsoftokn3.so \
2012-01-11 10:11:02 +00:00
resources.arsc \
AndroidManifest.xml \
chrome \
components \
defaults \
modules \
hyphenation \
res \
lib \
2010-10-12 19:30:41 +00:00
extensions \
application.ini \
2011-11-18 01:15:29 +00:00
package-name.txt \
2010-10-12 19:30:41 +00:00
platform.ini \
greprefs.js \
browserconfig.properties \
blocklist.xml \
chrome.manifest \
update.locale \
2011-03-18 15:50:19 +00:00
removed-files \
2013-02-01 23:45:33 +00:00
distribution \
2010-10-12 19:30:41 +00:00
$( NULL)
NON_DIST_FILES = \
classes.dex \
$( NULL)
UPLOAD_EXTRA_FILES += gecko-unsigned-unaligned.apk
DIST_FILES += $( MOZ_CHILD_PROCESS_NAME)
2013-10-16 22:55:16 +00:00
GECKO_APP_AP_PATH = $( abspath $( DEPTH) /mobile/android/base)
2011-11-18 21:17:40 +00:00
2012-01-30 04:42:00 +00:00
i f d e f E N A B L E _ T E S T S
2012-01-29 00:19:44 +00:00
INNER_ROBOCOP_PACKAGE = echo
2013-10-01 19:43:31 +00:00
INNER_BACKGROUND_TESTS_PACKAGE = echo
2012-01-29 00:19:44 +00:00
i f e q ( $( MOZ_BUILD_APP ) , m o b i l e / a n d r o i d )
UPLOAD_EXTRA_FILES += robocop.apk
2012-02-14 18:51:59 +00:00
UPLOAD_EXTRA_FILES += fennec_ids.txt
2013-10-08 18:00:37 +00:00
UPLOAD_EXTRA_FILES += geckoview_library/geckoview_library.zip
UPLOAD_EXTRA_FILES += geckoview_library/geckoview_assets.zip
2014-03-31 15:40:06 +00:00
UPLOAD_EXTRA_FILES += ../embedding/android/geckoview_example/geckoview_example.apk
2013-10-01 19:43:31 +00:00
# Robocop/Robotium tests, Android Background tests, and Fennec need to
# be signed with the same key, which means release signing them all.
# $(1) is the full path to input: foo-debug-unsigned-unaligned.apk.
# $(2) is the full path to output: foo.apk.
RELEASE_SIGN_ANDROID_APK = \
cp $( 1) $( 2) -unaligned.apk && \
$( RELEASE_JARSIGNER) $( 2) -unaligned.apk && \
$( ZIPALIGN) -f -v 4 $( 2) -unaligned.apk $( 2) && \
$( RM) $( 2) -unaligned.apk
2013-10-16 22:55:16 +00:00
ROBOCOP_PATH = $( abspath $( _ABS_DIST) /../build/mobile/robocop)
2014-01-13 22:38:40 +00:00
# Normally, $(NSINSTALL) would be used instead of cp, but INNER_ROBOCOP_PACKAGE
# is used in a series of commands that run under a "cd something", while
# $(NSINSTALL) is relative.
2012-01-29 00:19:44 +00:00
INNER_ROBOCOP_PACKAGE = \
2014-01-13 22:38:40 +00:00
cp $( GECKO_APP_AP_PATH) /fennec_ids.txt $( _ABS_DIST) && \
2013-10-01 19:43:31 +00:00
$( call RELEASE_SIGN_ANDROID_APK,$( ROBOCOP_PATH) /robocop-debug-unsigned-unaligned.apk,$( _ABS_DIST) /robocop.apk)
2013-10-16 22:55:16 +00:00
BACKGROUND_TESTS_PATH = $( abspath $( _ABS_DIST) /../mobile/android/tests/background/junit3)
2013-10-01 19:43:31 +00:00
INNER_BACKGROUND_TESTS_PACKAGE = \
2014-02-25 02:24:45 +00:00
$( call RELEASE_SIGN_ANDROID_APK,$( BACKGROUND_TESTS_PATH) /background-junit3-debug-unsigned-unaligned.apk,$( _ABS_DIST) /background-junit3.apk)
2014-02-25 02:24:46 +00:00
BROWSER_TESTS_PATH = $( abspath $( _ABS_DIST) /../mobile/android/tests/browser/junit3)
INNER_BROWSER_TESTS_PACKAGE = \
$( call RELEASE_SIGN_ANDROID_APK,$( BROWSER_TESTS_PATH) /browser-junit3-debug-unsigned-unaligned.apk,$( _ABS_DIST) /browser-junit3.apk)
2012-01-29 00:19:44 +00:00
e n d i f
2012-01-30 04:42:00 +00:00
e l s e
2013-10-01 19:43:31 +00:00
INNER_ROBOCOP_PACKAGE = echo 'Testing is disabled - No Android Robocop for you'
2014-02-25 02:24:45 +00:00
INNER_BACKGROUND_TESTS_PACKAGE = echo 'Testing is disabled - No Android Background JUnit 3 tests for you'
2014-02-25 02:24:46 +00:00
INNER_BROWSER_TESTS_PACKAGE = echo 'Testing is disabled - No Android Browser JUnit 3tests for you'
2012-01-30 04:42:00 +00:00
e n d i f
2012-01-29 00:19:44 +00:00
2013-08-23 23:36:01 +00:00
# Create geckoview_library/geckoview_{assets,library}.zip for third-party GeckoView consumers.
2013-12-06 15:05:02 +00:00
i f d e f N I G H T L Y _ B U I L D
2013-09-05 04:26:26 +00:00
i f n d e f M O Z _ D I S A B L E _ G E C K O V I E W
2013-08-23 23:36:01 +00:00
INNER_MAKE_GECKOVIEW_LIBRARY = \
2014-02-05 16:51:48 +00:00
$( MAKE) -C ../mobile/android/geckoview_library package
2014-03-31 15:40:06 +00:00
INNER_MAKE_GECKOVIEW_EXAMPLE = \
$( MAKE) -C ../embedding/android/geckoview_example package
2013-09-05 04:26:26 +00:00
e l s e
INNER_MAKE_GECKOVIEW_LIBRARY = echo 'GeckoView library packaging is disabled'
2014-03-31 15:40:06 +00:00
INNER_MAKE_GECKOVIEW_EXAMPLE = echo 'GeckoView example packaging is disabled'
2013-09-05 04:26:26 +00:00
e n d i f
2013-12-10 06:07:43 +00:00
e l s e
INNER_MAKE_GECKOVIEW_LIBRARY = echo 'GeckoView library packaging is only enabled on Nightly'
2014-03-31 15:40:06 +00:00
INNER_MAKE_GECKOVIEW_EXAMPLE = echo 'GeckoView example packaging is only enabled on Nightly'
2013-12-06 15:05:02 +00:00
e n d i f
2013-08-23 23:36:01 +00:00
2012-08-10 08:15:12 +00:00
i f d e f M O Z _ O M X _ P L U G I N
2014-01-09 01:54:56 +00:00
DIST_FILES += libomxplugin.so libomxplugingb.so libomxplugingb235.so \
libomxpluginhc.so libomxpluginfroyo.so libomxpluginkk.so
2012-08-10 08:15:12 +00:00
e n d i f
2013-06-28 16:10:57 +00:00
SO_LIBRARIES := $( filter %.so,$( DIST_FILES) )
# These libraries are placed in the assets/ directory by packager.py.
ASSET_SO_LIBRARIES := $( addprefix assets/,$( filter-out libmozglue.so $( MOZ_CHILD_PROCESS_NAME) ,$( SO_LIBRARIES) ) )
2013-06-12 20:24:30 +00:00
DIST_FILES := $( filter-out $( SO_LIBRARIES) ,$( DIST_FILES) )
2013-06-28 16:10:57 +00:00
NON_DIST_FILES += libmozglue.so $( MOZ_CHILD_PROCESS_NAME) $( ASSET_SO_LIBRARIES)
2013-06-12 20:24:30 +00:00
2013-04-02 16:42:56 +00:00
i f d e f M O Z _ E N A B L E _ S Z I P
2013-06-28 16:10:57 +00:00
# These libraries are szipped in-place in the assets/ directory.
SZIP_LIBRARIES := $( ASSET_SO_LIBRARIES)
2013-04-02 16:42:56 +00:00
e n d i f
2013-07-02 19:00:34 +00:00
# Fennec's OMNIJAR_NAME can include a directory; for example, it might
# be "assets/omni.ja". This path specifies where the omni.ja file
# lives in the APK, but should not root the resources it contains
# under assets/ (i.e., resources should not live at chrome://assets/).
# packager.py writes /omni.ja in order to be consistent with the
# layout expected by language repacks. Therefore, we move it to the
# correct path here, in INNER_MAKE_PACKAGE. See comment about
# OMNIJAR_NAME in configure.in.
# OMNIJAR_DIR is './' for "omni.ja", 'assets/' for "assets/omni.ja".
OMNIJAR_DIR := $( dir $( OMNIJAR_NAME) )
OMNIJAR_NAME := $( notdir $( OMNIJAR_NAME) )
2013-12-12 05:20:07 +00:00
# We force build an ap_ that does not check dependencies below.
# Language repacks take advantage of this unchecked dependency ap_ to
# insert additional resources (translated strings) into the ap_
# without the build system's participation. This can do the wrong
# thing if there are resource changes in between build time and
# package time. We try to prevent mismatched resources by erroring
# out if the compiled resource IDs are not the same as the resource
2013-12-14 23:36:17 +00:00
# IDs being packaged. If we're doing a single locale repack, however,
# we don't have a complete object directory, so we can't compare
# resource IDs.
# A note on the res/ directory. We unzip the ap_ during packaging,
# which produces the res/ directory. This directory is then included
# in the final package. When we unpack (during locale repacks), we
# need to remove the res/ directory because these resources confuse
# the l10n packaging script that updates omni.ja: the script tries to
# localize the contents of the res/ directory, which fails. Instead,
# after the l10n packaging script completes, we build the ap_
# described above (which includes freshly localized Android resources)
# and the res/ directory is taken from the ap_ as part of the regular
# packaging.
2013-12-12 05:20:07 +00:00
2010-10-12 19:30:41 +00:00
PKG_SUFFIX = .apk
INNER_MAKE_PACKAGE = \
2013-05-23 05:27:20 +00:00
$( if $( ALREADY_SZIPPED) ,,$( foreach lib,$( SZIP_LIBRARIES) ,host/bin/szip $( MOZ_SZIP_FLAGS) $( STAGEPATH) $( MOZ_PKG_DIR) $( _BINPATH) /$( lib) && ) ) \
2013-12-12 05:20:07 +00:00
make -C $( GECKO_APP_AP_PATH) gecko-nodeps.ap_ && \
cp $( GECKO_APP_AP_PATH) /gecko-nodeps.ap_ $( _ABS_DIST) /gecko.ap_ && \
2013-12-14 23:36:17 +00:00
( ( test ! -f $( GECKO_APP_AP_PATH) /R.txt && echo "*** Warning: The R.txt that is being packaged might not agree with the R.txt that was built. This is normal during l10n repacks." ) || \
diff $( GECKO_APP_AP_PATH) /R.txt $( GECKO_APP_AP_PATH) /gecko-nodeps/R.txt >/dev/null || \
2013-12-12 05:20:07 +00:00
( echo "*** Error: The R.txt that was built and the R.txt that is being packaged are not the same. Rebuild mobile/android/base and re-package." && exit 1) ) && \
2010-10-12 19:30:41 +00:00
( cd $( STAGEPATH) $( MOZ_PKG_DIR) $( _BINPATH) && \
2010-12-22 21:14:50 +00:00
unzip -o $( _ABS_DIST) /gecko.ap_ && \
rm $( _ABS_DIST) /gecko.ap_ && \
2013-09-04 14:46:09 +00:00
$( ZIP) $( if $( MOZ_ENABLE_SZIP) ,-0 ) $( _ABS_DIST) /gecko.ap_ $( ASSET_SO_LIBRARIES) && \
2012-02-22 07:12:15 +00:00
$( ZIP) -r9D $( _ABS_DIST) /gecko.ap_ $( DIST_FILES) -x $( NON_DIST_FILES) $( SZIP_LIBRARIES) && \
2013-07-02 19:00:34 +00:00
$( if $( filter-out ./,$( OMNIJAR_DIR) ) , \
mkdir -p $( OMNIJAR_DIR) && mv $( OMNIJAR_NAME) $( OMNIJAR_DIR) && ) \
$( ZIP) -0 $( _ABS_DIST) /gecko.ap_ $( OMNIJAR_DIR) $( OMNIJAR_NAME) ) && \
2010-10-12 19:30:41 +00:00
rm -f $( _ABS_DIST) /gecko.apk && \
2013-06-20 18:50:28 +00:00
cp $( _ABS_DIST) /gecko.ap_ $( _ABS_DIST) /gecko.apk && \
$( ZIP) -j0 $( _ABS_DIST) /gecko.apk $( STAGEPATH) $( MOZ_PKG_DIR) $( _BINPATH) /classes.dex && \
2010-10-12 19:30:41 +00:00
cp $( _ABS_DIST) /gecko.apk $( _ABS_DIST) /gecko-unsigned-unaligned.apk && \
2013-06-20 18:50:28 +00:00
$( RELEASE_JARSIGNER) $( _ABS_DIST) /gecko.apk && \
2012-01-29 00:19:44 +00:00
$( ZIPALIGN) -f -v 4 $( _ABS_DIST) /gecko.apk $( PACKAGE) && \
2013-08-23 23:36:01 +00:00
$( INNER_ROBOCOP_PACKAGE) && \
2013-10-01 19:43:31 +00:00
$( INNER_BACKGROUND_TESTS_PACKAGE) && \
2014-02-25 02:24:46 +00:00
$( INNER_BROWSER_TESTS_PACKAGE) && \
2014-03-31 15:40:06 +00:00
$( INNER_MAKE_GECKOVIEW_LIBRARY) && \
$( INNER_MAKE_GECKOVIEW_EXAMPLE)
2011-12-31 15:03:36 +00:00
2013-07-02 19:00:34 +00:00
# Language repacks root the resources contained in assets/omni.ja
# under assets/, but the repacks expect them to be rooted at /.
# Therefore, we we move the omnijar back to / so the resources are
# under the root here, in INNER_UNMAKE_PACKAGE. See comments about
# OMNIJAR_NAME earlier in this file and in configure.in.
2010-10-12 19:30:41 +00:00
INNER_UNMAKE_PACKAGE = \
mkdir $( MOZ_PKG_DIR) && \
2013-05-23 05:27:20 +00:00
( cd $( MOZ_PKG_DIR) && \
2013-06-12 20:24:30 +00:00
$( UNZIP) $( UNPACKAGE) && \
2013-12-14 23:36:17 +00:00
rm -rf res \
2013-07-02 19:00:34 +00:00
$( if $( filter-out ./,$( OMNIJAR_DIR) ) , \
&& mv $( OMNIJAR_DIR) $( OMNIJAR_NAME) $( OMNIJAR_NAME) ) )
2010-10-12 19:30:41 +00:00
e n d i f
2012-11-30 02:38:03 +00:00
2004-11-30 22:54:13 +00:00
i f e q ( $( MOZ_PKG_FORMAT ) , D M G )
2005-01-24 19:49:50 +00:00
PKG_SUFFIX = .dmg
2005-08-18 13:11:46 +00:00
PKG_DMG_FLAGS =
i f n e q ( , $( MOZ_PKG_MAC_DSSTORE ) )
2013-12-02 21:34:21 +00:00
PKG_DMG_FLAGS += --copy '$(MOZ_PKG_MAC_DSSTORE):/.DS_Store'
2005-08-18 13:11:46 +00:00
e n d i f
i f n e q ( , $( MOZ_PKG_MAC_BACKGROUND ) )
2013-12-02 21:34:21 +00:00
PKG_DMG_FLAGS += --mkdir /.background --copy '$(MOZ_PKG_MAC_BACKGROUND):/.background'
2005-08-18 13:11:46 +00:00
e n d i f
i f n e q ( , $( MOZ_PKG_MAC_ICON ) )
2013-12-02 21:34:21 +00:00
PKG_DMG_FLAGS += --icon '$(MOZ_PKG_MAC_ICON)'
2005-08-18 13:11:46 +00:00
e n d i f
i f n e q ( , $( MOZ_PKG_MAC_RSRC ) )
2013-12-02 21:34:21 +00:00
PKG_DMG_FLAGS += --resource '$(MOZ_PKG_MAC_RSRC)'
2005-08-18 13:11:46 +00:00
e n d i f
i f n e q ( , $( MOZ_PKG_MAC_EXTRA ) )
PKG_DMG_FLAGS += $( MOZ_PKG_MAC_EXTRA)
e n d i f
2008-07-06 20:30:32 +00:00
_ABS_MOZSRCDIR = $( shell cd $( MOZILLA_DIR) && pwd )
2007-02-27 19:43:59 +00:00
i f n d e f P K G _ D M G _ S O U R C E
2008-12-05 17:00:33 +00:00
PKG_DMG_SOURCE = $( STAGEPATH) $( MOZ_PKG_DIR)
2007-02-27 19:43:59 +00:00
e n d i f
2010-08-13 04:33:52 +00:00
INNER_MAKE_PACKAGE = $( _ABS_MOZSRCDIR) /build/package/mac_osx/pkg-dmg \
2013-12-02 21:34:21 +00:00
--source '$(PKG_DMG_SOURCE)' --target '$(PACKAGE)' \
--volname '$(MOZ_APP_DISPLAYNAME)' $( PKG_DMG_FLAGS)
2010-08-13 04:33:52 +00:00
INNER_UNMAKE_PACKAGE = \
2005-08-26 13:36:32 +00:00
set -ex; \
2009-07-06 16:13:57 +00:00
rm -rf $( _ABS_DIST) /unpack.tmp; \
mkdir -p $( _ABS_DIST) /unpack.tmp; \
$( _ABS_MOZSRCDIR) /build/package/mac_osx/unpack-diskimage $( UNPACKAGE) /tmp/$( MOZ_PKG_APPNAME) -unpack $( _ABS_DIST) /unpack.tmp; \
2013-12-02 21:34:21 +00:00
rsync -a '$(_ABS_DIST)/unpack.tmp/$(_APPNAME)' $( MOZ_PKG_DIR) ; \
test -n '$(MOZ_PKG_MAC_DSSTORE)' && \
rsync -a '$(_ABS_DIST)/unpack.tmp/.DS_Store' '$(MOZ_PKG_MAC_DSSTORE)' ; \
test -n '$(MOZ_PKG_MAC_BACKGROUND)' && \
2013-12-05 23:45:30 +00:00
rsync -a '$(_ABS_DIST)/unpack.tmp/.background/$(notdir $(MOZ_PKG_MAC_BACKGROUND))' '$(MOZ_PKG_MAC_BACKGROUND)' ; \
2013-12-02 21:34:21 +00:00
test -n '$(MOZ_PKG_MAC_ICON)' && \
rsync -a '$(_ABS_DIST)/unpack.tmp/.VolumeIcon.icns' '$(MOZ_PKG_MAC_ICON)' ; \
2009-07-06 16:13:57 +00:00
rm -rf $( _ABS_DIST) /unpack.tmp; \
2013-12-02 21:34:21 +00:00
if test -n '$(MOZ_PKG_MAC_RSRC)' ; then \
2005-09-10 02:23:13 +00:00
cp $( UNPACKAGE) $( MOZ_PKG_APPNAME) .tmp.dmg && \
hdiutil unflatten $( MOZ_PKG_APPNAME) .tmp.dmg && \
2013-12-02 21:34:21 +00:00
{ /Developer/Tools/DeRez -skip plst -skip blkx $( MOZ_PKG_APPNAME) .tmp.dmg > '$(MOZ_PKG_MAC_RSRC)' || { rm -f $( MOZ_PKG_APPNAME) .tmp.dmg && false; } ; } && \
2005-09-10 02:23:13 +00:00
rm -f $( MOZ_PKG_APPNAME) .tmp.dmg; \
2010-08-18 19:56:46 +00:00
fi
2005-08-26 13:36:32 +00:00
# The plst and blkx resources are skipped because they belong to each
# individual dmg and are created by hdiutil.
2007-08-09 19:53:08 +00:00
SDK_SUFFIX = .tar.bz2
2008-04-10 14:50:48 +00:00
SDK = $( MOZ_PKG_APPNAME) -$( MOZ_PKG_VERSION) .$( AB_CD) .mac-$( TARGET_CPU) .sdk$( SDK_SUFFIX)
2010-02-12 10:54:24 +00:00
i f e q ( $( MOZ_APP_NAME ) , x u l r u n n e r )
2010-03-18 03:02:14 +00:00
SDK = $( SDK_PATH) $( MOZ_APP_NAME) -$( MOZ_PKG_VERSION) .$( AB_CD) .mac-$( TARGET_CPU) .sdk$( SDK_SUFFIX)
2010-02-12 10:54:24 +00:00
e n d i f
2007-08-09 19:53:08 +00:00
MAKE_SDK = $( CREATE_FINAL_TAR) - $( MOZ_APP_NAME) -sdk | bzip2 -vf > $( SDK)
2004-11-30 22:54:13 +00:00
e n d i f
2011-12-07 22:06:52 +00:00
i f d e f M O Z _ I N T E R N A L _ S I G N I N G _ F O R M A T
2012-11-14 07:47:06 +00:00
MOZ_SIGN_PREPARED_PACKAGE_CMD = $( MOZ_SIGN_CMD) $( foreach f,$( MOZ_INTERNAL_SIGNING_FORMAT) ,-f $( f) ) $( foreach i,$( SIGN_INCLUDES) ,-i $( i) ) $( foreach x,$( SIGN_EXCLUDES) ,-x $( x) )
i f e q ( W I N N T , $( OS_ARCH ) )
2013-12-02 21:34:21 +00:00
MOZ_SIGN_PREPARED_PACKAGE_CMD += --nsscmd '$(_ABS_DIST)/bin/shlibsign$(BIN_SUFFIX) -v -i'
2012-11-14 07:47:06 +00:00
e n d i f
2011-12-07 22:06:52 +00:00
e n d i f
# For final GPG / authenticode signing / dmg signing if required
i f d e f M O Z _ E X T E R N A L _ S I G N I N G _ F O R M A T
MOZ_SIGN_PACKAGE_CMD = $( MOZ_SIGN_CMD) $( foreach f,$( MOZ_EXTERNAL_SIGNING_FORMAT) ,-f $( f) )
e n d i f
i f d e f M O Z _ S I G N _ P R E P A R E D _ P A C K A G E _ C M D
2012-09-11 07:42:49 +00:00
i f e q ( D a r w i n , $( OS_ARCH ) )
MAKE_PACKAGE = cd ./$( PKG_DMG_SOURCE) && $( MOZ_SIGN_PREPARED_PACKAGE_CMD) $( MOZ_MACBUNDLE_NAME) \
2012-06-11 15:10:05 +00:00
&& rm $( MOZ_MACBUNDLE_NAME) /Contents/CodeResources \
&& cp $( MOZ_MACBUNDLE_NAME) /Contents/_CodeSignature/CodeResources $( MOZ_MACBUNDLE_NAME) /Contents \
&& cd $( PACKAGE_BASE_DIR) \
2012-05-25 13:25:07 +00:00
&& $( INNER_MAKE_PACKAGE)
e l s e
2012-09-11 07:42:49 +00:00
MAKE_PACKAGE = $( MOZ_SIGN_PREPARED_PACKAGE_CMD) \
2011-12-07 22:06:52 +00:00
$( MOZ_PKG_DIR) && $( INNER_MAKE_PACKAGE)
2012-05-25 13:25:07 +00:00
e n d i f #Darwin
2011-12-07 22:06:52 +00:00
e l s e
2012-09-11 07:42:49 +00:00
MAKE_PACKAGE = $( INNER_MAKE_PACKAGE)
2011-12-07 22:06:52 +00:00
e n d i f
i f d e f M O Z _ S I G N _ P A C K A G E _ C M D
2013-12-02 21:34:21 +00:00
MAKE_PACKAGE += && $( MOZ_SIGN_PACKAGE_CMD) '$(PACKAGE)'
2011-12-07 22:06:52 +00:00
e n d i f
2012-03-12 17:39:35 +00:00
i f d e f M O Z _ S I G N _ C M D
MAKE_SDK += && $( MOZ_SIGN_CMD) -f gpg $( SDK)
UPLOAD_EXTRA_FILES += $( SDK) .asc
e n d i f
2004-11-30 22:54:13 +00:00
NO_PKG_FILES += \
core \
bsdecho \
2009-02-07 21:50:21 +00:00
js \
Bug 97954: Allow SpiderMonkey to be built on its own, or as part of Mozilla.
Give SpiderMonkey its own configure script and top-level Makefile.
Adjust js/src/Makefile as appropriate for life as a stand-alone
makefile, instead of a 'make export; make libs'-style Mozilla tier
makefile. Have the configure script accept '--with-nspr-cflags' and
'--with-nspr-libs' options for using an in-tree NSPR. Also accept
'--with-system-nspr', '--with-nspr-prefix', and
'--with-nspr-exec-prefix' flags for using an installed NSPR. Default
to --disable-jemalloc, assuming we don't have that part of the tree
available; have the top-level configure script pass --enable-jemalloc
as needed.
Since we no longer have an export phase to copy header files into
dist/include/js before we build the library, we need to be able to
find nanojit.h in the nanojit directory; fix references in
jsbuiltins.h and jstracer.cpp.
Give SpiderMonkey it its own copies of many of the files from ./config
and ./build. These are all exact copies, except as follows:
. js/src/config/Makefile.in: js/src only has a subset of
js/src/config, and thus a subset of the makefile targets.
. js/src/config/autoconf.mk.in: js/src/configure.in has its own make
variables to set, not set by the top-level configure script, so it
needs a custom automake.mk template.
. js/src/config/make-system-wrappers.pl: a copy from nsprpub/config,
so that we can build without having an NSPR source tree handy.
Invoke js/src/configure from ./configure, passing the values computed
for NSPR_CFLAGS and NSPR_LIBS by the top-level configure script.
Treat js/src as a static directory of the js tier, and create a new
config/js (just a Makefile) to be the js tier's non-static directory.
Let js/src/configure generate SpiderMonkey's makefiles, not
./configure.
Generate a 'js-config' script, which clients can call to find the
CFLAGS and LIBS values necessary to compile and link against an
installed SpiderMonkey library. Don't include the js-config script in
Macintosh packages.
Teach client.mk how to rebuild js/src/configure.
Tell Mercurial to ignore files generated by autoconf in js/src.
Further work:
. Right now, callers must define JS_THREADSAFE when #including jsapi.h.
This is fixed in a subsequent patch.
. js/src/configure is a trimmed copy of ./configure. It could be
trimmed more.
--HG--
rename : build/autoconf/acoutput-fast.pl => js/src/build/autoconf/acoutput-fast.pl
rename : build/autoconf/altoptions.m4 => js/src/build/autoconf/altoptions.m4
rename : build/autoconf/config.guess => js/src/build/autoconf/config.guess
rename : build/autoconf/config.sub => js/src/build/autoconf/config.sub
rename : build/autoconf/glib.m4 => js/src/build/autoconf/glib.m4
rename : build/autoconf/install-sh => js/src/build/autoconf/install-sh
rename : build/autoconf/make-makefile => js/src/build/autoconf/make-makefile
rename : build/autoconf/match-dir.sh => js/src/build/autoconf/match-dir.sh
rename : build/autoconf/nspr.m4 => js/src/build/autoconf/nspr.m4
rename : build/autoconf/pkg.m4 => js/src/build/autoconf/pkg.m4
rename : build/autoconf/update-makefile.sh => js/src/build/autoconf/update-makefile.sh
rename : build/cygwin-wrapper => js/src/build/cygwin-wrapper
rename : build/hcc => js/src/build/hcc
rename : build/hcpp => js/src/build/hcpp
rename : build/unix/mddepend.pl => js/src/build/unix/mddepend.pl
rename : build/unix/uniq.pl => js/src/build/unix/uniq.pl
rename : config/Makefile.in => js/src/config/Makefile.in
rename : config/Moz/Milestone.pm => js/src/config/Moz/Milestone.pm
rename : config/autoconf.mk.in => js/src/config/autoconf.mk.in
rename : config/config.mk => js/src/config/config.mk
rename : config/elf-dynstr-gc.c => js/src/config/elf-dynstr-gc.c
rename : config/fastcwd.pl => js/src/config/fastcwd.pl
rename : config/gcc_hidden.h => js/src/config/gcc_hidden.h
rename : config/insure.mk => js/src/config/insure.mk
rename : nsprpub/config/make-system-wrappers.pl => js/src/config/make-system-wrappers.pl
rename : config/milestone.pl => js/src/config/milestone.pl
rename : config/milestone.txt => js/src/config/milestone.txt
rename : config/mkdepend/Makefile.in => js/src/config/mkdepend/Makefile.in
rename : config/mkdepend/cppsetup.c => js/src/config/mkdepend/cppsetup.c
rename : config/mkdepend/def.h => js/src/config/mkdepend/def.h
rename : config/mkdepend/ifparser.c => js/src/config/mkdepend/ifparser.c
rename : config/mkdepend/ifparser.h => js/src/config/mkdepend/ifparser.h
rename : config/mkdepend/imakemdep.h => js/src/config/mkdepend/imakemdep.h
rename : config/mkdepend/include.c => js/src/config/mkdepend/include.c
rename : config/mkdepend/main.c => js/src/config/mkdepend/main.c
rename : config/mkdepend/mkdepend.man => js/src/config/mkdepend/mkdepend.man
rename : config/mkdepend/parse.c => js/src/config/mkdepend/parse.c
rename : config/mkdepend/pr.c => js/src/config/mkdepend/pr.c
rename : config/nfspwd.pl => js/src/config/nfspwd.pl
rename : config/nsinstall.c => js/src/config/nsinstall.c
rename : config/nsinstall.py => js/src/config/nsinstall.py
rename : config/pathsub.c => js/src/config/pathsub.c
rename : config/pathsub.h => js/src/config/pathsub.h
rename : config/preprocessor.pl => js/src/config/preprocessor.pl
rename : config/revdepth-nt.pl => js/src/config/revdepth-nt.pl
rename : config/revdepth.pl => js/src/config/revdepth.pl
rename : config/rules.mk => js/src/config/rules.mk
rename : config/system-headers => js/src/config/system-headers
rename : config/version.mk => js/src/config/version.mk
rename : config/version_win.pl => js/src/config/version_win.pl
rename : configure.in => js/src/configure.in
2008-10-29 15:29:22 +00:00
js-config \
2004-11-30 22:54:13 +00:00
jscpucfg \
nsinstall \
viewer \
TestGtkEmbed \
elf-dynstr-gc \
mangle* \
maptsv* \
mfc* \
msdump* \
msmap* \
nm2tsv* \
nsinstall* \
res/samples \
res/throbber \
shlibsign* \
2008-09-05 13:35:58 +00:00
certutil* \
pk12util* \
2014-02-13 22:53:29 +00:00
BadCertServer* \
2014-08-07 20:32:00 +00:00
ClientAuthServer* \
2013-06-20 18:41:41 +00:00
OCSPStaplingServer* \
2013-10-29 21:02:35 +00:00
GenerateOCSPResponse* \
2004-11-30 22:54:13 +00:00
winEmbed.exe \
chrome/chrome.rdf \
2005-02-23 21:46:11 +00:00
chrome/app-chrome.manifest \
2005-07-26 16:46:57 +00:00
chrome/overlayinfo \
components/compreg.dat \
components/xpti.dat \
2006-06-29 18:27:49 +00:00
content_unit_tests \
necko_unit_tests \
2008-12-08 21:09:52 +00:00
*.dSYM \
2004-11-30 22:54:13 +00:00
$( NULL)
2014-07-03 08:46:00 +00:00
# If a manifest has not been supplied, the following
# files should be excluded from the package too
i f n d e f M O Z _ P K G _ M A N I F E S T
NO_PKG_FILES += \
ssltunnel*
e n d i f
2008-10-02 06:49:45 +00:00
# browser/locales/Makefile uses this makefile for its variable defs, but
2005-04-20 23:10:56 +00:00
# doesn't want the libs:: rule.
i f n d e f P A C K A G E R _ N O _ L I B S
2006-08-18 20:34:56 +00:00
libs :: make -package
2005-04-20 23:10:56 +00:00
e n d i f
2004-11-30 22:54:13 +00:00
2009-06-27 05:31:39 +00:00
DEFINES += -DDLL_PREFIX= $( DLL_PREFIX) -DDLL_SUFFIX= $( DLL_SUFFIX) -DBIN_SUFFIX= $( BIN_SUFFIX)
2005-09-15 18:09:56 +00:00
2013-03-17 06:53:39 +00:00
i f d e f M O Z _ F O L D _ L I B S
DEFINES += -DMOZ_FOLD_LIBS= 1
e n d i f
2004-11-30 22:54:13 +00:00
GARBAGE += $( DIST) /$( PACKAGE) $( PACKAGE)
2010-08-13 04:36:16 +00:00
# The following target stages files into two directories: one directory for
# core files, and one for optional extensions based on the information in
2013-08-22 06:55:59 +00:00
# the MOZ_PKG_MANIFEST file.
2006-05-04 15:43:31 +00:00
2013-12-02 21:34:21 +00:00
PKG_ARG = , '$(pkg)'
2006-05-04 15:43:31 +00:00
2012-09-11 07:42:49 +00:00
installer-stage : prepare -package
2006-05-04 15:43:31 +00:00
i f n d e f M O Z _ P K G _ M A N I F E S T
$( error MOZ_PKG_MANIFEST unspecified!)
e n d i f
@rm -rf $( DEPTH) /installer-stage $( DIST) /xpt
2013-12-02 21:34:21 +00:00
@echo 'Staging installer files...'
2010-08-13 04:36:16 +00:00
@$( NSINSTALL) -D $( DEPTH) /installer-stage/core
@cp -av $( DIST) /$( STAGEPATH) $( MOZ_PKG_DIR) $( _BINPATH) /. $( DEPTH) /installer-stage/core
2011-04-13 00:27:41 +00:00
@( cd $( DEPTH) /installer-stage/core && $( CREATE_PRECOMPLETE_CMD) )
2011-12-07 22:06:52 +00:00
i f d e f M O Z _ S I G N _ P R E P A R E D _ P A C K A G E _ C M D
2012-08-30 00:17:07 +00:00
# The && true is necessary to make sure Pymake spins a shell
$( MOZ_SIGN_PREPARED_PACKAGE_CMD) $( DEPTH) /installer-stage && true
2011-12-07 22:06:52 +00:00
e n d i f
2006-05-04 15:43:31 +00:00
2013-01-02 09:17:32 +00:00
i f e q ( g o n k , $( MOZ_WIDGET_TOOLKIT ) )
ELF_HACK_FLAGS = --fill
e n d i f
2013-01-23 10:23:15 +00:00
# MOZ_PKG_MANIFEST is the canonical way to define the package manifest (which
# the packager will preprocess), but for a smooth transition, we derive it
# from the now deprecated MOZ_PKG_MANIFEST_P when MOZ_PKG_MANIFEST is not
# defined.
i f n d e f M O Z _ P K G _ M A N I F E S T
i f d e f M O Z _ P K G _ M A N I F E S T _ P
MOZ_PKG_MANIFEST := $( MOZ_PKG_MANIFEST_P)
e n d i f # MOZ_PKG_MANIFEST_P
e n d i f # MOZ_PKG_MANIFEST
# For smooth transition of comm-central
i f n d e f M O Z _ P A C K A G E R _ F O R M A T
i f e q ( $( MOZ_CHROME_FILE_FORMAT ) , f l a t )
i f d e f M O Z _ O M N I J A R
MOZ_PACKAGER_FORMAT := omni
2008-03-05 21:30:28 +00:00
e l s e
2013-01-23 10:23:15 +00:00
MOZ_PACKAGER_FORMAT := flat
2008-03-05 21:30:28 +00:00
e n d i f
2013-01-23 10:23:15 +00:00
e n d i f
e n d i f
i f n d e f M O Z _ P A C K A G E R _ F O R M A T
2013-01-23 19:17:07 +00:00
MOZ_PACKAGER_FORMAT = $( error MOZ_PACKAGER_FORMAT is not set )
2013-01-23 10:23:15 +00:00
e n d i f
i f n e q ( a n d r o i d , $( MOZ_WIDGET_TOOLKIT ) )
OPTIMIZEJARS = 1
e n d i f
2013-02-26 07:13:30 +00:00
export NO_PKG_FILES USE_ELF_HACK ELF_HACK_FLAGS
2013-09-12 02:54:19 +00:00
# A js binary is needed to perform verification of JavaScript minification.
# We can only use the built binary when not cross-compiling. Environments
# (such as release automation) can provide their own js binary to enable
# verification when cross-compiling.
i f n d e f J S _ B I N A R Y
i f n d e f C R O S S _ C O M P I L E
JS_BINARY = $( wildcard $( DIST) /bin/js)
e n d i f
e n d i f
2013-07-02 19:00:34 +00:00
# Override the value of OMNIJAR_NAME from config.status with the value
# set earlier in this file.
2013-01-23 10:23:15 +00:00
stage-package : $( MOZ_PKG_MANIFEST )
@rm -rf $( DIST) /$( PKG_PATH) $( PKG_BASENAME) .tar $( DIST) /$( PKG_PATH) $( PKG_BASENAME) .dmg $@ $( EXCLUDE_LIST)
2013-07-02 19:00:34 +00:00
OMNIJAR_NAME = $( OMNIJAR_NAME) \
2013-01-23 10:23:15 +00:00
$( PYTHON) $( MOZILLA_DIR) /toolkit/mozapps/installer/packager.py $( DEFINES) \
--format $( MOZ_PACKAGER_FORMAT) \
$( addprefix --removals ,$( MOZ_PKG_REMOVALS) ) \
$( if $( filter-out 0,$( MOZ_PKG_FATAL_WARNINGS) ) ,,--ignore-errors) \
$( if $( MOZ_PACKAGER_MINIFY) ,--minify) \
2013-09-12 02:54:19 +00:00
$( if $( MOZ_PACKAGER_MINIFY_JS) ,--minify-js \
$( addprefix --js-binary ,$( JS_BINARY) ) \
) \
2013-02-19 10:02:12 +00:00
$( if $( JARLOG_DIR) ,$( addprefix --jarlog ,$( wildcard $( JARLOG_FILE_AB_CD) ) ) ) \
2013-01-23 10:23:15 +00:00
$( if $( OPTIMIZEJARS) ,--optimizejars) \
$( addprefix --unify ,$( UNIFY_DIST) ) \
2013-02-26 07:13:30 +00:00
$( MOZ_PKG_MANIFEST) $( DIST) $( DIST) /$( STAGEPATH) $( MOZ_PKG_DIR) $( if $( MOZ_PKG_MANIFEST) ,,$( _BINPATH) ) \
2013-01-24 23:38:47 +00:00
$( if $( filter omni,$( MOZ_PACKAGER_FORMAT) ) ,$( if $( NON_OMNIJAR_FILES) ,--non-resource $( NON_OMNIJAR_FILES) ) )
2013-02-26 07:13:30 +00:00
$( PYTHON) $( MOZILLA_DIR) /toolkit/mozapps/installer/find-dupes.py $( DIST) /$( STAGEPATH) $( MOZ_PKG_DIR)
2011-06-26 15:24:59 +00:00
i f n d e f L I B X U L _ S D K
2012-03-12 12:23:16 +00:00
i f d e f M O Z _ P A C K A G E _ J S S H E L L
2011-06-09 18:03:00 +00:00
# Package JavaScript Shell
2013-12-02 21:34:21 +00:00
@echo 'Packaging JavaScript Shell...'
2011-06-11 12:02:00 +00:00
$( RM) $( PKG_JSSHELL)
2011-06-09 18:03:00 +00:00
$( MAKE_JSSHELL)
2012-03-12 12:23:16 +00:00
e n d i f # MOZ_PACKAGE_JSSHELL
2011-06-26 15:24:59 +00:00
e n d i f # LIBXUL_SDK
2014-08-27 17:32:42 +00:00
i f d e f M O Z _ C O D E _ C O V E R A G E
# Package code coverage gcno tree
@echo 'Packaging code coverage data...'
$( RM) $( CODE_COVERAGE_ARCHIVE_BASENAME) .zip
$( PYTHON) -mmozbuild.codecoverage.packager \
--output-file= '$(DIST)/$(PKG_PATH)$(CODE_COVERAGE_ARCHIVE_BASENAME).zip'
e n d i f
2014-09-01 12:34:23 +00:00
i f e q ( D a r w i n , $( OS_ARCH ) )
i f d e f M O Z _ A S A N
@echo " Rewriting ASan runtime dylib paths for all binaries in $( DIST) / $( STAGEPATH) $( MOZ_PKG_DIR) $( _BINPATH) ... "
$( PYTHON) $( MOZILLA_DIR) /build/unix/rewrite_asan_dylib.py $( DIST) /$( STAGEPATH) $( MOZ_PKG_DIR) $( _BINPATH)
e n d i f # MOZ_ASAN
e n d i f # Darwin
2006-08-18 20:34:56 +00:00
2012-09-11 07:42:49 +00:00
prepare-package : stage -package
2013-02-16 00:16:02 +00:00
make-package-internal : prepare -package make -sourcestamp -file make -buildinfo -file
2013-12-02 21:34:21 +00:00
@echo 'Compressing...'
2007-08-03 14:46:17 +00:00
cd $( DIST) && $( MAKE_PACKAGE)
2011-01-27 03:17:24 +00:00
2013-01-23 10:23:15 +00:00
make-package : FORCE
2012-05-15 22:06:52 +00:00
$( MAKE) make-package-internal
$( TOUCH) $@
GARBAGE += make-package
2011-01-27 03:17:24 +00:00
make-sourcestamp-file ::
2011-02-02 18:25:00 +00:00
$( NSINSTALL) -D $( DIST) /$( PKG_PATH)
2013-12-02 21:34:21 +00:00
@echo '$(BUILDID)' > $( MOZ_SOURCESTAMP_FILE)
2014-08-08 01:29:39 +00:00
i f d e f M O Z _ S O U R C E _ R E P O
2013-12-02 21:34:21 +00:00
@echo '$(MOZ_SOURCE_REPO)/rev/$(MOZ_SOURCE_STAMP)' >> $( MOZ_SOURCESTAMP_FILE)
2014-08-08 01:29:39 +00:00
e n d i f
2007-08-03 14:46:17 +00:00
2013-02-16 00:16:02 +00:00
.PHONY : make -buildinfo -file
make-buildinfo-file :
$( PYTHON) $( MOZILLA_DIR) /toolkit/mozapps/installer/informulate.py \
$( MOZ_BUILDINFO_FILE) \
BUILDID = $( BUILDID) \
2014-08-08 01:29:39 +00:00
$( addprefix MOZ_SOURCE_REPO = ,MOZ_SOURCE_REPO= $( MOZ_SOURCE_REPO) ) \
2013-02-16 00:16:02 +00:00
MOZ_SOURCE_STAMP = $( MOZ_SOURCE_STAMP) \
MOZ_PKG_PLATFORM = $( MOZ_PKG_PLATFORM)
2007-08-03 14:46:17 +00:00
# The install target will install the application to prefix/lib/appname-version
# In addition if INSTALL_SDK is set, it will install the development headers,
# libraries, and IDL files as follows:
2009-05-18 18:15:05 +00:00
# dist/include -> prefix/include/appname-version
# dist/idl -> prefix/share/idl/appname-version
2007-08-03 14:46:17 +00:00
# dist/sdk/lib -> prefix/lib/appname-devel-version/lib
# prefix/lib/appname-devel-version/* symlinks to the above directories
2012-09-11 07:42:49 +00:00
install :: prepare -package
2011-04-29 10:38:26 +00:00
i f e q ( $( OS_ARCH ) , W I N N T )
2009-04-25 08:53:02 +00:00
$( error "make install" is not supported on this platform. Use "make package" instead.)
e n d i f
i f e q ( b u n d l e , $( MOZ_FS_LAYOUT ) )
2008-04-09 05:26:00 +00:00
$( error "make install" is not supported on this platform. Use "make package" instead.)
2007-08-03 14:46:17 +00:00
e n d i f
$( NSINSTALL) -D $( DESTDIR) $( installdir)
2012-11-29 13:17:54 +00:00
( cd $( DIST) /$( MOZ_PKG_DIR) && $( TAR) --exclude= precomplete $( TAR_CREATE_FLAGS) - .) | \
2007-08-03 14:46:17 +00:00
( cd $( DESTDIR) $( installdir) && tar -xf -)
$( NSINSTALL) -D $( DESTDIR) $( bindir)
$( RM) -f $( DESTDIR) $( bindir) /$( MOZ_APP_NAME)
ln -s $( installdir) /$( MOZ_APP_NAME) $( DESTDIR) $( bindir)
i f d e f I N S T A L L _ S D K # Here comes the hard part
2009-05-18 18:15:05 +00:00
$( NSINSTALL) -D $( DESTDIR) $( includedir)
2012-11-29 13:17:54 +00:00
( cd $( DIST) /include && $( TAR) $( TAR_CREATE_FLAGS) - .) | \
2009-05-18 18:15:05 +00:00
( cd $( DESTDIR) $( includedir) && tar -xf -)
$( NSINSTALL) -D $( DESTDIR) $( idldir)
2012-11-29 13:17:54 +00:00
( cd $( DIST) /idl && $( TAR) $( TAR_CREATE_FLAGS) - .) | \
2009-05-18 18:15:05 +00:00
( cd $( DESTDIR) $( idldir) && tar -xf -)
2007-08-03 14:46:17 +00:00
# SDK directory is the libs + a bunch of symlinks
$( NSINSTALL) -D $( DESTDIR) $( sdkdir) /sdk/lib
2011-05-26 06:13:23 +00:00
$( NSINSTALL) -D $( DESTDIR) $( sdkdir) /sdk/bin
2009-05-18 18:15:05 +00:00
if test -f $( DIST) /include/xpcom-config.h; then \
$( SYSINSTALL) $( IFLAGS1) $( DIST) /include/xpcom-config.h $( DESTDIR) $( sdkdir) ; \
2007-08-03 14:46:17 +00:00
fi
2013-12-02 21:34:21 +00:00
find $( DIST) /sdk -name '*.pyc' | xargs rm -f
2012-11-29 13:17:54 +00:00
( cd $( DIST) /sdk/lib && $( TAR) $( TAR_CREATE_FLAGS) - .) | ( cd $( DESTDIR) $( sdkdir) /sdk/lib && tar -xf -)
( cd $( DIST) /sdk/bin && $( TAR) $( TAR_CREATE_FLAGS) - .) | ( cd $( DESTDIR) $( sdkdir) /sdk/bin && tar -xf -)
2009-05-18 18:15:05 +00:00
$( RM) -f $( DESTDIR) $( sdkdir) /lib $( DESTDIR) $( sdkdir) /bin $( DESTDIR) $( sdkdir) /include $( DESTDIR) $( sdkdir) /include $( DESTDIR) $( sdkdir) /sdk/idl $( DESTDIR) $( sdkdir) /idl
2007-08-03 14:46:17 +00:00
ln -s $( sdkdir) /sdk/lib $( DESTDIR) $( sdkdir) /lib
ln -s $( installdir) $( DESTDIR) $( sdkdir) /bin
2009-05-18 18:15:05 +00:00
ln -s $( includedir) $( DESTDIR) $( sdkdir) /include
ln -s $( idldir) $( DESTDIR) $( sdkdir) /idl
2007-08-03 14:46:17 +00:00
e n d i f # INSTALL_SDK
2007-08-09 19:53:08 +00:00
2008-03-05 21:30:28 +00:00
make-sdk :
2008-12-05 17:00:33 +00:00
$( MAKE) stage-package UNIVERSAL_BINARY = STAGE_SDK = 1 MOZ_PKG_DIR = sdk-stage
2013-12-02 21:34:21 +00:00
@echo 'Packaging SDK...'
2007-08-09 19:53:08 +00:00
$( RM) -rf $( DIST) /$( MOZ_APP_NAME) -sdk
$( NSINSTALL) -D $( DIST) /$( MOZ_APP_NAME) -sdk/bin
2012-11-29 13:17:54 +00:00
( cd $( DIST) /sdk-stage && $( TAR) $( TAR_CREATE_FLAGS) - .) | \
2007-08-09 19:53:08 +00:00
( cd $( DIST) /$( MOZ_APP_NAME) -sdk/bin && tar -xf -)
2008-04-10 14:50:48 +00:00
$( NSINSTALL) -D $( DIST) /$( MOZ_APP_NAME) -sdk/host/bin
2012-11-29 13:17:54 +00:00
( cd $( DIST) /host/bin && $( TAR) $( TAR_CREATE_FLAGS) - .) | \
2008-04-10 14:50:48 +00:00
( cd $( DIST) /$( MOZ_APP_NAME) -sdk/host/bin && tar -xf -)
2007-08-09 19:53:08 +00:00
$( NSINSTALL) -D $( DIST) /$( MOZ_APP_NAME) -sdk/sdk
2013-12-02 21:34:21 +00:00
find $( DIST) /sdk -name '*.pyc' | xargs rm -f
2012-11-29 13:17:54 +00:00
( cd $( DIST) /sdk && $( TAR) $( TAR_CREATE_FLAGS) - .) | \
2007-08-09 19:53:08 +00:00
( cd $( DIST) /$( MOZ_APP_NAME) -sdk/sdk && tar -xf -)
$( NSINSTALL) -D $( DIST) /$( MOZ_APP_NAME) -sdk/include
2012-11-29 13:17:54 +00:00
( cd $( DIST) /include && $( TAR) $( TAR_CREATE_FLAGS) - .) | \
2007-08-09 19:53:08 +00:00
( cd $( DIST) /$( MOZ_APP_NAME) -sdk/include && tar -xf -)
$( NSINSTALL) -D $( DIST) /$( MOZ_APP_NAME) -sdk/idl
2012-11-29 13:17:54 +00:00
( cd $( DIST) /idl && $( TAR) $( TAR_CREATE_FLAGS) - .) | \
2007-08-09 19:53:08 +00:00
( cd $( DIST) /$( MOZ_APP_NAME) -sdk/idl && tar -xf -)
$( NSINSTALL) -D $( DIST) /$( MOZ_APP_NAME) -sdk/lib
# sdk/lib is the same as sdk/sdk/lib
2012-11-29 13:17:54 +00:00
( cd $( DIST) /sdk/lib && $( TAR) $( TAR_CREATE_FLAGS) - .) | \
2007-08-09 19:53:08 +00:00
( cd $( DIST) /$( MOZ_APP_NAME) -sdk/lib && tar -xf -)
2010-02-12 10:54:24 +00:00
$( NSINSTALL) -D $( DIST) /$( SDK_PATH)
2013-03-04 08:23:09 +00:00
i f n d e f P K G _ S K I P _ S T R I P
2013-03-05 07:09:14 +00:00
USE_ELF_HACK = $( PYTHON) $( MOZILLA_DIR) /toolkit/mozapps/installer/strip.py $( DIST) /$( MOZ_APP_NAME) -sdk
2013-03-04 08:23:09 +00:00
e n d i f
2007-08-09 19:53:08 +00:00
cd $( DIST) && $( MAKE_SDK)
2008-11-12 12:45:23 +00:00
2008-11-13 15:37:04 +00:00
i f e q ( $( OS_TARGET ) , W I N N T )
INSTALLER_PACKAGE = $( DIST) /$( PKG_INST_PATH) $( PKG_INST_BASENAME) .exe
e n d i f
2008-12-29 16:11:27 +00:00
# These are necessary because some of our packages/installers contain spaces
# in their filenames and GNU Make's $(wildcard) function doesn't properly
# deal with them.
empty :=
space = $( empty) $( empty)
2013-12-02 21:34:21 +00:00
QUOTED_WILDCARD = $( if $( wildcard $( subst $( space) ,?,$( 1) ) ) ,'$(1)' )
2011-03-18 17:29:56 +00:00
ESCAPE_SPACE = $( subst $( space) ,\$ ( space) ,$( 1) )
2012-08-07 19:08:48 +00:00
ESCAPE_WILDCARD = $( subst $( space) ,?,$( 1) )
2008-12-29 16:11:27 +00:00
2010-10-15 23:09:53 +00:00
# This variable defines which OpenSSL algorithm to use to
# generate checksums for files that we upload
2012-01-16 14:30:59 +00:00
CHECKSUM_ALGORITHM_PARAM = -d sha512 -d md5 -d sha1
2010-10-15 23:09:53 +00:00
# This variable defines where the checksum file will be located
2013-12-02 21:34:21 +00:00
CHECKSUM_FILE = '$(DIST)/$(PKG_PATH)/$(CHECKSUMS_FILE_BASENAME).checksums'
2011-12-07 22:06:52 +00:00
CHECKSUM_FILES = $( CHECKSUM_FILE)
2010-10-15 23:09:53 +00:00
2013-02-13 23:50:18 +00:00
i f e q ( W I N N T , $( OS_TARGET ) )
UPLOAD_EXTRA_FILES += host/bin/mar.exe
UPLOAD_EXTRA_FILES += host/bin/mbsdiff.exe
e l s e
UPLOAD_EXTRA_FILES += host/bin/mar
UPLOAD_EXTRA_FILES += host/bin/mbsdiff
e n d i f
2010-10-15 23:09:53 +00:00
UPLOAD_FILES = \
$( call QUOTED_WILDCARD,$( DIST) /$( PACKAGE) ) \
$( call QUOTED_WILDCARD,$( INSTALLER_PACKAGE) ) \
$( call QUOTED_WILDCARD,$( DIST) /$( COMPLETE_MAR) ) \
2010-12-28 17:41:36 +00:00
$( call QUOTED_WILDCARD,$( DIST) /$( LANGPACK) ) \
2010-10-15 23:09:53 +00:00
$( call QUOTED_WILDCARD,$( wildcard $( DIST) /$( PARTIAL_MAR) ) ) \
$( call QUOTED_WILDCARD,$( DIST) /$( PKG_PATH) $( TEST_PACKAGE) ) \
$( call QUOTED_WILDCARD,$( DIST) /$( PKG_PATH) $( SYMBOL_ARCHIVE_BASENAME) .zip) \
$( call QUOTED_WILDCARD,$( DIST) /$( SDK) ) \
2011-01-27 03:17:24 +00:00
$( call QUOTED_WILDCARD,$( MOZ_SOURCESTAMP_FILE) ) \
2013-02-16 00:16:02 +00:00
$( call QUOTED_WILDCARD,$( MOZ_BUILDINFO_FILE) ) \
2011-06-11 12:02:00 +00:00
$( call QUOTED_WILDCARD,$( PKG_JSSHELL) ) \
2010-10-15 23:09:53 +00:00
$( if $( UPLOAD_EXTRA_FILES) , $( foreach f, $( UPLOAD_EXTRA_FILES) , $( wildcard $( DIST) /$( f) ) ) )
2013-04-25 19:16:24 +00:00
i f d e f M O Z _ C R A S H R E P O R T E R _ U P L O A D _ F U L L _ S Y M B O L S
UPLOAD_FILES += \
$( call QUOTED_WILDCARD,$( DIST) /$( PKG_PATH) $( SYMBOL_FULL_ARCHIVE_BASENAME) .zip)
e n d i f
2014-08-27 17:32:42 +00:00
i f d e f M O Z _ C O D E _ C O V E R A G E
UPLOAD_FILES += \
$( call QUOTED_WILDCARD,$( DIST) /$( PKG_PATH) $( CODE_COVERAGE_ARCHIVE_BASENAME) .zip)
e n d i f
2011-12-07 22:06:52 +00:00
SIGN_CHECKSUM_CMD =
i f d e f M O Z _ S I G N _ C M D
# If we're signing with gpg, we'll have a bunch of extra detached signatures to
# upload. We also want to sign our checksums file
SIGN_CHECKSUM_CMD = $( MOZ_SIGN_CMD) -f gpg $( CHECKSUM_FILE)
CHECKSUM_FILES += $( CHECKSUM_FILE) .asc
UPLOAD_FILES += $( call QUOTED_WILDCARD,$( DIST) /$( COMPLETE_MAR) .asc)
UPLOAD_FILES += $( call QUOTED_WILDCARD,$( wildcard $( DIST) /$( PARTIAL_MAR) .asc) )
UPLOAD_FILES += $( call QUOTED_WILDCARD,$( INSTALLER_PACKAGE) .asc)
2012-04-05 18:18:45 +00:00
UPLOAD_FILES += $( call QUOTED_WILDCARD,$( DIST) /$( PACKAGE) .asc)
2011-12-07 22:06:52 +00:00
e n d i f
2012-10-01 18:17:31 +00:00
i f d e f M O Z _ S T U B _ I N S T A L L E R
2012-11-14 20:30:29 +00:00
UPLOAD_FILES += $( call QUOTED_WILDCARD,$( DIST) /$( PKG_INST_PATH) $( PKG_STUB_BASENAME) .exe)
2012-10-01 18:17:31 +00:00
e n d i f
2010-10-15 23:09:53 +00:00
checksum :
2011-06-29 15:47:52 +00:00
mkdir -p ` dirname $( CHECKSUM_FILE) `
2010-10-15 23:09:53 +00:00
@$( PYTHON) $( MOZILLA_DIR) /build/checksums.py \
-o $( CHECKSUM_FILE) \
2012-01-16 14:30:59 +00:00
$( CHECKSUM_ALGORITHM_PARAM) \
2010-10-15 23:09:53 +00:00
-s $( call QUOTED_WILDCARD,$( DIST) ) \
$( UPLOAD_FILES)
2013-12-02 21:34:21 +00:00
@echo 'CHECKSUM FILE START'
2010-10-15 23:09:53 +00:00
@cat $( CHECKSUM_FILE)
2013-12-02 21:34:21 +00:00
@echo 'CHECKSUM FILE END'
2011-12-07 22:06:52 +00:00
$( SIGN_CHECKSUM_CMD)
2010-10-15 23:09:53 +00:00
upload : checksum
2009-05-11 15:11:50 +00:00
$( PYTHON) $( MOZILLA_DIR) /build/upload.py --base-path $( DIST) \
2010-10-15 23:09:53 +00:00
$( UPLOAD_FILES) \
2011-12-07 22:06:52 +00:00
$( CHECKSUM_FILES)
2008-11-13 15:37:04 +00:00
2008-11-12 12:45:23 +00:00
i f n d e f M O Z _ P K G _ S R C D I R
MOZ_PKG_SRCDIR = $( topsrcdir)
e n d i f
2011-03-23 19:01:28 +00:00
DIR_TO_BE_PACKAGED ?= ../$( notdir $( topsrcdir) )
SRC_TAR_EXCLUDE_PATHS += \
2013-12-02 21:34:21 +00:00
--exclude= '.hg*' \
--exclude= 'CVS' \
--exclude= '.cvs*' \
--exclude= '.mozconfig*' \
--exclude= '*.pyc' \
--exclude= '$(MOZILLA_DIR)/Makefile' \
--exclude= '$(MOZILLA_DIR)/dist'
2011-03-23 19:01:28 +00:00
i f d e f M O Z _ O B J D I R
2013-12-02 21:34:21 +00:00
SRC_TAR_EXCLUDE_PATHS += --exclude= '$(MOZ_OBJDIR)'
2011-03-23 19:01:28 +00:00
e n d i f
2008-11-12 12:45:23 +00:00
CREATE_SOURCE_TAR = $( TAR) -c --owner= 0 --group= 0 --numeric-owner \
2013-12-02 21:34:21 +00:00
--mode= go-w $( SRC_TAR_EXCLUDE_PATHS) -f
2008-11-12 12:45:23 +00:00
2012-03-12 21:48:40 +00:00
SOURCE_TAR = $( DIST) /$( PKG_SRCPACK_PATH) $( PKG_SRCPACK_BASENAME) .tar.bz2
HG_BUNDLE_FILE = $( DIST) /$( PKG_SRCPACK_PATH) $( PKG_BUNDLE_BASENAME) .bundle
SOURCE_CHECKSUM_FILE = $( DIST) /$( PKG_SRCPACK_PATH) $( PKG_SRCPACK_BASENAME) .checksums
SOURCE_UPLOAD_FILES = $( SOURCE_TAR)
HG ?= hg
CREATE_HG_BUNDLE_CMD = $( HG) -v -R $( topsrcdir) bundle --base null
i f d e f H G _ B U N D L E _ R E V I S I O N
CREATE_HG_BUNDLE_CMD += -r $( HG_BUNDLE_REVISION)
e n d i f
CREATE_HG_BUNDLE_CMD += $( HG_BUNDLE_FILE)
i f d e f U P L O A D _ H G _ B U N D L E
SOURCE_UPLOAD_FILES += $( HG_BUNDLE_FILE)
e n d i f
i f d e f M O Z _ S I G N _ C M D
SIGN_SOURCE_TAR_CMD = $( MOZ_SIGN_CMD) -f gpg $( SOURCE_TAR)
SOURCE_UPLOAD_FILES += $( SOURCE_TAR) .asc
SIGN_HG_BUNDLE_CMD = $( MOZ_SIGN_CMD) -f gpg $( HG_BUNDLE_FILE)
i f d e f U P L O A D _ H G _ B U N D L E
SOURCE_UPLOAD_FILES += $( HG_BUNDLE_FILE) .asc
e n d i f
e n d i f
2008-11-12 12:45:23 +00:00
# source-package creates a source tarball from the files in MOZ_PKG_SRCDIR,
# which is either set to a clean checkout or defaults to $topsrcdir
source-package :
2013-12-02 21:34:21 +00:00
@echo 'Packaging source tarball...'
2012-03-12 21:48:40 +00:00
$( MKDIR) -p $( DIST) /$( PKG_SRCPACK_PATH)
( cd $( MOZ_PKG_SRCDIR) && $( CREATE_SOURCE_TAR) - $( DIR_TO_BE_PACKAGED) ) | bzip2 -vf > $( SOURCE_TAR)
$( SIGN_SOURCE_TAR_CMD)
hg-bundle :
$( MKDIR) -p $( DIST) /$( PKG_SRCPACK_PATH)
$( CREATE_HG_BUNDLE_CMD)
$( SIGN_HG_BUNDLE_CMD)
2012-04-12 16:11:40 +00:00
source-upload :
2013-12-02 21:34:21 +00:00
$( MAKE) upload UPLOAD_FILES = '$(SOURCE_UPLOAD_FILES)' CHECKSUM_FILE = '$(SOURCE_CHECKSUM_FILE)'