2007-03-22 10:30:00 -07:00
#
2012-05-21 04:12:37 -07: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/.
2007-03-22 10:30:00 -07:00
2009-03-11 13:32:10 -07:00
i f e q ( , $( MAKE_VERSION ) )
$( error GNU Make is required )
e n d i f
2013-10-16 15:55:14 -07:00
make_min_ver := 3.81
i f n e q ( $( make_min_ver ) , $( firstword $ ( sort $ ( make_min_ver ) $ ( MAKE_VERSION ) ) ) )
$( error GNU Make $ ( make_min_ver ) or higher is required )
2009-03-11 13:32:10 -07:00
e n d i f
2013-05-17 10:54:53 -07:00
export TOPLEVEL_BUILD := 1
2008-12-19 06:50:24 -08:00
default ::
2007-03-22 10:30:00 -07:00
2014-01-13 14:38:40 -08:00
i f d e f M O Z _ B U I L D _ A P P
2007-03-22 10:30:00 -07:00
i n c l u d e $( topsrcdir ) / $( MOZ_BUILD_APP ) / b u i l d . m k
2014-01-13 14:38:40 -08:00
e n d i f
2007-03-22 10:30:00 -07:00
2008-12-19 06:50:24 -08:00
i n c l u d e $( topsrcdir ) / c o n f i g / c o n f i g . m k
2015-02-13 05:11:57 -08:00
GARBAGE_DIRS += _javagen _profile staticlib
2012-08-28 23:55:58 -07:00
DIST_GARBAGE = config.cache config.log config.status* config-defs.h \
Bug 627277 - Remove (broken) BeOS support. r=biesi,dwitte,gavin,joe,jorendorff,josh,khuey,mfinkle,neil,Pike,roc,shaver,smontagu,taras
2011-02-19 11:10:24 -08:00
config/autoconf.mk \
2013-08-21 23:55:59 -07:00
mozilla-config.h \
2008-01-28 14:05:47 -08:00
netwerk/necko-config.h xpcom/xpcom-config.h xpcom/xpcom-private.h \
2013-09-04 17:01:44 -07:00
.mozconfig.mk
2007-03-22 10:30:00 -07:00
2014-02-10 17:37:47 -08:00
i f d e f J S _ S T A N D A L O N E
2014-01-13 14:38:40 -08:00
configure_dir = $( topsrcdir) /js/src
e l s e
configure_dir = $( topsrcdir)
e n d i f
Bug 1239217 - Make the RecursiveMake build system create backend files generically. r=gps
The current rule is only for "backend.RecursiveMakeBackend", but, with
the current default of generating both the RecursiveMake and FasterMake
backends, the command creates/refreshes both backends. This is, in fact,
how the FasterMake backend is refreshed in most cases.
Moreover, with an hybrid backends, the generated file is not
"backend.RecursiveMakeBackend" anymore, so we need a more generic way to
handle this.
Furthermore, it's not necessarily desirable for all backends to have a
dependency file to handle the dependencies to refresh the backend, so
generate a plain list instead. This has the side effect of making `mach
build-backend --diff` more readable for changes to that file.
Finally, make the backend.* files created like any other backend file,
such that its diff appears in the `mach build-backend --diff` output.
2016-01-21 17:02:48 -08:00
BUILD_BACKEND_FILES := $( addprefix backend.,$( addsuffix Backend,$( BUILD_BACKENDS) ) )
2015-11-30 00:43:06 -08:00
i f n d e f T E S T _ M O Z B U I L D
2013-04-12 07:03:06 -07:00
i f n d e f M O Z _ P R O F I L E _ U S E
Bug 1239217 - Make the RecursiveMake build system create backend files generically. r=gps
The current rule is only for "backend.RecursiveMakeBackend", but, with
the current default of generating both the RecursiveMake and FasterMake
backends, the command creates/refreshes both backends. This is, in fact,
how the FasterMake backend is refreshed in most cases.
Moreover, with an hybrid backends, the generated file is not
"backend.RecursiveMakeBackend" anymore, so we need a more generic way to
handle this.
Furthermore, it's not necessarily desirable for all backends to have a
dependency file to handle the dependencies to refresh the backend, so
generate a plain list instead. This has the side effect of making `mach
build-backend --diff` more readable for changes to that file.
Finally, make the backend.* files created like any other backend file,
such that its diff appears in the `mach build-backend --diff` output.
2016-01-21 17:02:48 -08:00
# We need to explicitly put BUILD_BACKEND_FILES here otherwise the rule in
# rules.mk doesn't run early enough.
$(TIERS) binaries :: CLOBBER $( configure_dir ) /configure config .status $( BUILD_BACKEND_FILES )
2014-02-10 17:37:47 -08:00
i f n d e f J S _ S T A N D A L O N E
2015-03-09 23:16:51 -07:00
i f d e f C O M P I L E _ E N V I R O N M E N T
2014-11-05 16:29:11 -08:00
$(TIERS) binaries :: $( topsrcdir ) /js /src /configure js /src /config .status
2013-09-30 16:25:38 -07:00
e n d i f
2013-04-12 07:03:06 -07:00
e n d i f
2014-03-20 19:52:25 -07:00
e n d i f
2015-11-30 00:43:06 -08:00
e n d i f
2008-12-19 06:50:24 -08:00
2014-02-10 17:37:47 -08:00
i f d e f J S _ S T A N D A L O N E
2014-01-13 14:38:40 -08:00
.PHONY : CLOBBER
CLOBBER :
e l s e
2013-03-29 10:34:58 -07:00
CLOBBER : $( topsrcdir ) /CLOBBER
2013-12-02 13:34:21 -08:00
@echo 'STOP! The CLOBBER file has changed.'
@echo 'Please run the build through a sanctioned build wrapper, such as'
@echo '"mach build" or client.mk.'
2013-03-29 10:34:58 -07:00
@exit 1
2014-01-13 14:38:40 -08:00
e n d i f
2013-03-29 10:34:58 -07:00
2014-02-10 17:37:47 -08:00
$(topsrcdir)/configure : $( topsrcdir ) /configure .in
$(topsrcdir)/js/src/configure : $( topsrcdir ) /js /src /configure .in
$(topsrcdir)/configure $(topsrcdir)/js/src/configure :
@echo 'STOP! $^ has changed, and your configure is out of date.'
2013-12-02 13:34:21 -08:00
@echo 'Please rerun autoconf and re-configure your build directory.'
2014-02-10 17:37:47 -08:00
@echo 'To ignore this message, touch "$@",'
2013-12-02 13:34:21 -08:00
@echo 'but your build might not succeed.'
2010-01-22 16:39:13 -08:00
@exit 1
2014-01-13 14:38:40 -08:00
config.status : $( configure_dir ) /configure
2014-02-10 17:37:47 -08:00
js/src/config.status : $( topsrcdir ) /js /src /configure
config.status js/src/config.status :
@echo 'STOP! $^ has changed and needs to be run again.'
@echo 'Please rerun it.'
@echo 'To ignore this message, touch "$(CURDIR)/$@",'
2013-12-02 13:34:21 -08:00
@echo 'but your build might not succeed.'
2010-01-22 16:39:13 -08:00
@exit 1
2013-10-29 14:53:52 -07:00
# Regenerate the build backend if it is out of date. We only have this rule in
# this main make file because having it in rules.mk and applied to partial tree
# builds resulted in a world of hurt. Gory details are in bug 877308.
#
# The mach build driver will ensure the backend is up to date for partial tree
# builds. This cleanly avoids most of the pain.
2015-11-30 00:43:06 -08:00
i f n d e f T E S T _ M O Z B U I L D
Bug 1239217 - Make the RecursiveMake build system create backend files generically. r=gps
The current rule is only for "backend.RecursiveMakeBackend", but, with
the current default of generating both the RecursiveMake and FasterMake
backends, the command creates/refreshes both backends. This is, in fact,
how the FasterMake backend is refreshed in most cases.
Moreover, with an hybrid backends, the generated file is not
"backend.RecursiveMakeBackend" anymore, so we need a more generic way to
handle this.
Furthermore, it's not necessarily desirable for all backends to have a
dependency file to handle the dependencies to refresh the backend, so
generate a plain list instead. This has the side effect of making `mach
build-backend --diff` more readable for changes to that file.
Finally, make the backend.* files created like any other backend file,
such that its diff appears in the `mach build-backend --diff` output.
2016-01-21 17:02:48 -08:00
.PHONY : backend
backend : $( BUILD_BACKEND_FILES )
# A traditional rule would look like this:
# backend.%:
# @echo do stuff
#
# But with -j<n>, and multiple items in BUILD_BACKEND_FILES, the command would
# run multiple times in parallel.
#
# "Fortunately", make has some weird semantics for pattern rules: if there are
# multiple targets in a pattern rule and each of them is matched at most once,
# the command will only run once. So:
# backend%RecursiveMakeBackend backend%FasterMakeBackend:
# @echo do stuff
# backend: backend.RecursiveMakeBackend backend.FasterMakeBackend
# would only execute the command once.
#
# Credit where due: http://stackoverflow.com/questions/2973445/gnu-makefile-rule-generating-a-few-targets-from-a-single-source-file/3077254#3077254
$(subst .,%,$(BUILD_BACKEND_FILES)) :
2013-12-02 13:34:21 -08:00
@echo 'Build configuration changed. Regenerating backend.'
2013-11-06 13:16:44 -08:00
$( PYTHON) config.status
2013-10-29 14:53:52 -07:00
Bug 1239217 - Make the RecursiveMake build system create backend files generically. r=gps
The current rule is only for "backend.RecursiveMakeBackend", but, with
the current default of generating both the RecursiveMake and FasterMake
backends, the command creates/refreshes both backends. This is, in fact,
how the FasterMake backend is refreshed in most cases.
Moreover, with an hybrid backends, the generated file is not
"backend.RecursiveMakeBackend" anymore, so we need a more generic way to
handle this.
Furthermore, it's not necessarily desirable for all backends to have a
dependency file to handle the dependencies to refresh the backend, so
generate a plain list instead. This has the side effect of making `mach
build-backend --diff` more readable for changes to that file.
Finally, make the backend.* files created like any other backend file,
such that its diff appears in the `mach build-backend --diff` output.
2016-01-21 17:02:48 -08:00
Makefile : $( BUILD_BACKEND_FILES )
2013-10-29 14:53:52 -07:00
@$( TOUCH) $@
Bug 1239217 - Make the RecursiveMake build system create backend files generically. r=gps
The current rule is only for "backend.RecursiveMakeBackend", but, with
the current default of generating both the RecursiveMake and FasterMake
backends, the command creates/refreshes both backends. This is, in fact,
how the FasterMake backend is refreshed in most cases.
Moreover, with an hybrid backends, the generated file is not
"backend.RecursiveMakeBackend" anymore, so we need a more generic way to
handle this.
Furthermore, it's not necessarily desirable for all backends to have a
dependency file to handle the dependencies to refresh the backend, so
generate a plain list instead. This has the side effect of making `mach
build-backend --diff` more readable for changes to that file.
Finally, make the backend.* files created like any other backend file,
such that its diff appears in the `mach build-backend --diff` output.
2016-01-21 17:02:48 -08:00
d e f i n e b u i l d _ b a c k e n d _ r u l e
$(1) : $$( shell cat $ ( 1) .in )
e n d e f
$( foreach file ,$ ( BUILD_BACKEND_FILES ) ,$ ( eval $ ( call build_backend_rule ,$ ( file ) ) ) )
2013-10-29 14:53:52 -07:00
Bug 1239217 - Make the RecursiveMake build system create backend files generically. r=gps
The current rule is only for "backend.RecursiveMakeBackend", but, with
the current default of generating both the RecursiveMake and FasterMake
backends, the command creates/refreshes both backends. This is, in fact,
how the FasterMake backend is refreshed in most cases.
Moreover, with an hybrid backends, the generated file is not
"backend.RecursiveMakeBackend" anymore, so we need a more generic way to
handle this.
Furthermore, it's not necessarily desirable for all backends to have a
dependency file to handle the dependencies to refresh the backend, so
generate a plain list instead. This has the side effect of making `mach
build-backend --diff` more readable for changes to that file.
Finally, make the backend.* files created like any other backend file,
such that its diff appears in the `mach build-backend --diff` output.
2016-01-21 17:02:48 -08:00
default :: $( BUILD_BACKEND_FILES )
2015-11-30 00:43:06 -08:00
e n d i f
2013-10-29 14:53:52 -07:00
2014-09-04 18:27:39 -07:00
install_manifests := \
2016-01-21 18:13:26 -08:00
$( addprefix dist/,branding idl include public private sdk xpi-stage) \
2014-09-04 18:27:39 -07:00
_tests \
$( NULL)
2016-01-21 18:13:26 -08:00
# Skip the dist/bin install manifest when using the hybrid
# FasterMake/RecursiveMake backend. This is a hack until bug 1241744 moves
# xpidl handling to FasterMake in that case, mechanically making the dist/bin
# install manifest non-existent (non-existent manifests being skipped)
i f e q ( , $( filter FasterMake +RecursiveMake ,$ ( BUILD_BACKENDS ) ) )
install_manifests += dist/bin
e n d i f
2013-09-16 17:49:44 -07:00
install_manifest_depends = \
CLOBBER \
2014-01-13 14:38:40 -08:00
$( configure_dir) /configure \
2013-09-16 17:49:44 -07:00
config.status \
Bug 1239217 - Make the RecursiveMake build system create backend files generically. r=gps
The current rule is only for "backend.RecursiveMakeBackend", but, with
the current default of generating both the RecursiveMake and FasterMake
backends, the command creates/refreshes both backends. This is, in fact,
how the FasterMake backend is refreshed in most cases.
Moreover, with an hybrid backends, the generated file is not
"backend.RecursiveMakeBackend" anymore, so we need a more generic way to
handle this.
Furthermore, it's not necessarily desirable for all backends to have a
dependency file to handle the dependencies to refresh the backend, so
generate a plain list instead. This has the side effect of making `mach
build-backend --diff` more readable for changes to that file.
Finally, make the backend.* files created like any other backend file,
such that its diff appears in the `mach build-backend --diff` output.
2016-01-21 17:02:48 -08:00
$( BUILD_BACKEND_FILES) \
2013-09-16 17:49:44 -07:00
$( NULL)
2014-02-10 17:37:47 -08:00
i f n d e f J S _ S T A N D A L O N E
2015-03-09 23:16:51 -07:00
i f d e f C O M P I L E _ E N V I R O N M E N T
2014-02-10 17:37:47 -08:00
install_manifest_depends += \
$( topsrcdir) /js/src/configure \
js/src/config.status \
$( NULL)
2013-09-30 16:25:38 -07:00
e n d i f
2014-03-20 19:52:25 -07:00
e n d i f
2013-09-30 16:25:38 -07:00
2013-09-16 17:49:44 -07:00
.PHONY : install -manifests
2014-09-04 18:27:39 -07:00
install-manifests : $( addprefix install -,$ ( install_manifests ) )
2013-09-16 17:49:44 -07:00
2016-01-21 18:13:26 -08:00
# If we're using the hybrid FasterMake/RecursiveMake backend, we want
# to recurse in the faster/ directory in parallel of install manifests.
2016-01-23 11:40:24 -08:00
# But dist/idl needs to happen before (cf. dependencies in
# config/faster/rules.mk)
2016-01-21 18:13:26 -08:00
i f n e q ( , $( filter FasterMake +RecursiveMake ,$ ( BUILD_BACKENDS ) ) )
install-manifests : faster
.PHONY : faster
2016-01-23 11:40:24 -08:00
faster : install -dist /idl
2016-01-21 18:13:26 -08:00
$( MAKE) -C faster FASTER_RECURSIVE_MAKE = 1
e n d i f
2014-01-13 14:38:40 -08:00
# process_install_manifest needs to be invoked with --no-remove when building
# js as standalone because automated builds are building nspr separately and
2014-02-10 17:37:47 -08:00
# that would remove the resulting files.
2014-01-13 14:38:40 -08:00
# Eventually, a standalone js build would just be able to build nspr itself,
2014-02-10 17:37:47 -08:00
# removing the need for the former.
2014-02-10 17:37:47 -08:00
i f d e f J S _ S T A N D A L O N E
2014-01-13 14:38:40 -08:00
NO_REMOVE = 1
e n d i f
2016-01-21 01:10:57 -08:00
.PHONY : $( addprefix install -,$ ( subst /,_ ,$ ( install_manifests ) ) )
$(addprefix install-,$(install_manifests)) : install -%: $( install_manifest_depends )
2016-01-21 18:13:26 -08:00
i f n e q ( , $( filter FasterMake +RecursiveMake ,$ ( BUILD_BACKENDS ) ) )
@# If we' re using the hybrid FasterMake/RecursiveMake backend, we want
@# to ensure the FasterMake end doesn' t have install manifests for the
@# same directory, because that would blow up
$( if $( wildcard _build_manifests/install/$( subst /,_,$* ) ) ,$( if $( wildcard faster/install_$( subst /,_,$* ) *) ,$( error FasterMake and RecursiveMake ends of the hybrid build system want to handle $* ) ) )
e n d i f
2016-01-21 01:10:57 -08:00
$( addprefix $( call py_action,process_install_manifest,$( if $( NO_REMOVE) ,--no-remove ) $* ) ,$( wildcard _build_manifests/install/$( subst /,_,$* ) ) )
2013-09-16 17:49:44 -07:00
2015-09-25 01:18:45 -07:00
# Dummy wrapper rule to allow the faster backend to piggy back
2016-01-23 11:39:18 -08:00
$(addprefix install-,$(subst /,_,$(filter dist/%,$(install_manifests)))) : install -dist_ %: install -dist /% ;
2015-09-25 01:18:45 -07:00
2014-09-04 18:27:39 -07:00
# For compatibility
.PHONY : install -tests
install-tests : install -_tests
2014-05-16 11:37:31 -07:00
i n c l u d e $( topsrcdir ) / b u i l d / m o z - a u t o m a t i o n . m k
2013-09-24 15:05:43 -07:00
2015-02-13 05:11:57 -08:00
# dist and _tests should be purged during cleaning. However, we don't want them
# purged during PGO builds because they contain some auto-generated files.
2013-09-24 15:05:43 -07:00
i f n e q ( $( filter -out maybe_clobber_profiledbuild ,$ ( MAKECMDGOALS ) ) , )
2015-02-13 05:11:57 -08:00
GARBAGE_DIRS += dist _tests
2013-09-24 15:05:43 -07:00
e n d i f
2013-09-16 17:49:44 -07:00
# Windows PGO builds don't perform a clean before the 2nd pass. So, we want
# to preserve content for the 2nd pass on Windows. Everywhere else, we always
# process the install manifests as part of export.
2014-09-04 18:27:39 -07:00
# For the binaries rule, not all the install manifests matter, so force only
# the interesting ones to be done.
2013-09-16 17:49:44 -07:00
i f d e f M O Z _ P R O F I L E _ U S E
i f n d e f N O _ P R O F I L E _ G U I D E D _ O P T I M I Z E
i f n e q ( $( OS_ARCH ) _ $( GNU_CC ) , W I N N T _ )
2016-01-21 00:08:53 -08:00
recurse_pre-export :: install -manifests
2013-10-01 16:53:23 -07:00
binaries ::
2014-09-04 18:27:39 -07:00
@$( MAKE) install-manifests NO_REMOVE = 1 install_manifests = dist/include
2013-09-16 17:49:44 -07:00
e n d i f
e n d i f
e l s e # !MOZ_PROFILE_USE (normal build)
2016-01-21 00:08:53 -08:00
recurse_pre-export :: install -manifests
2013-10-01 16:53:23 -07:00
binaries ::
2014-09-04 18:27:39 -07:00
@$( MAKE) install-manifests NO_REMOVE = 1 install_manifests = dist/include
2013-09-16 17:49:44 -07:00
e n d i f
# For historical reasons that are unknown, $(DIST)/sdk is always blown away
# with no regard for PGO passes. This decision could probably be revisited.
2016-01-21 00:08:53 -08:00
recurse_pre-export :: install -dist /sdk
2007-03-22 10:30:00 -07:00
2014-02-10 17:37:47 -08:00
i f n d e f J S _ S T A N D A L O N E
2008-12-19 06:50:24 -08:00
i f d e f E N A B L E _ T E S T S
# Additional makefile targets to call automated test suites
i n c l u d e $( topsrcdir ) / t e s t i n g / t e s t s u i t e - t a r g e t s . m k
e n d i f
2014-01-13 14:38:40 -08:00
e n d i f
2008-12-19 06:50:24 -08:00
2013-09-04 23:07:57 -07:00
default all ::
2014-11-05 16:29:11 -08:00
$( call BUILDSTATUS,TIERS $( TIERS) $( if $( MOZ_AUTOMATION) ,$( MOZ_AUTOMATION_TIERS) ) )
2013-08-20 13:03:39 -07:00
2013-09-05 17:17:59 -07:00
i n c l u d e $( topsrcdir ) / c o n f i g / r u l e s . m k
2013-08-20 13:03:39 -07:00
2007-03-22 10:30:00 -07:00
distclean ::
2013-08-21 23:55:59 -07:00
$( RM) $( DIST_GARBAGE)
2007-03-22 10:30:00 -07:00
2007-05-02 11:45:36 -07:00
i f e q ( $( OS_ARCH ) , W I N N T )
# we want to copy PDB files on Windows
2011-01-25 12:14:30 -08:00
MAKE_SYM_STORE_ARGS := -c --vcs-info
2008-02-26 16:54:47 -08:00
i f d e f P D B S T R _ P A T H
MAKE_SYM_STORE_ARGS += -i
e n d i f
2010-09-23 09:53:52 -07:00
DUMP_SYMS_BIN ?= $( topsrcdir) /toolkit/crashreporter/tools/win32/dump_syms_vc$( _MSC_VER) .exe
2007-06-27 03:25:14 -07:00
# PDB files don't get moved to dist, so we need to scan the whole objdir
MAKE_SYM_STORE_PATH := .
2007-05-02 11:45:36 -07:00
e n d i f
i f e q ( $( OS_ARCH ) , D a r w i n )
# need to pass arch flags for universal builds
i f d e f U N I V E R S A L _ B I N A R Y
2013-12-02 13:34:21 -08:00
MAKE_SYM_STORE_ARGS := -c -a 'i386 x86_64' --vcs-info
2007-06-27 03:25:14 -07:00
MAKE_SYM_STORE_PATH := $( DIST) /universal
2007-05-02 11:45:36 -07:00
e l s e
2009-03-11 08:56:57 -07:00
MAKE_SYM_STORE_ARGS := -c -a $( OS_TEST) --vcs-info
2007-06-27 03:25:14 -07:00
MAKE_SYM_STORE_PATH := $( DIST) /bin
2007-05-02 11:45:36 -07:00
e n d i f
2007-08-19 11:06:53 -07:00
DUMP_SYMS_BIN ?= $( DIST) /host/bin/dump_syms
2007-05-02 11:45:36 -07:00
e n d i f
2008-03-19 18:13:36 -07:00
i f e q ( , $( filter -out Linux SunOS ,$ ( OS_ARCH ) ) )
2009-03-11 08:56:57 -07:00
MAKE_SYM_STORE_ARGS := -c --vcs-info
2007-08-19 11:06:53 -07:00
DUMP_SYMS_BIN ?= $( DIST) /host/bin/dump_syms
2007-06-27 03:25:14 -07:00
MAKE_SYM_STORE_PATH := $( DIST) /bin
2007-05-22 13:20:55 -07:00
e n d i f
2014-07-18 13:33:34 -07:00
MAKE_SYM_STORE_ARGS += --install-manifest= $( DEPTH) /_build_manifests/install/dist_include,$( DIST) /include
2007-03-22 10:30:00 -07:00
2009-02-16 23:46:32 -08:00
SYM_STORE_SOURCE_DIRS := $( topsrcdir)
2009-02-17 06:18:50 -08:00
i n c l u d e $( topsrcdir ) / 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
2007-05-27 18:57:56 -07:00
i f d e f M O Z _ S Y M B O L S _ E X T R A _ B U I L D I D
EXTRA_BUILDID := -$( MOZ_SYMBOLS_EXTRA_BUILDID)
e n d i f
2011-05-19 13:29:50 -07:00
SYMBOL_INDEX_NAME = \
2012-05-14 09:04:37 -07:00
$( MOZ_APP_NAME) -$( MOZ_APP_VERSION) -$( OS_TARGET) -$( BUILDID) -$( CPU_ARCH) $( EXTRA_BUILDID) -symbols.txt
2007-09-10 10:36:17 -07:00
2007-03-22 10:30:00 -07:00
buildsymbols :
2007-08-08 08:19:57 -07:00
i f d e f M O Z _ C R A S H R E P O R T E R
2007-03-26 07:55:27 -07:00
echo building symbol store
2011-04-03 00:16:49 -07:00
$( RM) -r $( DIST) /crashreporter-symbols
2013-12-02 13:34:21 -08:00
$( RM) '$(DIST)/$(SYMBOL_ARCHIVE_BASENAME).zip'
2014-08-01 04:36:47 -07:00
$( RM) '$(DIST)/$(SYMBOL_FULL_ARCHIVE_BASENAME).zip'
2009-03-10 10:36:14 -07:00
$( NSINSTALL) -D $( DIST) /crashreporter-symbols
2013-12-02 13:34:21 -08:00
OBJCOPY = '$(OBJCOPY)' \
2009-02-16 23:46:32 -08:00
$( PYTHON) $( topsrcdir) /toolkit/crashreporter/tools/symbolstore.py \
$( MAKE_SYM_STORE_ARGS) \
$( foreach dir,$( SYM_STORE_SOURCE_DIRS) ,-s $( dir) ) \
$( DUMP_SYMS_BIN) \
2009-03-10 10:36:14 -07:00
$( DIST) /crashreporter-symbols \
2012-08-31 12:52:43 -07:00
$( MAKE_SYM_STORE_PATH) | grep -iv test > \
2009-03-10 10:36:14 -07:00
$( DIST) /crashreporter-symbols/$( SYMBOL_INDEX_NAME)
2007-03-22 10:30:00 -07:00
echo packing symbols
2009-11-04 06:59:47 -08:00
$( NSINSTALL) -D $( DIST) /$( PKG_PATH)
2009-03-10 10:36:14 -07:00
cd $( DIST) /crashreporter-symbols && \
2013-12-02 13:34:21 -08:00
zip -r9D '../$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).zip' . -x '*test*' -x '*Test*'
2010-04-23 13:00:06 -07:00
cd $( DIST) /crashreporter-symbols && \
2013-12-02 13:34:21 -08:00
grep 'sym' $( SYMBOL_INDEX_NAME) > $( SYMBOL_INDEX_NAME) .tmp && \
2010-12-06 07:16:30 -08:00
mv $( SYMBOL_INDEX_NAME) .tmp $( SYMBOL_INDEX_NAME)
cd $( DIST) /crashreporter-symbols && \
2013-12-02 13:34:21 -08:00
zip -r9D '../$(PKG_PATH)$(SYMBOL_ARCHIVE_BASENAME).zip' . -i '*.sym' -i '*.txt' -x '*test*' -x '*Test*'
2007-08-08 08:19:57 -07:00
e n d i f # MOZ_CRASHREPORTER
2007-03-22 10:30:00 -07:00
uploadsymbols :
2007-08-08 08:19:57 -07:00
i f d e f M O Z _ C R A S H R E P O R T E R
2015-02-23 10:48:54 -08:00
i f d e f S O C O R R O _ S Y M B O L _ U P L O A D _ T O K E N _ F I L E
2015-05-27 10:50:04 -07:00
$( PYTHON) -u $( topsrcdir) /toolkit/crashreporter/tools/upload_symbols.py '$(DIST)/$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).zip'
2015-04-24 03:41:56 -07:00
e l s e
2013-12-02 13:34:21 -08:00
$( SHELL) $( topsrcdir) /toolkit/crashreporter/tools/upload_symbols.sh $( SYMBOL_INDEX_NAME) '$(DIST)/$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).zip'
2007-03-22 10:30:00 -07:00
e n d i f
2013-09-19 18:44:11 -07:00
# MOZ_SOURCE_STAMP is defined in package-name.mk with a deferred assignment.
# exporting it makes make run its $(shell) command for each invoked submake,
# so transform it to an immediate assignment.
MOZ_SOURCE_STAMP := $( MOZ_SOURCE_STAMP)
2009-12-20 06:25:48 -08:00
export MOZ_SOURCE_STAMP
2014-01-13 14:38:40 -08:00
e n d i f
2009-12-20 06:25:48 -08:00
2014-07-02 20:15:10 -07:00
.PHONY : update -packaging
2014-05-16 11:37:31 -07:00
update-packaging :
$( MAKE) -C tools/update-packaging
2014-07-02 20:15:10 -07:00
.PHONY : pretty -package
pretty-package :
2014-07-03 19:14:59 -07:00
unset MOZ_SIGN_CMD && $( MAKE) package MOZ_PKG_PRETTYNAMES = 1
2014-07-02 20:15:10 -07:00
.PHONY : pretty -package -tests
pretty-package-tests :
2014-07-03 19:14:59 -07:00
unset MOZ_SIGN_CMD && $( MAKE) package-tests MOZ_PKG_PRETTYNAMES = 1
2014-07-02 20:15:10 -07:00
.PHONY : pretty -l 10n -check
pretty-l10n-check :
2014-07-03 19:14:59 -07:00
unset MOZ_SIGN_CMD && $( MAKE) l10n-check MOZ_PKG_PRETTYNAMES = 1
2014-07-02 20:15:10 -07:00
.PHONY : pretty -update -packaging
pretty-update-packaging :
2014-07-03 19:14:59 -07:00
unset MOZ_SIGN_CMD && $( MAKE) -C tools/update-packaging MOZ_PKG_PRETTYNAMES = 1
2014-07-02 20:15:10 -07:00
2014-07-03 16:28:43 -07:00
.PHONY : pretty -installer
pretty-installer :
2014-07-03 19:14:59 -07:00
unset MOZ_SIGN_CMD && $( MAKE) installer MOZ_PKG_PRETTYNAMES = 1
2014-07-03 16:28:43 -07:00
2011-08-31 07:49:42 -07:00
#XXX: this is a hack, since we don't want to clobber for MSVC
# PGO support, but we can't do this test in client.mk
i f n e q ( $( OS_ARCH ) _ $( GNU_CC ) , W I N N T _ )
# No point in clobbering if PGO has been explicitly disabled.
i f n d e f N O _ P R O F I L E _ G U I D E D _ O P T I M I Z E
maybe_clobber_profiledbuild : clean
e l s e
maybe_clobber_profiledbuild :
e n d i f
e l s e
maybe_clobber_profiledbuild :
2011-11-04 14:26:53 -07:00
$( RM) $( DIST) /bin/*.pgc
2013-12-02 13:34:21 -08:00
find $( DIST) /$( MOZ_APP_NAME) -name '*.pgc' -exec mv { } $( DIST) /bin \;
2011-08-31 07:49:42 -07:00
e n d i f
.PHONY : maybe_clobber_profiledbuild
2010-10-13 05:43:03 -07:00
# Look for R_386_PC32 relocations in shared libs, these
# break x86_64 builds and SELinux users.
i f e q ( $( OS_TARGET ) _ $( TARGET_XPCOM_ABI ) , L i n u x _ x 8 6 - g c c 3 )
2013-12-03 12:51:08 -08:00
check ::
2013-12-02 13:34:21 -08:00
@relcount= ` find $( DIST) /bin -name '*.so' | xargs objdump -R | grep R_386_PC32 | wc -l` && if test $$ relcount -gt 0; then echo 'FAILED: R_386_PC32 relocations detected in a shared library. Did you use a system header without adding it to config/system-headers?' ; exit 1; else echo 'PASSED' ; fi
2010-10-13 05:43:03 -07:00
e n d i f
2012-07-09 06:47:26 -07:00
2014-02-10 17:37:47 -08:00
i f d e f J S _ S T A N D A L O N E
2014-01-13 14:38:40 -08:00
# Delegate js-specific rules to js
check-% :
$( MAKE) -C js/src $@
source-package install :
$( MAKE) -C js/src $@
# Every export rule depends on config/export, but the rule for config/export
# doesn't exist when building js non-standalone.
.PHONY : config /export
config/export :
2014-02-10 17:37:47 -08:00
e n d i f
2013-03-04 11:11:55 -08:00
2014-09-04 01:44:01 -07:00
# There used to be build interdependencies here. They are now in config/recurse.mk