Bug 1250991 - Indent code; r=mshal

This file is so hard to read. Add some indentation to make it easier to
grok.

I also converted some useless tabs to spaces.

MozReview-Commit-ID: 7DFKeW66uD6
This commit is contained in:
Gregory Szorc 2016-02-25 10:40:31 -08:00
parent a8b099d552
commit 47dcc3b9a5

View File

@ -113,136 +113,140 @@ CREATE_FINAL_TAR = $(TAR) -c --owner=0 --group=0 --numeric-owner \
UNPACK_TAR = tar -xf- UNPACK_TAR = tar -xf-
ifeq ($(MOZ_PKG_FORMAT),TAR) ifeq ($(MOZ_PKG_FORMAT),TAR)
PKG_SUFFIX = .tar PKG_SUFFIX = .tar
INNER_MAKE_PACKAGE = $(CREATE_FINAL_TAR) - $(MOZ_PKG_DIR) > $(PACKAGE) INNER_MAKE_PACKAGE = $(CREATE_FINAL_TAR) - $(MOZ_PKG_DIR) > $(PACKAGE)
INNER_UNMAKE_PACKAGE = $(UNPACK_TAR) < $(UNPACKAGE) INNER_UNMAKE_PACKAGE = $(UNPACK_TAR) < $(UNPACKAGE)
MAKE_SDK = $(CREATE_FINAL_TAR) - $(MOZ_APP_NAME)-sdk > '$(SDK)' MAKE_SDK = $(CREATE_FINAL_TAR) - $(MOZ_APP_NAME)-sdk > '$(SDK)'
endif endif
ifeq ($(MOZ_PKG_FORMAT),TGZ) ifeq ($(MOZ_PKG_FORMAT),TGZ)
PKG_SUFFIX = .tar.gz PKG_SUFFIX = .tar.gz
INNER_MAKE_PACKAGE = $(CREATE_FINAL_TAR) - $(MOZ_PKG_DIR) | gzip -vf9 > $(PACKAGE) INNER_MAKE_PACKAGE = $(CREATE_FINAL_TAR) - $(MOZ_PKG_DIR) | gzip -vf9 > $(PACKAGE)
INNER_UNMAKE_PACKAGE = gunzip -c $(UNPACKAGE) | $(UNPACK_TAR) INNER_UNMAKE_PACKAGE = gunzip -c $(UNPACKAGE) | $(UNPACK_TAR)
MAKE_SDK = $(CREATE_FINAL_TAR) - $(MOZ_APP_NAME)-sdk | gzip -vf9 > '$(SDK)' MAKE_SDK = $(CREATE_FINAL_TAR) - $(MOZ_APP_NAME)-sdk | gzip -vf9 > '$(SDK)'
endif endif
ifeq ($(MOZ_PKG_FORMAT),BZ2) ifeq ($(MOZ_PKG_FORMAT),BZ2)
PKG_SUFFIX = .tar.bz2 PKG_SUFFIX = .tar.bz2
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
INNER_MAKE_PACKAGE = $(CREATE_FINAL_TAR) - -C $(STAGEPATH)$(MOZ_PKG_DIR) $(_APPNAME) | bzip2 -vf > $(PACKAGE) INNER_MAKE_PACKAGE = $(CREATE_FINAL_TAR) - -C $(STAGEPATH)$(MOZ_PKG_DIR) $(_APPNAME) | bzip2 -vf > $(PACKAGE)
else else
INNER_MAKE_PACKAGE = $(CREATE_FINAL_TAR) - $(MOZ_PKG_DIR) | bzip2 -vf > $(PACKAGE) INNER_MAKE_PACKAGE = $(CREATE_FINAL_TAR) - $(MOZ_PKG_DIR) | bzip2 -vf > $(PACKAGE)
endif endif
INNER_UNMAKE_PACKAGE = bunzip2 -c $(UNPACKAGE) | $(UNPACK_TAR) INNER_UNMAKE_PACKAGE = bunzip2 -c $(UNPACKAGE) | $(UNPACK_TAR)
MAKE_SDK = $(CREATE_FINAL_TAR) - $(MOZ_APP_NAME)-sdk | bzip2 -vf > '$(SDK)' MAKE_SDK = $(CREATE_FINAL_TAR) - $(MOZ_APP_NAME)-sdk | bzip2 -vf > '$(SDK)'
endif endif
ifeq ($(MOZ_PKG_FORMAT),ZIP) ifeq ($(MOZ_PKG_FORMAT),ZIP)
ifdef MOZ_EXTERNAL_SIGNING_FORMAT ifdef MOZ_EXTERNAL_SIGNING_FORMAT
# We can't use sha2signcode on zip files # We can't use sha2signcode on zip files
MOZ_EXTERNAL_SIGNING_FORMAT := $(filter-out sha2signcode,$(MOZ_EXTERNAL_SIGNING_FORMAT)) MOZ_EXTERNAL_SIGNING_FORMAT := $(filter-out sha2signcode,$(MOZ_EXTERNAL_SIGNING_FORMAT))
endif endif
PKG_SUFFIX = .zip PKG_SUFFIX = .zip
INNER_MAKE_PACKAGE = $(ZIP) -r9D $(PACKAGE) $(MOZ_PKG_DIR) \ INNER_MAKE_PACKAGE = $(ZIP) -r9D $(PACKAGE) $(MOZ_PKG_DIR) \
-x \*/.mkdir.done -x \*/.mkdir.done
INNER_UNMAKE_PACKAGE = $(UNZIP) $(UNPACKAGE) INNER_UNMAKE_PACKAGE = $(UNZIP) $(UNPACKAGE)
MAKE_SDK = $(call py_action,zip,'$(SDK)' $(MOZ_APP_NAME)-sdk) MAKE_SDK = $(call py_action,zip,'$(SDK)' $(MOZ_APP_NAME)-sdk)
endif endif
ifeq ($(MOZ_PKG_FORMAT),SFX7Z) ifeq ($(MOZ_PKG_FORMAT),SFX7Z)
PKG_SUFFIX = .exe PKG_SUFFIX = .exe
INNER_MAKE_PACKAGE = rm -f app.7z && \ INNER_MAKE_PACKAGE = rm -f app.7z && \
mv $(MOZ_PKG_DIR) core && \ mv $(MOZ_PKG_DIR) core && \
$(CYGWIN_WRAPPER) 7z a -r -t7z app.7z -mx -m0=BCJ2 -m1=LZMA:d25 \ $(CYGWIN_WRAPPER) 7z a -r -t7z app.7z -mx -m0=BCJ2 -m1=LZMA:d25 \
-m2=LZMA:d19 -m3=LZMA:d19 -mb0:1 -mb0s1:2 -mb0s2:3 && \ -m2=LZMA:d19 -m3=LZMA:d19 -mb0:1 -mb0s1:2 -mb0s2:3 && \
mv core $(MOZ_PKG_DIR) && \ mv core $(MOZ_PKG_DIR) && \
cat $(SFX_HEADER) app.7z > $(PACKAGE) && \ cat $(SFX_HEADER) app.7z > $(PACKAGE) && \
chmod 0755 $(PACKAGE) chmod 0755 $(PACKAGE)
INNER_UNMAKE_PACKAGE = $(CYGWIN_WRAPPER) 7z x $(UNPACKAGE) core && \ INNER_UNMAKE_PACKAGE = $(CYGWIN_WRAPPER) 7z x $(UNPACKAGE) core && \
mv core $(MOZ_PKG_DIR) mv core $(MOZ_PKG_DIR)
endif endif
#Create an RPM file #Create an RPM file
ifeq ($(MOZ_PKG_FORMAT),RPM) ifeq ($(MOZ_PKG_FORMAT),RPM)
PKG_SUFFIX = .rpm PKG_SUFFIX = .rpm
MOZ_NUMERIC_APP_VERSION = $(shell echo $(MOZ_PKG_VERSION) | sed 's/[^0-9.].*//' ) 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.]*//' ) MOZ_RPM_RELEASE = $(shell echo $(MOZ_PKG_VERSION) | sed 's/[0-9.]*//' )
RPMBUILD_TOPDIR=$(ABS_DIST)/rpmbuild RPMBUILD_TOPDIR=$(ABS_DIST)/rpmbuild
RPMBUILD_RPMDIR=$(ABS_DIST) RPMBUILD_RPMDIR=$(ABS_DIST)
RPMBUILD_SRPMDIR=$(ABS_DIST) RPMBUILD_SRPMDIR=$(ABS_DIST)
RPMBUILD_SOURCEDIR=$(RPMBUILD_TOPDIR)/SOURCES RPMBUILD_SOURCEDIR=$(RPMBUILD_TOPDIR)/SOURCES
RPMBUILD_SPECDIR=$(topsrcdir)/toolkit/mozapps/installer/linux/rpm RPMBUILD_SPECDIR=$(topsrcdir)/toolkit/mozapps/installer/linux/rpm
RPMBUILD_BUILDDIR=$(ABS_DIST)/.. RPMBUILD_BUILDDIR=$(ABS_DIST)/..
SPEC_FILE = $(RPMBUILD_SPECDIR)/mozilla.spec SPEC_FILE = $(RPMBUILD_SPECDIR)/mozilla.spec
RPM_INCIDENTALS=$(topsrcdir)/toolkit/mozapps/installer/linux/rpm RPM_INCIDENTALS=$(topsrcdir)/toolkit/mozapps/installer/linux/rpm
RPM_CMD = \ RPM_CMD = \
echo Creating RPM && \ echo Creating RPM && \
$(PYTHON) -m mozbuild.action.preprocessor \ $(PYTHON) -m mozbuild.action.preprocessor \
-DMOZ_APP_NAME=$(MOZ_APP_NAME) \ -DMOZ_APP_NAME=$(MOZ_APP_NAME) \
-DMOZ_APP_DISPLAYNAME='$(MOZ_APP_DISPLAYNAME)' \ -DMOZ_APP_DISPLAYNAME='$(MOZ_APP_DISPLAYNAME)' \
$(RPM_INCIDENTALS)/mozilla.desktop \ $(RPM_INCIDENTALS)/mozilla.desktop \
-o $(RPMBUILD_SOURCEDIR)/$(MOZ_APP_NAME).desktop && \ -o $(RPMBUILD_SOURCEDIR)/$(MOZ_APP_NAME).desktop && \
rm -rf $(ABS_DIST)/$(TARGET_CPU) && \ rm -rf $(ABS_DIST)/$(TARGET_CPU) && \
$(RPMBUILD) -bb \ $(RPMBUILD) -bb \
$(SPEC_FILE) \ $(SPEC_FILE) \
--target $(TARGET_CPU) \ --target $(TARGET_CPU) \
--buildroot $(RPMBUILD_TOPDIR)/BUILDROOT \ --buildroot $(RPMBUILD_TOPDIR)/BUILDROOT \
--define 'moz_app_name $(MOZ_APP_NAME)' \ --define 'moz_app_name $(MOZ_APP_NAME)' \
--define 'moz_app_displayname $(MOZ_APP_DISPLAYNAME)' \ --define 'moz_app_displayname $(MOZ_APP_DISPLAYNAME)' \
--define 'moz_app_version $(MOZ_APP_VERSION)' \ --define 'moz_app_version $(MOZ_APP_VERSION)' \
--define 'moz_numeric_app_version $(MOZ_NUMERIC_APP_VERSION)' \ --define 'moz_numeric_app_version $(MOZ_NUMERIC_APP_VERSION)' \
--define 'moz_rpm_release $(MOZ_RPM_RELEASE)' \ --define 'moz_rpm_release $(MOZ_RPM_RELEASE)' \
--define 'buildid $(BUILDID)' \ --define 'buildid $(BUILDID)' \
--define 'moz_source_repo $(shell awk '$$2 == "MOZ_SOURCE_REPO" {print $$3}' $(DEPTH)/source-repo.h)' \ --define 'moz_source_repo $(shell awk '$$2 == "MOZ_SOURCE_REPO" {print $$3}' $(DEPTH)/source-repo.h)' \
--define 'moz_source_stamp $(shell awk '$$2 == "MOZ_SOURCE_STAMP" {print $$3}' $(DEPTH)/source-repo.h)' \ --define 'moz_source_stamp $(shell awk '$$2 == "MOZ_SOURCE_STAMP" {print $$3}' $(DEPTH)/source-repo.h)' \
--define 'moz_branding_directory $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)' \ --define 'moz_branding_directory $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)' \
--define '_topdir $(RPMBUILD_TOPDIR)' \ --define '_topdir $(RPMBUILD_TOPDIR)' \
--define '_rpmdir $(RPMBUILD_RPMDIR)' \ --define '_rpmdir $(RPMBUILD_RPMDIR)' \
--define '_sourcedir $(RPMBUILD_SOURCEDIR)' \ --define '_sourcedir $(RPMBUILD_SOURCEDIR)' \
--define '_specdir $(RPMBUILD_SPECDIR)' \ --define '_specdir $(RPMBUILD_SPECDIR)' \
--define '_srcrpmdir $(RPMBUILD_SRPMDIR)' \ --define '_srcrpmdir $(RPMBUILD_SRPMDIR)' \
--define '_builddir $(RPMBUILD_BUILDDIR)' \ --define '_builddir $(RPMBUILD_BUILDDIR)' \
--define '_prefix $(prefix)' \ --define '_prefix $(prefix)' \
--define '_libdir $(libdir)' \ --define '_libdir $(libdir)' \
--define '_bindir $(bindir)' \ --define '_bindir $(bindir)' \
--define '_datadir $(datadir)' \ --define '_datadir $(datadir)' \
--define '_installdir $(installdir)' --define '_installdir $(installdir)'
ifdef ENABLE_TESTS ifdef ENABLE_TESTS
RPM_CMD += \ RPM_CMD += \
--define 'createtests yes' \ --define 'createtests yes' \
--define '_testsinstalldir $(shell basename $(installdir))' --define '_testsinstalldir $(shell basename $(installdir))'
endif endif
ifdef INSTALL_SDK ifdef INSTALL_SDK
RPM_CMD += \ RPM_CMD += \
--define 'createdevel yes' \ --define 'createdevel yes' \
--define '_idldir $(idldir)' \ --define '_idldir $(idldir)' \
--define '_sdkdir $(sdkdir)' \ --define '_sdkdir $(sdkdir)' \
--define '_includedir $(includedir)' --define '_includedir $(includedir)'
endif endif
#For each of the main, tests, sdk rpms we want to make sure that #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 #if they exist that they are in objdir/dist/ and that they get
#uploaded and that they are beside the other build artifacts #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) MAIN_RPM= $(MOZ_APP_NAME)-$(MOZ_NUMERIC_APP_VERSION)-$(MOZ_RPM_RELEASE).$(BUILDID).$(TARGET_CPU)$(PKG_SUFFIX)
UPLOAD_EXTRA_FILES += $(MAIN_RPM) UPLOAD_EXTRA_FILES += $(MAIN_RPM)
RPM_CMD += && mv $(TARGET_CPU)/$(MAIN_RPM) $(ABS_DIST)/ RPM_CMD += && mv $(TARGET_CPU)/$(MAIN_RPM) $(ABS_DIST)/
ifdef ENABLE_TESTS ifdef ENABLE_TESTS
TESTS_RPM=$(MOZ_APP_NAME)-tests-$(MOZ_NUMERIC_APP_VERSION)-$(MOZ_RPM_RELEASE).$(BUILDID).$(TARGET_CPU)$(PKG_SUFFIX) TESTS_RPM=$(MOZ_APP_NAME)-tests-$(MOZ_NUMERIC_APP_VERSION)-$(MOZ_RPM_RELEASE).$(BUILDID).$(TARGET_CPU)$(PKG_SUFFIX)
UPLOAD_EXTRA_FILES += $(TESTS_RPM) UPLOAD_EXTRA_FILES += $(TESTS_RPM)
RPM_CMD += && mv $(TARGET_CPU)/$(TESTS_RPM) $(ABS_DIST)/ RPM_CMD += && mv $(TARGET_CPU)/$(TESTS_RPM) $(ABS_DIST)/
endif endif
ifdef INSTALL_SDK ifdef INSTALL_SDK
SDK_RPM=$(MOZ_APP_NAME)-devel-$(MOZ_NUMERIC_APP_VERSION)-$(MOZ_RPM_RELEASE).$(BUILDID).$(TARGET_CPU)$(PKG_SUFFIX) SDK_RPM=$(MOZ_APP_NAME)-devel-$(MOZ_NUMERIC_APP_VERSION)-$(MOZ_RPM_RELEASE).$(BUILDID).$(TARGET_CPU)$(PKG_SUFFIX)
UPLOAD_EXTRA_FILES += $(SDK_RPM) UPLOAD_EXTRA_FILES += $(SDK_RPM)
RPM_CMD += && mv $(TARGET_CPU)/$(SDK_RPM) $(ABS_DIST)/ RPM_CMD += && mv $(TARGET_CPU)/$(SDK_RPM) $(ABS_DIST)/
endif endif
INNER_MAKE_PACKAGE = $(RPM_CMD) INNER_MAKE_PACKAGE = $(RPM_CMD)
#Avoiding rpm repacks, going to try creating/uploading xpi in rpm files instead #Avoiding rpm repacks, going to try creating/uploading xpi in rpm files instead
INNER_UNMAKE_PACKAGE = $(error Try using rpm2cpio and cpio) INNER_UNMAKE_PACKAGE = $(error Try using rpm2cpio and cpio)
endif #Create an RPM file endif #Create an RPM file
@ -539,70 +543,70 @@ INNER_UNMAKE_PACKAGE = \
endif endif
ifeq ($(MOZ_PKG_FORMAT),DMG) ifeq ($(MOZ_PKG_FORMAT),DMG)
PKG_SUFFIX = .dmg PKG_SUFFIX = .dmg
_ABS_MOZSRCDIR = $(shell cd $(MOZILLA_DIR) && pwd) _ABS_MOZSRCDIR = $(shell cd $(MOZILLA_DIR) && pwd)
PKG_DMG_SOURCE = $(STAGEPATH)$(MOZ_PKG_DIR) PKG_DMG_SOURCE = $(STAGEPATH)$(MOZ_PKG_DIR)
INNER_MAKE_PACKAGE = $(call py_action,make_dmg,'$(PKG_DMG_SOURCE)' '$(PACKAGE)') INNER_MAKE_PACKAGE = $(call py_action,make_dmg,'$(PKG_DMG_SOURCE)' '$(PACKAGE)')
INNER_UNMAKE_PACKAGE = \ INNER_UNMAKE_PACKAGE = \
set -ex; \ set -ex; \
rm -rf $(ABS_DIST)/unpack.tmp; \ rm -rf $(ABS_DIST)/unpack.tmp; \
mkdir -p $(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; \ $(_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); \ rsync -a '$(ABS_DIST)/unpack.tmp/$(_APPNAME)' $(MOZ_PKG_DIR); \
test -n '$(MOZ_PKG_MAC_DSSTORE)' && \ test -n '$(MOZ_PKG_MAC_DSSTORE)' && \
rsync -a '$(ABS_DIST)/unpack.tmp/.DS_Store' '$(MOZ_PKG_MAC_DSSTORE)'; \ rsync -a '$(ABS_DIST)/unpack.tmp/.DS_Store' '$(MOZ_PKG_MAC_DSSTORE)'; \
test -n '$(MOZ_PKG_MAC_BACKGROUND)' && \ test -n '$(MOZ_PKG_MAC_BACKGROUND)' && \
rsync -a '$(ABS_DIST)/unpack.tmp/.background/$(notdir $(MOZ_PKG_MAC_BACKGROUND))' '$(MOZ_PKG_MAC_BACKGROUND)'; \ rsync -a '$(ABS_DIST)/unpack.tmp/.background/$(notdir $(MOZ_PKG_MAC_BACKGROUND))' '$(MOZ_PKG_MAC_BACKGROUND)'; \
test -n '$(MOZ_PKG_MAC_ICON)' && \ test -n '$(MOZ_PKG_MAC_ICON)' && \
rsync -a '$(ABS_DIST)/unpack.tmp/.VolumeIcon.icns' '$(MOZ_PKG_MAC_ICON)'; \ rsync -a '$(ABS_DIST)/unpack.tmp/.VolumeIcon.icns' '$(MOZ_PKG_MAC_ICON)'; \
rm -rf $(ABS_DIST)/unpack.tmp; \ rm -rf $(ABS_DIST)/unpack.tmp; \
if test -n '$(MOZ_PKG_MAC_RSRC)' ; then \ if test -n '$(MOZ_PKG_MAC_RSRC)' ; then \
cp $(UNPACKAGE) $(MOZ_PKG_APPNAME).tmp.dmg && \ cp $(UNPACKAGE) $(MOZ_PKG_APPNAME).tmp.dmg && \
hdiutil unflatten $(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; }; } && \ { /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; \ rm -f $(MOZ_PKG_APPNAME).tmp.dmg; \
fi fi
# The plst and blkx resources are skipped because they belong to each # The plst and blkx resources are skipped because they belong to each
# individual dmg and are created by hdiutil. # individual dmg and are created by hdiutil.
SDK_SUFFIX = .tar.bz2 SDK_SUFFIX = .tar.bz2
MAKE_SDK = $(CREATE_FINAL_TAR) - $(MOZ_APP_NAME)-sdk | bzip2 -vf > '$(SDK)' MAKE_SDK = $(CREATE_FINAL_TAR) - $(MOZ_APP_NAME)-sdk | bzip2 -vf > '$(SDK)'
endif endif
ifdef MOZ_INTERNAL_SIGNING_FORMAT ifdef MOZ_INTERNAL_SIGNING_FORMAT
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)) 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))
ifeq (WINNT,$(OS_ARCH)) ifeq (WINNT,$(OS_ARCH))
MOZ_SIGN_PREPARED_PACKAGE_CMD += --nsscmd '$(ABS_DIST)/bin/shlibsign$(BIN_SUFFIX) -v -i' MOZ_SIGN_PREPARED_PACKAGE_CMD += --nsscmd '$(ABS_DIST)/bin/shlibsign$(BIN_SUFFIX) -v -i'
endif endif
endif endif
# For final GPG / authenticode signing / dmg signing if required # For final GPG / authenticode signing / dmg signing if required
ifdef MOZ_EXTERNAL_SIGNING_FORMAT ifdef MOZ_EXTERNAL_SIGNING_FORMAT
MOZ_SIGN_PACKAGE_CMD=$(MOZ_SIGN_CMD) $(foreach f,$(MOZ_EXTERNAL_SIGNING_FORMAT),-f $(f)) MOZ_SIGN_PACKAGE_CMD=$(MOZ_SIGN_CMD) $(foreach f,$(MOZ_EXTERNAL_SIGNING_FORMAT),-f $(f))
endif endif
ifdef MOZ_SIGN_PREPARED_PACKAGE_CMD ifdef MOZ_SIGN_PREPARED_PACKAGE_CMD
ifeq (Darwin, $(OS_ARCH)) ifeq (Darwin, $(OS_ARCH))
MAKE_PACKAGE = (cd $(STAGEPATH)$(MOZ_PKG_DIR)$(_RESPATH) && $(CREATE_PRECOMPLETE_CMD)) \ MAKE_PACKAGE = (cd $(STAGEPATH)$(MOZ_PKG_DIR)$(_RESPATH) && $(CREATE_PRECOMPLETE_CMD)) \
&& cd ./$(PKG_DMG_SOURCE) && $(MOZ_SIGN_PREPARED_PACKAGE_CMD) $(MOZ_MACBUNDLE_NAME) \ && cd ./$(PKG_DMG_SOURCE) && $(MOZ_SIGN_PREPARED_PACKAGE_CMD) $(MOZ_MACBUNDLE_NAME) \
&& cd $(PACKAGE_BASE_DIR) && $(INNER_MAKE_PACKAGE) && cd $(PACKAGE_BASE_DIR) && $(INNER_MAKE_PACKAGE)
else else
MAKE_PACKAGE = $(MOZ_SIGN_PREPARED_PACKAGE_CMD) $(MOZ_PKG_DIR) \ MAKE_PACKAGE = $(MOZ_SIGN_PREPARED_PACKAGE_CMD) $(MOZ_PKG_DIR) \
&& $(or $(call MAKE_SIGN_EME_VOUCHER,$(STAGEPATH)$(MOZ_PKG_DIR)),true) \ && $(or $(call MAKE_SIGN_EME_VOUCHER,$(STAGEPATH)$(MOZ_PKG_DIR)),true) \
&& (cd $(STAGEPATH)$(MOZ_PKG_DIR)$(_RESPATH) && $(CREATE_PRECOMPLETE_CMD)) \ && (cd $(STAGEPATH)$(MOZ_PKG_DIR)$(_RESPATH) && $(CREATE_PRECOMPLETE_CMD)) \
&& $(INNER_MAKE_PACKAGE) && $(INNER_MAKE_PACKAGE)
endif #Darwin endif #Darwin
else else
MAKE_PACKAGE = (cd $(STAGEPATH)$(MOZ_PKG_DIR)$(_RESPATH) && $(CREATE_PRECOMPLETE_CMD)) && $(INNER_MAKE_PACKAGE) MAKE_PACKAGE = (cd $(STAGEPATH)$(MOZ_PKG_DIR)$(_RESPATH) && $(CREATE_PRECOMPLETE_CMD)) && $(INNER_MAKE_PACKAGE)
endif endif
ifdef MOZ_SIGN_PACKAGE_CMD ifdef MOZ_SIGN_PACKAGE_CMD
MAKE_PACKAGE += && $(MOZ_SIGN_PACKAGE_CMD) '$(PACKAGE)' MAKE_PACKAGE += && $(MOZ_SIGN_PACKAGE_CMD) '$(PACKAGE)'
endif endif
ifdef MOZ_SIGN_CMD ifdef MOZ_SIGN_CMD
MAKE_SDK += && $(MOZ_SIGN_CMD) -f gpg '$(SDK)' MAKE_SDK += && $(MOZ_SIGN_CMD) -f gpg '$(SDK)'
endif endif
NO_PKG_FILES += \ NO_PKG_FILES += \
@ -643,23 +647,23 @@ NO_PKG_FILES += \
# If a manifest has not been supplied, the following # If a manifest has not been supplied, the following
# files should be excluded from the package too # files should be excluded from the package too
ifndef MOZ_PKG_MANIFEST ifndef MOZ_PKG_MANIFEST
NO_PKG_FILES += ssltunnel* NO_PKG_FILES += ssltunnel*
endif endif
ifdef MOZ_DMD ifdef MOZ_DMD
NO_PKG_FILES += SmokeDMD NO_PKG_FILES += SmokeDMD
endif endif
DEFINES += -DDLL_PREFIX=$(DLL_PREFIX) -DDLL_SUFFIX=$(DLL_SUFFIX) -DBIN_SUFFIX=$(BIN_SUFFIX) DEFINES += -DDLL_PREFIX=$(DLL_PREFIX) -DDLL_SUFFIX=$(DLL_SUFFIX) -DBIN_SUFFIX=$(BIN_SUFFIX)
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
DEFINES += -DDIR_MACOS=Contents/MacOS/ -DDIR_RESOURCES=Contents/Resources/ DEFINES += -DDIR_MACOS=Contents/MacOS/ -DDIR_RESOURCES=Contents/Resources/
else else
DEFINES += -DDIR_MACOS= -DDIR_RESOURCES= DEFINES += -DDIR_MACOS= -DDIR_RESOURCES=
endif endif
ifdef MOZ_FOLD_LIBS ifdef MOZ_FOLD_LIBS
DEFINES += -DMOZ_FOLD_LIBS=1 DEFINES += -DMOZ_FOLD_LIBS=1
endif endif
GARBAGE += $(DIST)/$(PACKAGE) $(PACKAGE) GARBAGE += $(DIST)/$(PACKAGE) $(PACKAGE)
@ -675,32 +679,32 @@ PKG_ARG = , '$(pkg)'
# from the now deprecated MOZ_PKG_MANIFEST_P when MOZ_PKG_MANIFEST is not # from the now deprecated MOZ_PKG_MANIFEST_P when MOZ_PKG_MANIFEST is not
# defined. # defined.
ifndef MOZ_PKG_MANIFEST ifndef MOZ_PKG_MANIFEST
ifdef MOZ_PKG_MANIFEST_P ifdef MOZ_PKG_MANIFEST_P
MOZ_PKG_MANIFEST := $(MOZ_PKG_MANIFEST_P) MOZ_PKG_MANIFEST := $(MOZ_PKG_MANIFEST_P)
endif # MOZ_PKG_MANIFEST_P endif # MOZ_PKG_MANIFEST_P
endif # MOZ_PKG_MANIFEST endif # MOZ_PKG_MANIFEST
# For smooth transition of comm-central # For smooth transition of comm-central
ifndef MOZ_PACKAGER_FORMAT ifndef MOZ_PACKAGER_FORMAT
ifeq ($(MOZ_CHROME_FILE_FORMAT),flat) ifeq ($(MOZ_CHROME_FILE_FORMAT),flat)
ifdef MOZ_OMNIJAR ifdef MOZ_OMNIJAR
MOZ_PACKAGER_FORMAT := omni MOZ_PACKAGER_FORMAT := omni
else else
MOZ_PACKAGER_FORMAT := flat MOZ_PACKAGER_FORMAT := flat
endif endif
endif endif
endif endif
ifndef MOZ_PACKAGER_FORMAT ifndef MOZ_PACKAGER_FORMAT
MOZ_PACKAGER_FORMAT = $(error MOZ_PACKAGER_FORMAT is not set) MOZ_PACKAGER_FORMAT = $(error MOZ_PACKAGER_FORMAT is not set)
endif endif
ifneq (android,$(MOZ_WIDGET_TOOLKIT)) ifneq (android,$(MOZ_WIDGET_TOOLKIT))
OPTIMIZEJARS = 1 OPTIMIZEJARS = 1
ifneq (gonk,$(MOZ_WIDGET_TOOLKIT)) ifneq (gonk,$(MOZ_WIDGET_TOOLKIT))
ifdef NIGHTLY_BUILD ifdef NIGHTLY_BUILD
DISABLE_JAR_COMPRESSION = 1 DISABLE_JAR_COMPRESSION = 1
endif endif
endif endif
endif endif
# A js binary is needed to perform verification of JavaScript minification. # A js binary is needed to perform verification of JavaScript minification.
@ -708,13 +712,13 @@ endif
# (such as release automation) can provide their own js binary to enable # (such as release automation) can provide their own js binary to enable
# verification when cross-compiling. # verification when cross-compiling.
ifndef JS_BINARY ifndef JS_BINARY
ifndef CROSS_COMPILE ifndef CROSS_COMPILE
JS_BINARY = $(wildcard $(DIST)/bin/js) JS_BINARY = $(wildcard $(DIST)/bin/js)
endif endif
endif endif
ifeq ($(OS_TARGET), WINNT) ifeq ($(OS_TARGET), WINNT)
INSTALLER_PACKAGE = $(DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe INSTALLER_PACKAGE = $(DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe
endif endif
# These are necessary because some of our packages/installers contain spaces # These are necessary because some of our packages/installers contain spaces
@ -736,13 +740,13 @@ CHECKSUM_FILES = $(CHECKSUM_FILE)
# Upload MAR tools only if AB_CD is unset or en_US # Upload MAR tools only if AB_CD is unset or en_US
ifeq (,$(AB_CD:en-US=)) ifeq (,$(AB_CD:en-US=))
ifeq (WINNT,$(OS_TARGET)) ifeq (WINNT,$(OS_TARGET))
UPLOAD_EXTRA_FILES += host/bin/mar.exe UPLOAD_EXTRA_FILES += host/bin/mar.exe
UPLOAD_EXTRA_FILES += host/bin/mbsdiff.exe UPLOAD_EXTRA_FILES += host/bin/mbsdiff.exe
else else
UPLOAD_EXTRA_FILES += host/bin/mar UPLOAD_EXTRA_FILES += host/bin/mar
UPLOAD_EXTRA_FILES += host/bin/mbsdiff UPLOAD_EXTRA_FILES += host/bin/mbsdiff
endif endif
endif endif
UPLOAD_FILES= \ UPLOAD_FILES= \
@ -772,41 +776,41 @@ UPLOAD_FILES= \
$(if $(UPLOAD_EXTRA_FILES), $(foreach f, $(UPLOAD_EXTRA_FILES), $(wildcard $(DIST)/$(f)))) $(if $(UPLOAD_EXTRA_FILES), $(foreach f, $(UPLOAD_EXTRA_FILES), $(wildcard $(DIST)/$(f))))
ifdef MOZ_CRASHREPORTER_UPLOAD_FULL_SYMBOLS ifdef MOZ_CRASHREPORTER_UPLOAD_FULL_SYMBOLS
UPLOAD_FILES += \ UPLOAD_FILES += \
$(call QUOTED_WILDCARD,$(DIST)/$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).zip) $(call QUOTED_WILDCARD,$(DIST)/$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).zip)
endif endif
ifdef MOZ_CODE_COVERAGE ifdef MOZ_CODE_COVERAGE
UPLOAD_FILES += \ UPLOAD_FILES += \
$(call QUOTED_WILDCARD,$(DIST)/$(PKG_PATH)$(CODE_COVERAGE_ARCHIVE_BASENAME).zip) $(call QUOTED_WILDCARD,$(DIST)/$(PKG_PATH)$(CODE_COVERAGE_ARCHIVE_BASENAME).zip)
endif endif
ifdef UNIFY_DIST ifdef UNIFY_DIST
UNIFY_ARCH := $(notdir $(patsubst %/,%,$(dir $(UNIFY_DIST)))) UNIFY_ARCH := $(notdir $(patsubst %/,%,$(dir $(UNIFY_DIST))))
UPLOAD_FILES += \ UPLOAD_FILES += \
$(call QUOTED_WILDCARD,$(UNIFY_DIST)/$(SDK_PATH)$(PKG_BASENAME)-$(UNIFY_ARCH).sdk$(SDK_SUFFIX)) \ $(call QUOTED_WILDCARD,$(UNIFY_DIST)/$(SDK_PATH)$(PKG_BASENAME)-$(UNIFY_ARCH).sdk$(SDK_SUFFIX)) \
$(call QUOTED_WILDCARD,$(UNIFY_DIST)/$(SDK_PATH)$(PKG_BASENAME)-$(UNIFY_ARCH).sdk$(SDK_SUFFIX).asc) $(call QUOTED_WILDCARD,$(UNIFY_DIST)/$(SDK_PATH)$(PKG_BASENAME)-$(UNIFY_ARCH).sdk$(SDK_SUFFIX).asc)
endif endif
SIGN_CHECKSUM_CMD= SIGN_CHECKSUM_CMD=
ifdef MOZ_SIGN_CMD ifdef MOZ_SIGN_CMD
# If we're signing with gpg, we'll have a bunch of extra detached signatures to # 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 # upload. We also want to sign our checksums file
SIGN_CHECKSUM_CMD=$(MOZ_SIGN_CMD) -f gpg $(CHECKSUM_FILE) SIGN_CHECKSUM_CMD=$(MOZ_SIGN_CMD) -f gpg $(CHECKSUM_FILE)
CHECKSUM_FILES += $(CHECKSUM_FILE).asc CHECKSUM_FILES += $(CHECKSUM_FILE).asc
UPLOAD_FILES += $(call QUOTED_WILDCARD,$(DIST)/$(COMPLETE_MAR).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,$(wildcard $(DIST)/$(PARTIAL_MAR).asc))
UPLOAD_FILES += $(call QUOTED_WILDCARD,$(INSTALLER_PACKAGE).asc) UPLOAD_FILES += $(call QUOTED_WILDCARD,$(INSTALLER_PACKAGE).asc)
UPLOAD_FILES += $(call QUOTED_WILDCARD,$(DIST)/$(PACKAGE).asc) UPLOAD_FILES += $(call QUOTED_WILDCARD,$(DIST)/$(PACKAGE).asc)
endif endif
ifdef MOZ_STUB_INSTALLER ifdef MOZ_STUB_INSTALLER
UPLOAD_FILES += $(call QUOTED_WILDCARD,$(DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe) UPLOAD_FILES += $(call QUOTED_WILDCARD,$(DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe)
endif endif
ifndef MOZ_PKG_SRCDIR ifndef MOZ_PKG_SRCDIR
MOZ_PKG_SRCDIR = $(topsrcdir) MOZ_PKG_SRCDIR = $(topsrcdir)
endif endif
SRC_TAR_PREFIX = $(MOZ_APP_NAME)-$(MOZ_PKG_VERSION) SRC_TAR_PREFIX = $(MOZ_APP_NAME)-$(MOZ_PKG_VERSION)
@ -819,7 +823,7 @@ SRC_TAR_EXCLUDE_PATHS += \
--exclude='$(MOZILLA_DIR)/Makefile' \ --exclude='$(MOZILLA_DIR)/Makefile' \
--exclude='$(MOZILLA_DIR)/dist' --exclude='$(MOZILLA_DIR)/dist'
ifdef MOZ_OBJDIR ifdef MOZ_OBJDIR
SRC_TAR_EXCLUDE_PATHS += --exclude='$(MOZ_OBJDIR)' SRC_TAR_EXCLUDE_PATHS += --exclude='$(MOZ_OBJDIR)'
endif endif
CREATE_SOURCE_TAR = $(TAR) -c --owner=0 --group=0 --numeric-owner \ CREATE_SOURCE_TAR = $(TAR) -c --owner=0 --group=0 --numeric-owner \
--mode=go-w $(SRC_TAR_EXCLUDE_PATHS) --transform='s,^\./,$(SRC_TAR_PREFIX)/,' -f --mode=go-w $(SRC_TAR_EXCLUDE_PATHS) --transform='s,^\./,$(SRC_TAR_PREFIX)/,' -f
@ -832,9 +836,9 @@ SOURCE_UPLOAD_FILES = $(SOURCE_TAR)
HG ?= hg HG ?= hg
CREATE_HG_BUNDLE_CMD = $(HG) -v -R $(topsrcdir) bundle --base null CREATE_HG_BUNDLE_CMD = $(HG) -v -R $(topsrcdir) bundle --base null
ifdef HG_BUNDLE_REVISION ifdef HG_BUNDLE_REVISION
CREATE_HG_BUNDLE_CMD += -r $(HG_BUNDLE_REVISION) CREATE_HG_BUNDLE_CMD += -r $(HG_BUNDLE_REVISION)
endif endif
CREATE_HG_BUNDLE_CMD += $(HG_BUNDLE_FILE) CREATE_HG_BUNDLE_CMD += $(HG_BUNDLE_FILE)
ifdef UPLOAD_HG_BUNDLE ifdef UPLOAD_HG_BUNDLE
SOURCE_UPLOAD_FILES += $(HG_BUNDLE_FILE) SOURCE_UPLOAD_FILES += $(HG_BUNDLE_FILE)
endif endif