2004-12-01 01:54:13 +03:00
|
|
|
# ***** BEGIN LICENSE BLOCK *****
|
|
|
|
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
|
|
#
|
|
|
|
# The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
# 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
# the License. You may obtain a copy of the License at
|
|
|
|
# http://www.mozilla.org/MPL/
|
|
|
|
#
|
|
|
|
# Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
# for the specific language governing rights and limitations under the
|
|
|
|
# License.
|
|
|
|
#
|
|
|
|
# The Original Code is Mozilla Communicator client code, released
|
|
|
|
# March 31, 1998.
|
|
|
|
#
|
|
|
|
# The Initial Developer of the Original Code is
|
|
|
|
# Netscape Communications Corporation.
|
|
|
|
# Portions created by the Initial Developer are Copyright (C) 1998
|
|
|
|
# the Initial Developer. All Rights Reserved.
|
|
|
|
#
|
|
|
|
# Contributor(s):
|
|
|
|
# Benjamin Smedberg <bsmedberg@covad.net>
|
2005-01-24 22:49:50 +03:00
|
|
|
# Arthur Wiebe <artooro@gmail.com>
|
2005-08-18 17:11:46 +04:00
|
|
|
# Mark Mentovai <mark@moxienet.com>
|
2011-04-12 08:23:18 +04:00
|
|
|
# Robert Strong <robert.bugzilla@gmail.com>
|
2004-12-01 01:54:13 +03:00
|
|
|
#
|
|
|
|
# Alternatively, the contents of this file may be used under the terms of
|
|
|
|
# either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
|
|
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
# in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
# of those above. If you wish to allow use of your version of this file only
|
|
|
|
# under the terms of either the GPL or the LGPL, and not to allow others to
|
|
|
|
# use your version of this file under the terms of the MPL, indicate your
|
|
|
|
# decision by deleting the provisions above and replace them with the notice
|
|
|
|
# and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
# the provisions above, a recipient may use your version of this file under
|
|
|
|
# the terms of any one of the MPL, the GPL or the LGPL.
|
|
|
|
#
|
|
|
|
# ***** END LICENSE BLOCK *****
|
|
|
|
|
2008-07-07 00:30:32 +04:00
|
|
|
include $(MOZILLA_DIR)/toolkit/mozapps/installer/package-name.mk
|
2004-12-01 01:54:13 +03:00
|
|
|
|
2009-09-16 02:11:42 +04:00
|
|
|
# This is how we create the binary packages we release to the public.
|
2004-12-01 01:54:13 +03:00
|
|
|
|
|
|
|
ifndef MOZ_PKG_FORMAT
|
2009-09-19 06:59:53 +04:00
|
|
|
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
2004-12-01 01:54:13 +03:00
|
|
|
MOZ_PKG_FORMAT = DMG
|
|
|
|
else
|
2011-04-29 14:38:26 +04:00
|
|
|
ifeq (,$(filter-out OS2 WINNT, $(OS_ARCH)))
|
2004-12-01 01:54:13 +03:00
|
|
|
MOZ_PKG_FORMAT = ZIP
|
2009-09-16 02:11:42 +04:00
|
|
|
else
|
|
|
|
ifeq (,$(filter-out SunOS, $(OS_ARCH)))
|
|
|
|
MOZ_PKG_FORMAT = BZ2
|
|
|
|
else
|
2010-06-26 08:02:18 +04:00
|
|
|
ifeq (,$(filter-out gtk2 qt, $(MOZ_WIDGET_TOOLKIT)))
|
2009-09-16 02:11:42 +04:00
|
|
|
MOZ_PKG_FORMAT = BZ2
|
|
|
|
else
|
2010-10-12 23:30:41 +04:00
|
|
|
ifeq (Android,$(OS_TARGET))
|
|
|
|
MOZ_PKG_FORMAT = APK
|
|
|
|
else
|
|
|
|
MOZ_PKG_FORMAT = TGZ
|
|
|
|
endif
|
2009-09-16 02:11:42 +04:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif # MOZ_PKG_FORMAT
|
|
|
|
|
2011-04-29 14:38:26 +04:00
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
2004-12-01 01:54:13 +03:00
|
|
|
INSTALLER_DIR = windows
|
2009-09-16 02:11:42 +04:00
|
|
|
endif
|
2004-12-01 01:54:13 +03:00
|
|
|
|
2008-09-18 00:53:09 +04:00
|
|
|
PACKAGE = $(PKG_PATH)$(PKG_BASENAME)$(PKG_SUFFIX)
|
2004-12-01 01:54:13 +03:00
|
|
|
|
2007-08-09 23:53:08 +04: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 13:54:24 +03:00
|
|
|
SDK_PATH = $(PKG_PATH)
|
|
|
|
ifeq ($(MOZ_APP_NAME),xulrunner)
|
|
|
|
SDK_PATH = sdk/
|
|
|
|
endif
|
2007-08-09 23:53:08 +04:00
|
|
|
SDK_SUFFIX = $(PKG_SUFFIX)
|
2010-02-12 13:54:24 +03:00
|
|
|
SDK = $(SDK_PATH)$(PKG_BASENAME).sdk$(SDK_SUFFIX)
|
2007-08-09 23:53:08 +04:00
|
|
|
|
2004-12-01 01:54:13 +03:00
|
|
|
MAKE_PACKAGE = $(error What is a $(MOZ_PKG_FORMAT) package format?);
|
2010-09-10 20:30:07 +04:00
|
|
|
_ABS_DIST = $(call core_abspath,$(DIST))
|
2011-05-17 22:06:16 +04:00
|
|
|
JARLOG_DIR = $(call core_abspath,$(DEPTH)/jarlog/)
|
2009-11-26 08:05:00 +03:00
|
|
|
|
2006-03-27 21:52:05 +04:00
|
|
|
CREATE_FINAL_TAR = $(TAR) -c --owner=0 --group=0 --numeric-owner \
|
|
|
|
--mode="go-w" -f
|
2009-05-16 03:14:15 +04:00
|
|
|
UNPACK_TAR = tar -xf-
|
2004-12-01 01:54:13 +03:00
|
|
|
|
|
|
|
ifeq ($(MOZ_PKG_FORMAT),TAR)
|
|
|
|
PKG_SUFFIX = .tar
|
2010-08-13 08:33:52 +04:00
|
|
|
INNER_MAKE_PACKAGE = $(CREATE_FINAL_TAR) - $(MOZ_PKG_DIR) > $(PACKAGE)
|
|
|
|
INNER_UNMAKE_PACKAGE = $(UNPACK_TAR) < $(UNPACKAGE)
|
2007-08-09 23:53:08 +04:00
|
|
|
MAKE_SDK = $(CREATE_FINAL_TAR) - $(MOZ_APP_NAME)-sdk > $(SDK)
|
2004-12-01 01:54:13 +03:00
|
|
|
endif
|
|
|
|
ifeq ($(MOZ_PKG_FORMAT),TGZ)
|
|
|
|
PKG_SUFFIX = .tar.gz
|
2010-08-13 08:33:52 +04:00
|
|
|
INNER_MAKE_PACKAGE = $(CREATE_FINAL_TAR) - $(MOZ_PKG_DIR) | gzip -vf9 > $(PACKAGE)
|
|
|
|
INNER_UNMAKE_PACKAGE = gunzip -c $(UNPACKAGE) | $(UNPACK_TAR)
|
2007-08-09 23:53:08 +04:00
|
|
|
MAKE_SDK = $(CREATE_FINAL_TAR) - $(MOZ_APP_NAME)-sdk | gzip -vf9 > $(SDK)
|
2004-12-01 01:54:13 +03:00
|
|
|
endif
|
|
|
|
ifeq ($(MOZ_PKG_FORMAT),BZ2)
|
|
|
|
PKG_SUFFIX = .tar.bz2
|
2010-08-13 08:33:52 +04:00
|
|
|
INNER_MAKE_PACKAGE = $(CREATE_FINAL_TAR) - $(MOZ_PKG_DIR) | bzip2 -vf > $(PACKAGE)
|
|
|
|
INNER_UNMAKE_PACKAGE = bunzip2 -c $(UNPACKAGE) | $(UNPACK_TAR)
|
2007-08-09 23:53:08 +04:00
|
|
|
MAKE_SDK = $(CREATE_FINAL_TAR) - $(MOZ_APP_NAME)-sdk | bzip2 -vf > $(SDK)
|
2004-12-01 01:54:13 +03:00
|
|
|
endif
|
|
|
|
ifeq ($(MOZ_PKG_FORMAT),ZIP)
|
|
|
|
PKG_SUFFIX = .zip
|
2010-08-13 08:33:52 +04:00
|
|
|
INNER_MAKE_PACKAGE = $(ZIP) -r9D $(PACKAGE) $(MOZ_PKG_DIR)
|
|
|
|
INNER_UNMAKE_PACKAGE = $(UNZIP) $(UNPACKAGE)
|
2007-08-12 00:29:48 +04:00
|
|
|
MAKE_SDK = $(ZIP) -r9D $(SDK) $(MOZ_APP_NAME)-sdk
|
2009-02-04 06:00:06 +03:00
|
|
|
endif
|
2010-08-13 08:36:16 +04:00
|
|
|
ifeq ($(MOZ_PKG_FORMAT),SFX7Z)
|
|
|
|
PKG_SUFFIX = .exe
|
2010-08-13 10:03:24 +04:00
|
|
|
INNER_MAKE_PACKAGE = rm -f app.7z && \
|
2010-08-13 08:36:16 +04:00
|
|
|
mv $(MOZ_PKG_DIR) core && \
|
|
|
|
$(CYGWIN_WRAPPER) 7z a -r -t7z app.7z -mx -m0=BCJ2 -m1=LZMA:d24 \
|
|
|
|
-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 20:23:26 +04:00
|
|
|
INNER_UNMAKE_PACKAGE = $(CYGWIN_WRAPPER) 7z x $(UNPACKAGE) core && \
|
2010-08-13 08:36:16 +04:00
|
|
|
mv core $(MOZ_PKG_DIR)
|
|
|
|
endif
|
2011-03-30 21:22:36 +04:00
|
|
|
|
|
|
|
#Create an RPM file
|
|
|
|
ifeq ($(MOZ_PKG_FORMAT),RPM)
|
|
|
|
PKG_SUFFIX = .rpm
|
|
|
|
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.]*//" )
|
|
|
|
|
|
|
|
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 && \
|
|
|
|
mkdir -p $(RPMBUILD_SOURCEDIR) && \
|
|
|
|
$(PYTHON) $(topsrcdir)/config/Preprocessor.py \
|
|
|
|
-DMOZ_APP_NAME=$(MOZ_APP_NAME) \
|
|
|
|
-DMOZ_APP_DISPLAYNAME=$(MOZ_APP_DISPLAYNAME) \
|
|
|
|
< $(RPM_INCIDENTALS)/mozilla.desktop \
|
|
|
|
> $(RPMBUILD_SOURCEDIR)/$(MOZ_APP_NAME).desktop && \
|
|
|
|
rm -rf $(_ABS_DIST)/$(TARGET_CPU) && \
|
|
|
|
$(RPMBUILD) -bb \
|
|
|
|
$(SPEC_FILE) \
|
|
|
|
--target $(TARGET_CPU) \
|
|
|
|
--buildroot $(RPMBUILD_TOPDIR)/BUILDROOT \
|
|
|
|
--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)" \
|
|
|
|
--define "moz_source_repo $(MOZ_SOURCE_REPO)" \
|
|
|
|
--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)"
|
|
|
|
|
|
|
|
ifdef ENABLE_TESTS
|
|
|
|
RPM_CMD += \
|
|
|
|
--define "createtests yes" \
|
|
|
|
--define "_testsinstalldir $(shell basename $(installdir))"
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef INSTALL_SDK
|
|
|
|
RPM_CMD += \
|
|
|
|
--define "createdevel yes" \
|
|
|
|
--define "_idldir $(idldir)" \
|
|
|
|
--define "_sdkdir $(sdkdir)" \
|
|
|
|
--define "_includedir $(includedir)"
|
|
|
|
endif
|
|
|
|
|
|
|
|
#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)/
|
|
|
|
|
|
|
|
ifdef ENABLE_TESTS
|
|
|
|
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)/
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef INSTALL_SDK
|
|
|
|
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)/
|
|
|
|
endif
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
|
|
|
endif #Create an RPM file
|
|
|
|
|
|
|
|
|
2010-10-12 23:30:41 +04:00
|
|
|
ifeq ($(MOZ_PKG_FORMAT),APK)
|
|
|
|
|
|
|
|
# we have custom stuff for Android
|
|
|
|
MOZ_OMNIJAR =
|
|
|
|
|
|
|
|
JAVA_CLASSPATH = $(ANDROID_SDK)/android.jar
|
|
|
|
include $(topsrcdir)/config/android-common.mk
|
|
|
|
|
|
|
|
JARSIGNER ?= echo
|
|
|
|
|
|
|
|
DIST_FILES = \
|
|
|
|
resources.arsc \
|
|
|
|
AndroidManifest.xml \
|
|
|
|
chrome \
|
|
|
|
components \
|
|
|
|
defaults \
|
|
|
|
modules \
|
2011-05-05 19:03:01 +04:00
|
|
|
hyphenation \
|
2010-10-12 23:30:41 +04:00
|
|
|
res \
|
|
|
|
lib \
|
2010-10-21 04:44:03 +04:00
|
|
|
lib.id \
|
2010-10-12 23:30:41 +04:00
|
|
|
extensions \
|
|
|
|
application.ini \
|
|
|
|
platform.ini \
|
|
|
|
greprefs.js \
|
|
|
|
browserconfig.properties \
|
|
|
|
blocklist.xml \
|
|
|
|
chrome.manifest \
|
|
|
|
update.locale \
|
2011-03-18 18:50:19 +03:00
|
|
|
removed-files \
|
2010-10-12 23:30:41 +04:00
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
NON_DIST_FILES = \
|
|
|
|
classes.dex \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
UPLOAD_EXTRA_FILES += gecko-unsigned-unaligned.apk
|
|
|
|
|
|
|
|
include $(topsrcdir)/ipc/app/defs.mk
|
|
|
|
|
|
|
|
DIST_FILES += $(MOZ_CHILD_PROCESS_NAME)
|
|
|
|
|
2010-12-02 03:28:17 +03:00
|
|
|
ifdef MOZ_THUMB2
|
|
|
|
ABI_DIR = armeabi-v7a
|
|
|
|
else
|
|
|
|
ABI_DIR = armeabi
|
|
|
|
endif
|
|
|
|
|
2010-10-12 23:30:41 +04:00
|
|
|
PKG_SUFFIX = .apk
|
|
|
|
INNER_MAKE_PACKAGE = \
|
2010-12-23 00:14:50 +03:00
|
|
|
make -C ../embedding/android gecko.ap_ && \
|
|
|
|
cp ../embedding/android/gecko.ap_ $(_ABS_DIST) && \
|
2010-10-12 23:30:41 +04:00
|
|
|
( cd $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH) && \
|
|
|
|
rm -rf lib && \
|
2010-12-02 03:28:17 +03:00
|
|
|
mkdir -p lib/$(ABI_DIR) && \
|
2010-10-15 22:28:03 +04:00
|
|
|
cp lib*.so lib && \
|
2010-12-02 03:28:17 +03:00
|
|
|
mv lib/libmozutils.so lib/$(ABI_DIR) && \
|
2010-10-21 04:44:03 +04:00
|
|
|
rm -f lib.id && \
|
|
|
|
for SOMELIB in lib/*.so ; \
|
|
|
|
do \
|
|
|
|
printf "`basename $$SOMELIB`:`$(_ABS_DIST)/host/bin/file_id $$SOMELIB`\n" >> lib.id ; \
|
|
|
|
done && \
|
2010-12-23 00:14:50 +03:00
|
|
|
unzip -o $(_ABS_DIST)/gecko.ap_ && \
|
|
|
|
rm $(_ABS_DIST)/gecko.ap_ && \
|
2010-10-12 23:30:41 +04:00
|
|
|
$(ZIP) -r9D $(_ABS_DIST)/gecko.ap_ $(DIST_FILES) -x $(NON_DIST_FILES) ) && \
|
|
|
|
rm -f $(_ABS_DIST)/gecko.apk && \
|
|
|
|
$(APKBUILDER) $(_ABS_DIST)/gecko.apk -v $(APKBUILDER_FLAGS) -z $(_ABS_DIST)/gecko.ap_ -f $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)/classes.dex && \
|
|
|
|
cp $(_ABS_DIST)/gecko.apk $(_ABS_DIST)/gecko-unsigned-unaligned.apk && \
|
|
|
|
$(JARSIGNER) $(_ABS_DIST)/gecko.apk && \
|
|
|
|
$(ZIPALIGN) -f -v 4 $(_ABS_DIST)/gecko.apk $(PACKAGE)
|
|
|
|
INNER_UNMAKE_PACKAGE = \
|
|
|
|
mkdir $(MOZ_PKG_DIR) && \
|
|
|
|
cd $(MOZ_PKG_DIR) && \
|
|
|
|
$(UNZIP) $(UNPACKAGE) && \
|
2010-12-02 03:28:17 +03:00
|
|
|
mv lib/$(ABI_DIR)/*.so . && \
|
2010-10-15 22:28:03 +04:00
|
|
|
mv lib/*.so . && \
|
2010-10-12 23:30:41 +04:00
|
|
|
rm -rf lib
|
|
|
|
endif
|
2004-12-01 01:54:13 +03:00
|
|
|
ifeq ($(MOZ_PKG_FORMAT),DMG)
|
2005-08-22 21:39:28 +04:00
|
|
|
ifndef _APPNAME
|
2004-12-01 01:54:13 +03:00
|
|
|
ifdef MOZ_DEBUG
|
|
|
|
_APPNAME = $(MOZ_APP_DISPLAYNAME)Debug.app
|
|
|
|
else
|
|
|
|
_APPNAME = $(MOZ_APP_DISPLAYNAME).app
|
|
|
|
endif
|
2005-08-22 21:39:28 +04:00
|
|
|
endif
|
2006-08-19 00:34:56 +04:00
|
|
|
ifndef _BINPATH
|
2006-02-03 06:26:44 +03:00
|
|
|
_BINPATH = /$(_APPNAME)/Contents/MacOS
|
2006-08-19 00:34:56 +04:00
|
|
|
endif # _BINPATH
|
2005-01-24 22:49:50 +03:00
|
|
|
PKG_SUFFIX = .dmg
|
2005-08-18 17:11:46 +04:00
|
|
|
PKG_DMG_FLAGS =
|
|
|
|
ifneq (,$(MOZ_PKG_MAC_DSSTORE))
|
|
|
|
PKG_DMG_FLAGS += --copy "$(MOZ_PKG_MAC_DSSTORE):/.DS_Store"
|
|
|
|
endif
|
|
|
|
ifneq (,$(MOZ_PKG_MAC_BACKGROUND))
|
|
|
|
PKG_DMG_FLAGS += --mkdir /.background --copy "$(MOZ_PKG_MAC_BACKGROUND):/.background"
|
|
|
|
endif
|
|
|
|
ifneq (,$(MOZ_PKG_MAC_ICON))
|
|
|
|
PKG_DMG_FLAGS += --icon "$(MOZ_PKG_MAC_ICON)"
|
|
|
|
endif
|
|
|
|
ifneq (,$(MOZ_PKG_MAC_RSRC))
|
|
|
|
PKG_DMG_FLAGS += --resource "$(MOZ_PKG_MAC_RSRC)"
|
|
|
|
endif
|
|
|
|
ifneq (,$(MOZ_PKG_MAC_EXTRA))
|
|
|
|
PKG_DMG_FLAGS += $(MOZ_PKG_MAC_EXTRA)
|
|
|
|
endif
|
2008-07-07 00:30:32 +04:00
|
|
|
_ABS_MOZSRCDIR = $(shell cd $(MOZILLA_DIR) && pwd)
|
2006-02-22 00:03:48 +03:00
|
|
|
ifdef UNIVERSAL_BINARY
|
|
|
|
STAGEPATH = universal/
|
|
|
|
endif
|
2007-02-27 22:43:59 +03:00
|
|
|
ifndef PKG_DMG_SOURCE
|
2008-12-05 20:00:33 +03:00
|
|
|
PKG_DMG_SOURCE = $(STAGEPATH)$(MOZ_PKG_DIR)
|
2007-02-27 22:43:59 +03:00
|
|
|
endif
|
2010-08-13 08:33:52 +04:00
|
|
|
INNER_MAKE_PACKAGE = $(_ABS_MOZSRCDIR)/build/package/mac_osx/pkg-dmg \
|
2007-02-27 22:43:59 +03:00
|
|
|
--source "$(PKG_DMG_SOURCE)" --target "$(PACKAGE)" \
|
2005-08-18 17:11:46 +04:00
|
|
|
--volname "$(MOZ_APP_DISPLAYNAME)" $(PKG_DMG_FLAGS)
|
2010-08-13 08:33:52 +04:00
|
|
|
INNER_UNMAKE_PACKAGE = \
|
2005-08-26 17:36:32 +04:00
|
|
|
set -ex; \
|
2009-07-06 20:13:57 +04: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; \
|
|
|
|
rsync -a "$(_ABS_DIST)/unpack.tmp/$(_APPNAME)" $(MOZ_PKG_DIR); \
|
2005-08-26 17:36:32 +04:00
|
|
|
test -n "$(MOZ_PKG_MAC_DSSTORE)" && \
|
2009-07-06 20:13:57 +04:00
|
|
|
rsync -a "$(_ABS_DIST)/unpack.tmp/.DS_Store" "$(MOZ_PKG_MAC_DSSTORE)"; \
|
2005-08-26 17:36:32 +04:00
|
|
|
test -n "$(MOZ_PKG_MAC_BACKGROUND)" && \
|
2009-07-06 20:13:57 +04:00
|
|
|
rsync -a "$(_ABS_DIST)/unpack.tmp/.background/`basename "$(MOZ_PKG_MAC_BACKGROUND)"`" "$(MOZ_PKG_MAC_BACKGROUND)"; \
|
2005-08-26 17:36:32 +04:00
|
|
|
test -n "$(MOZ_PKG_MAC_ICON)" && \
|
2009-07-06 20:13:57 +04:00
|
|
|
rsync -a "$(_ABS_DIST)/unpack.tmp/.VolumeIcon.icns" "$(MOZ_PKG_MAC_ICON)"; \
|
|
|
|
rm -rf $(_ABS_DIST)/unpack.tmp; \
|
2005-08-26 17:36:32 +04:00
|
|
|
if test -n "$(MOZ_PKG_MAC_RSRC)" ; then \
|
2005-09-10 06:23:13 +04:00
|
|
|
cp $(UNPACKAGE) $(MOZ_PKG_APPNAME).tmp.dmg && \
|
|
|
|
hdiutil unflatten $(MOZ_PKG_APPNAME).tmp.dmg && \
|
|
|
|
{ /Developer/Tools/DeRez -skip plst -skip blkx $(MOZ_PKG_APPNAME).tmp.dmg > "$(MOZ_PKG_MAC_RSRC)" || { rm -f $(MOZ_PKG_APPNAME).tmp.dmg && false; }; } && \
|
|
|
|
rm -f $(MOZ_PKG_APPNAME).tmp.dmg; \
|
2010-08-18 23:56:46 +04:00
|
|
|
fi
|
2005-08-26 17:36:32 +04:00
|
|
|
# The plst and blkx resources are skipped because they belong to each
|
|
|
|
# individual dmg and are created by hdiutil.
|
2007-08-09 23:53:08 +04:00
|
|
|
SDK_SUFFIX = .tar.bz2
|
2008-04-10 18:50:48 +04:00
|
|
|
SDK = $(MOZ_PKG_APPNAME)-$(MOZ_PKG_VERSION).$(AB_CD).mac-$(TARGET_CPU).sdk$(SDK_SUFFIX)
|
2010-02-12 13:54:24 +03:00
|
|
|
ifeq ($(MOZ_APP_NAME),xulrunner)
|
2010-03-18 06:02:14 +03:00
|
|
|
SDK = $(SDK_PATH)$(MOZ_APP_NAME)-$(MOZ_PKG_VERSION).$(AB_CD).mac-$(TARGET_CPU).sdk$(SDK_SUFFIX)
|
2010-02-12 13:54:24 +03:00
|
|
|
endif
|
2007-08-09 23:53:08 +04:00
|
|
|
MAKE_SDK = $(CREATE_FINAL_TAR) - $(MOZ_APP_NAME)-sdk | bzip2 -vf > $(SDK)
|
2004-12-01 01:54:13 +03:00
|
|
|
endif
|
|
|
|
|
2010-08-13 08:33:52 +04:00
|
|
|
ifdef MOZ_OMNIJAR
|
2011-03-17 04:09:18 +03:00
|
|
|
GENERATE_CACHE ?= true
|
|
|
|
|
2010-08-13 08:33:52 +04:00
|
|
|
OMNIJAR_FILES = \
|
|
|
|
chrome \
|
|
|
|
chrome.manifest \
|
|
|
|
components/*.js \
|
|
|
|
components/*.xpt \
|
|
|
|
components/*.manifest \
|
|
|
|
modules \
|
|
|
|
res \
|
|
|
|
defaults \
|
|
|
|
greprefs.js \
|
2011-01-07 22:04:33 +03:00
|
|
|
jsloader \
|
2010-08-13 08:33:52 +04:00
|
|
|
$(NULL)
|
|
|
|
|
2010-12-08 15:01:10 +03:00
|
|
|
NON_OMNIJAR_FILES += \
|
2010-08-13 08:33:52 +04:00
|
|
|
chrome/icons/\* \
|
2011-02-25 14:49:19 +03:00
|
|
|
$(PREF_DIR)/channel-prefs.js \
|
2010-08-13 08:33:52 +04:00
|
|
|
res/cursors/\* \
|
|
|
|
res/MainMenu.nib/\* \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
PACK_OMNIJAR = \
|
|
|
|
rm -f omni.jar components/binary.manifest && \
|
|
|
|
grep -h '^binary-component' components/*.manifest > binary.manifest ; \
|
2010-09-03 06:56:04 +04:00
|
|
|
sed -e 's/^binary-component/\#binary-component/' components/components.manifest > components.manifest && \
|
|
|
|
mv components.manifest components && \
|
2010-09-01 05:17:46 +04:00
|
|
|
find . | xargs touch -t 201001010000 && \
|
|
|
|
zip -r9mX omni.jar $(OMNIJAR_FILES) -x $(NON_OMNIJAR_FILES) && \
|
2011-03-17 04:09:18 +03:00
|
|
|
$(GENERATE_CACHE) && \
|
2011-05-17 22:06:16 +04:00
|
|
|
$(OPTIMIZE_JARS_CMD) --optimize $(JARLOG_DIR) ./ ./ && \
|
2010-08-13 08:33:52 +04:00
|
|
|
mv binary.manifest components && \
|
|
|
|
printf "manifest components/binary.manifest\n" > chrome.manifest
|
2010-09-03 06:56:04 +04:00
|
|
|
UNPACK_OMNIJAR = \
|
2011-05-17 22:06:16 +04:00
|
|
|
$(OPTIMIZE_JARS_CMD) --deoptimize $(JARLOG_DIR) ./ ./ && \
|
2010-09-03 06:56:04 +04:00
|
|
|
unzip -o omni.jar && \
|
|
|
|
rm -f components/binary.manifest && \
|
|
|
|
sed -e 's/^\#binary-component/binary-component/' components/components.manifest > components.manifest && \
|
|
|
|
mv components.manifest components
|
2010-08-13 08:33:52 +04:00
|
|
|
|
2011-04-12 08:23:18 +04:00
|
|
|
MAKE_PACKAGE = (cd $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH) && $(PACK_OMNIJAR)) && \
|
2011-04-13 04:27:41 +04:00
|
|
|
(cd $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH) && $(CREATE_PRECOMPLETE_CMD)) && $(INNER_MAKE_PACKAGE)
|
2010-08-13 08:33:52 +04:00
|
|
|
UNMAKE_PACKAGE = $(INNER_UNMAKE_PACKAGE) && (cd $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH) && $(UNPACK_OMNIJAR))
|
|
|
|
else
|
2011-04-13 04:27:41 +04:00
|
|
|
MAKE_PACKAGE = (cd $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH) && $(CREATE_PRECOMPLETE_CMD)) && $(INNER_MAKE_PACKAGE)
|
2010-08-13 08:33:52 +04:00
|
|
|
UNMAKE_PACKAGE = $(INNER_UNMAKE_PACKAGE)
|
|
|
|
endif
|
|
|
|
|
2004-12-01 01:54:13 +03:00
|
|
|
# dummy macro if we don't have PSM built
|
|
|
|
SIGN_NSS =
|
2006-02-22 00:03:48 +03:00
|
|
|
ifneq (1_,$(if $(CROSS_COMPILE),1,0)_$(UNIVERSAL_BINARY))
|
2004-12-01 01:54:13 +03:00
|
|
|
ifdef MOZ_PSM
|
|
|
|
SIGN_NSS = @echo signing nss libraries;
|
|
|
|
|
2008-04-28 23:14:12 +04:00
|
|
|
NSS_DLL_SUFFIX = $(DLL_SUFFIX)
|
2006-02-22 00:03:48 +03:00
|
|
|
ifdef UNIVERSAL_BINARY
|
|
|
|
NATIVE_ARCH = $(shell uname -p | sed -e s/powerpc/ppc/)
|
2008-07-21 21:53:22 +04:00
|
|
|
NATIVE_DIST = $(DIST:$(DEPTH)/%=$(DEPTH)/../$(NATIVE_ARCH)/%)
|
2006-02-22 00:03:48 +03:00
|
|
|
SIGN_CMD = $(NATIVE_DIST)/bin/run-mozilla.sh $(NATIVE_DIST)/bin/shlibsign -v -i
|
|
|
|
else
|
2008-03-14 03:39:33 +03:00
|
|
|
ifeq ($(OS_ARCH),OS2)
|
2008-04-28 23:14:12 +04:00
|
|
|
# uppercase extension to get the correct output file from shlibsign
|
|
|
|
NSS_DLL_SUFFIX = .DLL
|
2008-07-07 00:30:32 +04:00
|
|
|
SIGN_CMD = $(MOZILLA_DIR)/toolkit/mozapps/installer/os2/sign.cmd $(DIST)
|
2008-03-14 03:39:33 +03:00
|
|
|
else
|
2010-03-10 21:36:45 +03:00
|
|
|
SIGN_CMD = $(RUN_TEST_PROGRAM) $(DIST)/bin/shlibsign$(BIN_SUFFIX) -v -i
|
2006-02-22 00:03:48 +03:00
|
|
|
endif
|
2008-03-14 03:39:33 +03:00
|
|
|
endif
|
2004-12-01 01:54:13 +03:00
|
|
|
|
2008-12-05 20:00:33 +03:00
|
|
|
SOFTOKN = $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)/$(DLL_PREFIX)softokn3$(NSS_DLL_SUFFIX)
|
2009-08-11 07:45:40 +04:00
|
|
|
NSSDBM = $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)/$(DLL_PREFIX)nssdbm3$(NSS_DLL_SUFFIX)
|
2009-09-17 06:49:20 +04:00
|
|
|
FREEBL = $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)/$(DLL_PREFIX)freebl3$(NSS_DLL_SUFFIX)
|
2008-12-05 20:00:33 +03:00
|
|
|
FREEBL_32FPU = $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)/$(DLL_PREFIX)freebl_32fpu_3$(DLL_SUFFIX)
|
|
|
|
FREEBL_32INT = $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)/$(DLL_PREFIX)freebl_32int_3$(DLL_SUFFIX)
|
|
|
|
FREEBL_32INT64 = $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)/$(DLL_PREFIX)freebl_32int64_3$(DLL_SUFFIX)
|
|
|
|
FREEBL_64FPU = $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)/$(DLL_PREFIX)freebl_64fpu_3$(DLL_SUFFIX)
|
|
|
|
FREEBL_64INT = $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)/$(DLL_PREFIX)freebl_64int_3$(DLL_SUFFIX)
|
2004-12-01 01:54:13 +03:00
|
|
|
|
|
|
|
SIGN_NSS += $(SIGN_CMD) $(SOFTOKN); \
|
2009-09-05 05:28:54 +04:00
|
|
|
$(SIGN_CMD) $(NSSDBM); \
|
2006-01-13 21:09:32 +03:00
|
|
|
if test -f $(FREEBL); then $(SIGN_CMD) $(FREEBL); fi; \
|
|
|
|
if test -f $(FREEBL_32FPU); then $(SIGN_CMD) $(FREEBL_32FPU); fi; \
|
|
|
|
if test -f $(FREEBL_32INT); then $(SIGN_CMD) $(FREEBL_32INT); fi; \
|
|
|
|
if test -f $(FREEBL_32INT64); then $(SIGN_CMD) $(FREEBL_32INT64); fi; \
|
|
|
|
if test -f $(FREEBL_64FPU); then $(SIGN_CMD) $(FREEBL_64FPU); fi; \
|
|
|
|
if test -f $(FREEBL_64INT); then $(SIGN_CMD) $(FREEBL_64INT); fi;
|
2004-12-01 01:54:13 +03:00
|
|
|
|
|
|
|
endif # MOZ_PSM
|
|
|
|
endif # !CROSS_COMPILE
|
|
|
|
|
|
|
|
NO_PKG_FILES += \
|
|
|
|
core \
|
|
|
|
bsdecho \
|
|
|
|
gtscc \
|
2009-02-08 00:50:21 +03: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 18:29:22 +03:00
|
|
|
js-config \
|
2004-12-01 01:54:13 +03:00
|
|
|
jscpucfg \
|
|
|
|
nsinstall \
|
|
|
|
viewer \
|
|
|
|
TestGtkEmbed \
|
|
|
|
codesighs* \
|
|
|
|
elf-dynstr-gc \
|
|
|
|
mangle* \
|
|
|
|
maptsv* \
|
|
|
|
mfc* \
|
|
|
|
mkdepend* \
|
|
|
|
msdump* \
|
|
|
|
msmap* \
|
|
|
|
nm2tsv* \
|
|
|
|
nsinstall* \
|
|
|
|
res/samples \
|
|
|
|
res/throbber \
|
|
|
|
shlibsign* \
|
2008-04-21 18:32:47 +04:00
|
|
|
ssltunnel* \
|
2008-09-05 17:35:58 +04:00
|
|
|
certutil* \
|
|
|
|
pk12util* \
|
2004-12-01 01:54:13 +03:00
|
|
|
winEmbed.exe \
|
|
|
|
chrome/chrome.rdf \
|
2005-02-24 00:46:11 +03:00
|
|
|
chrome/app-chrome.manifest \
|
2005-07-26 20:46:57 +04:00
|
|
|
chrome/overlayinfo \
|
|
|
|
components/compreg.dat \
|
|
|
|
components/xpti.dat \
|
2006-06-29 22:27:49 +04:00
|
|
|
content_unit_tests \
|
|
|
|
necko_unit_tests \
|
2008-12-09 00:09:52 +03:00
|
|
|
*.dSYM \
|
2004-12-01 01:54:13 +03:00
|
|
|
$(NULL)
|
|
|
|
|
2008-10-02 10:49:45 +04:00
|
|
|
# browser/locales/Makefile uses this makefile for its variable defs, but
|
2005-04-21 03:10:56 +04:00
|
|
|
# doesn't want the libs:: rule.
|
|
|
|
ifndef PACKAGER_NO_LIBS
|
2006-08-19 00:34:56 +04:00
|
|
|
libs:: make-package
|
2005-04-21 03:10:56 +04:00
|
|
|
endif
|
2004-12-01 01:54:13 +03:00
|
|
|
|
2009-06-27 09:31:39 +04:00
|
|
|
DEFINES += -DDLL_PREFIX=$(DLL_PREFIX) -DDLL_SUFFIX=$(DLL_SUFFIX) -DBIN_SUFFIX=$(BIN_SUFFIX)
|
2005-09-15 22:09:56 +04:00
|
|
|
|
|
|
|
ifdef MOZ_PKG_REMOVALS
|
|
|
|
MOZ_PKG_REMOVALS_GEN = removed-files
|
|
|
|
|
2008-11-28 05:26:44 +03:00
|
|
|
$(MOZ_PKG_REMOVALS_GEN): $(MOZ_PKG_REMOVALS) $(GLOBAL_DEPS)
|
2010-05-03 01:54:54 +04:00
|
|
|
cat $(MOZ_PKG_REMOVALS) | \
|
|
|
|
sed -e 's/^[ \t]*//' | \
|
|
|
|
$(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py -Fsubstitution $(DEFINES) $(ACDEFINES) > $(MOZ_PKG_REMOVALS_GEN)
|
2008-10-21 07:17:16 +04:00
|
|
|
|
|
|
|
GARBAGE += $(MOZ_PKG_REMOVALS_GEN)
|
2005-09-15 22:09:56 +04:00
|
|
|
endif
|
|
|
|
|
2004-12-01 01:54:13 +03:00
|
|
|
GARBAGE += $(DIST)/$(PACKAGE) $(PACKAGE)
|
|
|
|
|
|
|
|
ifeq ($(OS_ARCH),IRIX)
|
|
|
|
STRIP_FLAGS = -f
|
|
|
|
endif
|
|
|
|
ifeq ($(OS_ARCH),OS2)
|
2008-07-07 00:30:32 +04:00
|
|
|
STRIP = $(MOZILLA_DIR)/toolkit/mozapps/installer/os2/strip.cmd
|
2004-12-01 01:54:13 +03:00
|
|
|
endif
|
|
|
|
|
2011-04-29 14:38:26 +04:00
|
|
|
ifneq (,$(filter WINNT OS2,$(OS_ARCH)))
|
2005-06-30 23:22:39 +04:00
|
|
|
PKGCP_OS = dos
|
|
|
|
else
|
|
|
|
PKGCP_OS = unix
|
|
|
|
endif
|
|
|
|
|
2010-08-13 08:36:16 +04:00
|
|
|
# The following target stages files into two directories: one directory for
|
|
|
|
# core files, and one for optional extensions based on the information in
|
|
|
|
# the MOZ_PKG_MANIFEST file and the following vars:
|
2006-05-04 19:43:31 +04:00
|
|
|
# MOZ_NONLOCALIZED_PKG_LIST
|
|
|
|
# MOZ_LOCALIZED_PKG_LIST
|
2006-05-23 02:29:44 +04:00
|
|
|
# MOZ_OPTIONAL_PKG_LIST
|
2006-05-04 19:43:31 +04:00
|
|
|
|
|
|
|
PKG_ARG = , "$(pkg)"
|
|
|
|
|
2006-07-12 01:20:12 +04:00
|
|
|
# Define packager macro to work around make 3.81 backslash issue (bug #339933)
|
|
|
|
define PACKAGER_COPY
|
2008-07-07 00:30:32 +04:00
|
|
|
$(PERL) -I$(MOZILLA_DIR)/xpinstall/packager -e 'use Packager; \
|
2006-07-12 01:20:12 +04:00
|
|
|
Packager::Copy($1,$2,$3,$4,$5,$6,$7);'
|
|
|
|
endef
|
|
|
|
|
2010-08-13 08:36:16 +04:00
|
|
|
installer-stage: stage-package
|
2006-05-04 19:43:31 +04:00
|
|
|
ifndef MOZ_PKG_MANIFEST
|
|
|
|
$(error MOZ_PKG_MANIFEST unspecified!)
|
|
|
|
endif
|
|
|
|
@rm -rf $(DEPTH)/installer-stage $(DIST)/xpt
|
|
|
|
@echo "Staging installer files..."
|
2010-08-13 08:36:16 +04:00
|
|
|
@$(NSINSTALL) -D $(DEPTH)/installer-stage/core
|
2010-08-19 07:02:19 +04:00
|
|
|
ifdef MOZ_OMNIJAR
|
|
|
|
@(cd $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH) && $(PACK_OMNIJAR))
|
|
|
|
endif
|
2010-08-13 08:36:16 +04:00
|
|
|
@cp -av $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)/. $(DEPTH)/installer-stage/core
|
2011-04-13 04:27:41 +04:00
|
|
|
@(cd $(DEPTH)/installer-stage/core && $(CREATE_PRECOMPLETE_CMD))
|
2007-10-09 23:30:28 +04:00
|
|
|
ifdef MOZ_OPTIONAL_PKG_LIST
|
2010-08-13 08:36:16 +04:00
|
|
|
@$(NSINSTALL) -D $(DEPTH)/installer-stage/optional
|
2010-07-30 09:46:47 +04:00
|
|
|
$(call PACKAGER_COPY, "$(call core_abspath,$(DIST))",\
|
|
|
|
"$(call core_abspath,$(DEPTH)/installer-stage/optional)", \
|
|
|
|
"$(MOZ_PKG_MANIFEST)", "$(PKGCP_OS)", 1, 0, 1 \
|
|
|
|
$(foreach pkg,$(MOZ_OPTIONAL_PKG_LIST),$(PKG_ARG)) )
|
2011-04-25 13:27:00 +04:00
|
|
|
if test -d $(DEPTH)/installer-stage/optional/extensions ; then \
|
|
|
|
cd $(DEPTH)/installer-stage/optional/extensions; find -maxdepth 1 -mindepth 1 -exec rm -r ../../core/extensions/{} \; ; \
|
|
|
|
fi
|
|
|
|
if test -d $(DEPTH)/installer-stage/optional/distribution/extensions/ ; then \
|
|
|
|
cd $(DEPTH)/installer-stage/optional/distribution/extensions/; find -maxdepth 1 -mindepth 1 -exec rm -r ../../../core/distribution/extensions/{} \; ; \
|
|
|
|
fi
|
2007-10-09 23:30:28 +04:00
|
|
|
endif
|
2006-05-04 19:43:31 +04:00
|
|
|
|
2011-03-14 16:41:41 +03:00
|
|
|
elfhack:
|
|
|
|
ifdef USE_ELF_HACK
|
|
|
|
@echo ===
|
|
|
|
@echo === If you get failures below, please file a bug describing the error
|
|
|
|
@echo === and your environment \(compiler and linker versions\), and use
|
|
|
|
@echo === --disable-elf-hack until this is fixed.
|
|
|
|
@echo ===
|
|
|
|
cd $(DIST)/bin; find . -name "*$(DLL_SUFFIX)" | xargs $(DEPTH)/build/unix/elfhack/elfhack
|
|
|
|
endif
|
|
|
|
|
|
|
|
stage-package: $(MOZ_PKG_MANIFEST) $(MOZ_PKG_REMOVALS_GEN) elfhack
|
2008-12-05 20:00:33 +03:00
|
|
|
@rm -rf $(DIST)/$(MOZ_PKG_DIR) $(DIST)/$(PKG_PATH)$(PKG_BASENAME).tar $(DIST)/$(PKG_PATH)$(PKG_BASENAME).dmg $@ $(EXCLUDE_LIST)
|
2004-12-01 01:54:13 +03:00
|
|
|
# NOTE: this must be a tar now that dist links into the tree so that we
|
|
|
|
# do not strip the binaries actually in the tree.
|
|
|
|
@echo "Creating package directory..."
|
2008-12-05 20:00:33 +03:00
|
|
|
@mkdir $(DIST)/$(MOZ_PKG_DIR)
|
2009-10-20 16:13:38 +04:00
|
|
|
ifndef UNIVERSAL_BINARY
|
|
|
|
# If UNIVERSAL_BINARY, the package will be made from an already-prepared
|
|
|
|
# STAGEPATH
|
2005-06-30 23:22:39 +04:00
|
|
|
ifdef MOZ_PKG_MANIFEST
|
2011-03-08 06:59:17 +03:00
|
|
|
$(RM) -rf $(DIST)/xpt $(DIST)/manifests
|
2009-08-21 21:05:28 +04:00
|
|
|
$(call PACKAGER_COPY, "$(call core_abspath,$(DIST))",\
|
2010-07-30 09:46:47 +04:00
|
|
|
"$(call core_abspath,$(DIST)/$(MOZ_PKG_DIR))", \
|
|
|
|
"$(MOZ_PKG_MANIFEST)", "$(PKGCP_OS)", 1, 0, 1)
|
2009-08-27 08:03:15 +04:00
|
|
|
$(PERL) $(MOZILLA_DIR)/xpinstall/packager/xptlink.pl -s $(DIST) -d $(DIST)/xpt -f $(DIST)/$(MOZ_PKG_DIR)/$(_BINPATH)/components -v -x "$(XPIDL_LINK)"
|
2010-07-22 18:38:59 +04:00
|
|
|
$(PYTHON) $(MOZILLA_DIR)/toolkit/mozapps/installer/link-manifests.py \
|
|
|
|
$(DIST)/$(MOZ_PKG_DIR)/$(_BINPATH)/components/components.manifest \
|
|
|
|
$(patsubst %,$(DIST)/manifests/%/components,$(MOZ_NONLOCALIZED_PKG_LIST))
|
|
|
|
$(PYTHON) $(MOZILLA_DIR)/toolkit/mozapps/installer/link-manifests.py \
|
|
|
|
$(DIST)/$(MOZ_PKG_DIR)/$(_BINPATH)/chrome/nonlocalized.manifest \
|
|
|
|
$(patsubst %,$(DIST)/manifests/%/chrome,$(MOZ_NONLOCALIZED_PKG_LIST))
|
|
|
|
$(PYTHON) $(MOZILLA_DIR)/toolkit/mozapps/installer/link-manifests.py \
|
|
|
|
$(DIST)/$(MOZ_PKG_DIR)/$(_BINPATH)/chrome/localized.manifest \
|
|
|
|
$(patsubst %,$(DIST)/manifests/%/chrome,$(MOZ_LOCALIZED_PKG_LIST))
|
|
|
|
printf "manifest components/interfaces.manifest\nmanifest components/components.manifest\nmanifest chrome/nonlocalized.manifest\nmanifest chrome/localized.manifest\n" > $(DIST)/$(MOZ_PKG_DIR)/$(_BINPATH)/chrome.manifest
|
2005-06-30 23:22:39 +04:00
|
|
|
else # !MOZ_PKG_MANIFEST
|
2004-12-01 01:54:13 +03:00
|
|
|
ifeq ($(MOZ_PKG_FORMAT),DMG)
|
2008-03-06 00:30:28 +03:00
|
|
|
ifndef STAGE_SDK
|
2008-12-05 20:00:33 +03:00
|
|
|
@cd $(DIST) && rsync -auv --copy-unsafe-links $(_APPNAME) $(MOZ_PKG_DIR)
|
2009-08-20 20:48:25 +04:00
|
|
|
@echo "Linking XPT files..."
|
|
|
|
@rm -rf $(DIST)/xpt
|
|
|
|
@$(NSINSTALL) -D $(DIST)/xpt
|
2010-07-03 00:02:56 +04:00
|
|
|
@($(XPIDL_LINK) $(DIST)/xpt/$(MOZ_PKG_APPNAME).xpt $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)/components/*.xpt && rm -f $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)/components/*.xpt && cp $(DIST)/xpt/$(MOZ_PKG_APPNAME).xpt $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)/components && printf "interfaces $(MOZ_PKG_APPNAME).xpt\n" >$(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)/components/interfaces.manifest) || echo No *.xpt files found in: $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)/components/. Continuing...
|
2008-03-06 00:30:28 +03:00
|
|
|
else
|
2008-12-05 20:00:33 +03:00
|
|
|
@cd $(DIST)/bin && tar $(TAR_CREATE_FLAGS) - * | (cd ../$(MOZ_PKG_DIR); tar -xf -)
|
2008-03-06 00:30:28 +03:00
|
|
|
endif
|
2004-12-01 01:54:13 +03:00
|
|
|
else
|
2008-12-05 20:00:33 +03:00
|
|
|
@cd $(DIST)/bin && tar $(TAR_CREATE_FLAGS) - * | (cd ../$(MOZ_PKG_DIR); tar -xf -)
|
2009-04-08 18:40:12 +04:00
|
|
|
@echo "Linking XPT files..."
|
|
|
|
@rm -rf $(DIST)/xpt
|
|
|
|
@$(NSINSTALL) -D $(DIST)/xpt
|
2010-07-03 00:02:56 +04:00
|
|
|
@($(XPIDL_LINK) $(DIST)/xpt/$(MOZ_PKG_APPNAME).xpt $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)/components/*.xpt && rm -f $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)/components/*.xpt && cp $(DIST)/xpt/$(MOZ_PKG_APPNAME).xpt $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)/components && printf "interfaces $(MOZ_PKG_APPNAME).xpt\n" >$(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)/components/interfaces.manifest) || echo No *.xpt files found in: $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)/components/. Continuing...
|
2009-06-13 22:53:38 +04:00
|
|
|
endif # DMG
|
2005-06-30 23:22:39 +04:00
|
|
|
endif # MOZ_PKG_MANIFEST
|
2009-10-20 16:13:38 +04:00
|
|
|
endif # UNIVERSAL_BINARY
|
2011-05-17 22:06:16 +04:00
|
|
|
$(OPTIMIZE_JARS_CMD) --optimize $(JARLOG_DIR) $(DIST)/bin/chrome $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)/chrome
|
2005-08-22 21:39:28 +04:00
|
|
|
ifndef PKG_SKIP_STRIP
|
2011-04-10 07:33:31 +04:00
|
|
|
ifeq ($(OS_ARCH),OS2)
|
|
|
|
@echo "Stripping package directory..."
|
|
|
|
@cd $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR) && $(STRIP)
|
|
|
|
$(SIGN_NSS)
|
|
|
|
else
|
|
|
|
@echo "Stripping package directory..."
|
|
|
|
@cd $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR); find . ! -type d \
|
|
|
|
! -name "*.js" \
|
|
|
|
! -name "*.xpt" \
|
|
|
|
! -name "*.gif" \
|
|
|
|
! -name "*.jpg" \
|
|
|
|
! -name "*.png" \
|
|
|
|
! -name "*.xpm" \
|
|
|
|
! -name "*.txt" \
|
|
|
|
! -name "*.rdf" \
|
|
|
|
! -name "*.sh" \
|
|
|
|
! -name "*.properties" \
|
|
|
|
! -name "*.dtd" \
|
|
|
|
! -name "*.html" \
|
|
|
|
! -name "*.xul" \
|
|
|
|
! -name "*.css" \
|
|
|
|
! -name "*.xml" \
|
|
|
|
! -name "*.jar" \
|
|
|
|
! -name "*.dat" \
|
|
|
|
! -name "*.tbl" \
|
|
|
|
! -name "*.src" \
|
|
|
|
! -name "*.reg" \
|
|
|
|
$(PLATFORM_EXCLUDE_LIST) \
|
|
|
|
-exec $(STRIP) $(STRIP_FLAGS) {} >/dev/null 2>&1 \;
|
|
|
|
$(SIGN_NSS)
|
|
|
|
endif
|
2009-10-20 16:14:41 +04:00
|
|
|
else
|
|
|
|
ifdef UNIVERSAL_BINARY
|
|
|
|
# universal binaries will have had their .chk files removed prior to the unify
|
|
|
|
# step, and if they're also --disable-install-strip then they won't get
|
|
|
|
# re-signed in the block above.
|
|
|
|
$(SIGN_NSS)
|
|
|
|
endif # UNIVERSAL_BINARY
|
|
|
|
endif # PKG_SKIP_STRIP
|
2004-12-01 01:54:13 +03:00
|
|
|
@echo "Removing unpackaged files..."
|
2006-02-03 06:26:44 +03:00
|
|
|
ifdef NO_PKG_FILES
|
2008-12-05 20:00:33 +03:00
|
|
|
cd $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH); rm -rf $(NO_PKG_FILES)
|
2006-02-03 06:26:44 +03:00
|
|
|
endif
|
2005-09-17 06:21:17 +04:00
|
|
|
ifdef MOZ_PKG_REMOVALS
|
2008-12-07 07:25:08 +03:00
|
|
|
$(SYSINSTALL) $(IFLAGS1) $(MOZ_PKG_REMOVALS_GEN) $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)
|
2005-09-17 06:21:17 +04:00
|
|
|
endif # MOZ_PKG_REMOVALS
|
2006-08-19 00:34:56 +04:00
|
|
|
|
2011-01-27 06:17:24 +03:00
|
|
|
make-package: stage-package $(PACKAGE_XULRUNNER) make-sourcestamp-file
|
2004-12-01 01:54:13 +03:00
|
|
|
@echo "Compressing..."
|
2007-08-03 18:46:17 +04:00
|
|
|
cd $(DIST) && $(MAKE_PACKAGE)
|
2011-01-27 06:17:24 +03:00
|
|
|
|
|
|
|
make-sourcestamp-file::
|
2011-02-02 21:25:00 +03:00
|
|
|
$(NSINSTALL) -D $(DIST)/$(PKG_PATH)
|
2011-01-27 06:17:24 +03:00
|
|
|
@echo "$(BUILDID)" > $(MOZ_SOURCESTAMP_FILE)
|
|
|
|
@echo "$(MOZ_SOURCE_REPO)/rev/$(MOZ_SOURCE_STAMP)" >> $(MOZ_SOURCESTAMP_FILE)
|
2007-08-03 18:46:17 +04: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 22:15:05 +04:00
|
|
|
# dist/include -> prefix/include/appname-version
|
|
|
|
# dist/idl -> prefix/share/idl/appname-version
|
2007-08-03 18:46:17 +04:00
|
|
|
# dist/sdk/lib -> prefix/lib/appname-devel-version/lib
|
|
|
|
# prefix/lib/appname-devel-version/* symlinks to the above directories
|
|
|
|
install:: stage-package
|
2011-04-29 14:38:26 +04:00
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
2009-04-25 12:53:02 +04:00
|
|
|
$(error "make install" is not supported on this platform. Use "make package" instead.)
|
|
|
|
endif
|
|
|
|
ifeq (bundle,$(MOZ_FS_LAYOUT))
|
2008-04-09 09:26:00 +04:00
|
|
|
$(error "make install" is not supported on this platform. Use "make package" instead.)
|
2010-11-07 11:22:53 +03:00
|
|
|
endif
|
|
|
|
ifdef MOZ_OMNIJAR
|
|
|
|
cd $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH) && $(PACK_OMNIJAR)
|
2007-08-03 18:46:17 +04:00
|
|
|
endif
|
|
|
|
$(NSINSTALL) -D $(DESTDIR)$(installdir)
|
2008-12-05 20:00:33 +03:00
|
|
|
(cd $(DIST)/$(MOZ_PKG_DIR) && tar $(TAR_CREATE_FLAGS) - .) | \
|
2007-08-03 18:46:17 +04: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)
|
|
|
|
ifdef INSTALL_SDK # Here comes the hard part
|
2009-05-18 22:15:05 +04:00
|
|
|
$(NSINSTALL) -D $(DESTDIR)$(includedir)
|
|
|
|
(cd $(DIST)/include && tar $(TAR_CREATE_FLAGS) - .) | \
|
|
|
|
(cd $(DESTDIR)$(includedir) && tar -xf -)
|
|
|
|
$(NSINSTALL) -D $(DESTDIR)$(idldir)
|
2007-08-03 18:46:17 +04:00
|
|
|
(cd $(DIST)/idl && tar $(TAR_CREATE_FLAGS) - .) | \
|
2009-05-18 22:15:05 +04:00
|
|
|
(cd $(DESTDIR)$(idldir) && tar -xf -)
|
2007-08-03 18:46:17 +04:00
|
|
|
# SDK directory is the libs + a bunch of symlinks
|
|
|
|
$(NSINSTALL) -D $(DESTDIR)$(sdkdir)/sdk/lib
|
2009-05-18 22:15:05 +04:00
|
|
|
if test -f $(DIST)/include/xpcom-config.h; then \
|
|
|
|
$(SYSINSTALL) $(IFLAGS1) $(DIST)/include/xpcom-config.h $(DESTDIR)$(sdkdir); \
|
2007-08-03 18:46:17 +04:00
|
|
|
fi
|
|
|
|
(cd $(DIST)/sdk/lib && tar $(TAR_CREATE_FLAGS) - .) | (cd $(DESTDIR)$(sdkdir)/sdk/lib && tar -xf -)
|
2009-05-18 22:15:05 +04: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 18:46:17 +04:00
|
|
|
ln -s $(sdkdir)/sdk/lib $(DESTDIR)$(sdkdir)/lib
|
|
|
|
ln -s $(installdir) $(DESTDIR)$(sdkdir)/bin
|
2009-05-18 22:15:05 +04:00
|
|
|
ln -s $(includedir) $(DESTDIR)$(sdkdir)/include
|
|
|
|
ln -s $(idldir) $(DESTDIR)$(sdkdir)/idl
|
2007-08-03 18:46:17 +04:00
|
|
|
endif # INSTALL_SDK
|
2007-08-09 23:53:08 +04:00
|
|
|
|
2008-03-06 00:30:28 +03:00
|
|
|
make-sdk:
|
2008-12-05 20:00:33 +03:00
|
|
|
$(MAKE) stage-package UNIVERSAL_BINARY= STAGE_SDK=1 MOZ_PKG_DIR=sdk-stage
|
2007-08-09 23:53:08 +04:00
|
|
|
@echo "Packaging SDK..."
|
|
|
|
$(RM) -rf $(DIST)/$(MOZ_APP_NAME)-sdk
|
|
|
|
$(NSINSTALL) -D $(DIST)/$(MOZ_APP_NAME)-sdk/bin
|
2008-03-06 00:30:28 +03:00
|
|
|
(cd $(DIST)/sdk-stage && tar $(TAR_CREATE_FLAGS) - .) | \
|
2007-08-09 23:53:08 +04:00
|
|
|
(cd $(DIST)/$(MOZ_APP_NAME)-sdk/bin && tar -xf -)
|
2008-04-10 18:50:48 +04:00
|
|
|
$(NSINSTALL) -D $(DIST)/$(MOZ_APP_NAME)-sdk/host/bin
|
|
|
|
(cd $(DIST)/host/bin && tar $(TAR_CREATE_FLAGS) - .) | \
|
|
|
|
(cd $(DIST)/$(MOZ_APP_NAME)-sdk/host/bin && tar -xf -)
|
2007-08-09 23:53:08 +04:00
|
|
|
$(NSINSTALL) -D $(DIST)/$(MOZ_APP_NAME)-sdk/sdk
|
|
|
|
(cd $(DIST)/sdk && tar $(TAR_CREATE_FLAGS) - .) | \
|
|
|
|
(cd $(DIST)/$(MOZ_APP_NAME)-sdk/sdk && tar -xf -)
|
|
|
|
$(NSINSTALL) -D $(DIST)/$(MOZ_APP_NAME)-sdk/include
|
|
|
|
(cd $(DIST)/include && tar $(TAR_CREATE_FLAGS) - .) | \
|
|
|
|
(cd $(DIST)/$(MOZ_APP_NAME)-sdk/include && tar -xf -)
|
|
|
|
$(NSINSTALL) -D $(DIST)/$(MOZ_APP_NAME)-sdk/idl
|
|
|
|
(cd $(DIST)/idl && tar $(TAR_CREATE_FLAGS) - .) | \
|
|
|
|
(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
|
|
|
|
(cd $(DIST)/sdk/lib && tar $(TAR_CREATE_FLAGS) - .) | \
|
|
|
|
(cd $(DIST)/$(MOZ_APP_NAME)-sdk/lib && tar -xf -)
|
2010-02-12 13:54:24 +03:00
|
|
|
$(NSINSTALL) -D $(DIST)/$(SDK_PATH)
|
2007-08-09 23:53:08 +04:00
|
|
|
cd $(DIST) && $(MAKE_SDK)
|
2008-11-12 15:45:23 +03:00
|
|
|
|
2008-11-13 18:37:04 +03:00
|
|
|
ifeq ($(OS_TARGET), WINNT)
|
|
|
|
INSTALLER_PACKAGE = $(DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe
|
|
|
|
endif
|
|
|
|
|
2008-12-29 19:11:27 +03: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)
|
|
|
|
QUOTED_WILDCARD = $(if $(wildcard $(subst $(space),?,$(1))),"$(1)")
|
2011-03-18 20:29:56 +03:00
|
|
|
ESCAPE_SPACE = $(subst $(space),\$(space),$(1))
|
2008-12-29 19:11:27 +03:00
|
|
|
|
2010-10-16 03:09:53 +04:00
|
|
|
# This variable defines which OpenSSL algorithm to use to
|
|
|
|
# generate checksums for files that we upload
|
|
|
|
CHECKSUM_ALGORITHM = 'sha512'
|
|
|
|
|
|
|
|
# This variable defines where the checksum file will be located
|
2010-10-21 21:02:18 +04:00
|
|
|
CHECKSUM_FILE = "$(DIST)/$(PKG_PATH)/$(PKG_BASENAME).checksums"
|
2010-10-16 03:09:53 +04:00
|
|
|
|
|
|
|
UPLOAD_FILES= \
|
|
|
|
$(call QUOTED_WILDCARD,$(DIST)/$(PACKAGE)) \
|
|
|
|
$(call QUOTED_WILDCARD,$(INSTALLER_PACKAGE)) \
|
|
|
|
$(call QUOTED_WILDCARD,$(DIST)/$(COMPLETE_MAR)) \
|
2010-12-28 20:41:36 +03:00
|
|
|
$(call QUOTED_WILDCARD,$(DIST)/$(LANGPACK)) \
|
2010-10-16 03:09:53 +04: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 06:17:24 +03:00
|
|
|
$(call QUOTED_WILDCARD,$(MOZ_SOURCESTAMP_FILE)) \
|
2010-10-16 03:09:53 +04:00
|
|
|
$(if $(UPLOAD_EXTRA_FILES), $(foreach f, $(UPLOAD_EXTRA_FILES), $(wildcard $(DIST)/$(f))))
|
|
|
|
|
|
|
|
checksum:
|
|
|
|
@$(PYTHON) $(MOZILLA_DIR)/build/checksums.py \
|
|
|
|
-o $(CHECKSUM_FILE) \
|
|
|
|
-d $(CHECKSUM_ALGORITHM) \
|
|
|
|
-s $(call QUOTED_WILDCARD,$(DIST)) \
|
|
|
|
$(UPLOAD_FILES)
|
|
|
|
@echo "CHECKSUM FILE START"
|
|
|
|
@cat $(CHECKSUM_FILE)
|
|
|
|
@echo "CHECKSUM FILE END"
|
|
|
|
|
|
|
|
|
|
|
|
upload: checksum
|
2009-05-11 19:11:50 +04:00
|
|
|
$(PYTHON) $(MOZILLA_DIR)/build/upload.py --base-path $(DIST) \
|
2010-10-16 03:09:53 +04:00
|
|
|
$(UPLOAD_FILES) \
|
|
|
|
$(CHECKSUM_FILE)
|
2008-11-13 18:37:04 +03:00
|
|
|
|
2008-11-12 15:45:23 +03:00
|
|
|
ifndef MOZ_PKG_SRCDIR
|
|
|
|
MOZ_PKG_SRCDIR = $(topsrcdir)
|
|
|
|
endif
|
|
|
|
|
2011-03-23 22:01:28 +03:00
|
|
|
DIR_TO_BE_PACKAGED ?= ../$(notdir $(topsrcdir))
|
|
|
|
SRC_TAR_EXCLUDE_PATHS += \
|
|
|
|
--exclude=".hg*" \
|
|
|
|
--exclude="CVS" \
|
|
|
|
--exclude=".cvs*" \
|
|
|
|
--exclude=".mozconfig*" \
|
|
|
|
--exclude="*.pyc" \
|
|
|
|
--exclude="$(MOZILLA_DIR)/Makefile" \
|
|
|
|
--exclude="$(MOZILLA_DIR)/dist"
|
|
|
|
ifdef MOZ_OBJDIR
|
|
|
|
SRC_TAR_EXCLUDE_PATHS += --exclude="$(MOZ_OBJDIR)"
|
|
|
|
endif
|
2008-11-12 15:45:23 +03:00
|
|
|
CREATE_SOURCE_TAR = $(TAR) -c --owner=0 --group=0 --numeric-owner \
|
2011-03-23 22:01:28 +03:00
|
|
|
--mode="go-w" $(SRC_TAR_EXCLUDE_PATHS) -f
|
2008-11-12 15:45:23 +03: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:
|
|
|
|
@echo "Packaging source tarball..."
|
2011-03-23 22:01:28 +03:00
|
|
|
mkdir -p $(DIST)/$(PKG_SRCPACK_PATH)
|
|
|
|
(cd $(MOZ_PKG_SRCDIR) && $(CREATE_SOURCE_TAR) - $(DIR_TO_BE_PACKAGED)) | bzip2 -vf > $(DIST)/$(PKG_SRCPACK_PATH)$(PKG_SRCPACK_BASENAME).tar.bz2
|