Permalink
Switch branches/tags
last-mozilla-central chromium-import-r15462 chromium-import-latest bsmedberg-static-xpcom-registration-base UPDATE_PACKAGING_R14 UPDATE_PACKAGING_R13 UPDATE_PACKAGING_R12 UPDATE_PACKAGING_R11_1_MU UPDATE_PACKAGING_R11 UPDATE_PACKAGING_R10 UPDATE_PACKAGING_R9 UPDATE_PACKAGING_R8 UPDATE_PACKAGING_R7 UPDATE_PACKAGING_R6 UPDATE_PACKAGING_R5 THUNDERBIRD_3_3a3_RELEASE THUNDERBIRD_3_3a3_BUILD1 THUNDERBIRD_3_3a2_RELEASE THUNDERBIRD_3_3a2_BUILD1 THUNDERBIRD_3_3a1_RELEASE THUNDERBIRD_3_3a1_BUILD1 SEAMONKEY_2_1b2_RELEASE SEAMONKEY_2_1b2_BUILD2 SEAMONKEY_2_1b2_BUILD1 SEAMONKEY_2_1b1_RELEASE SEAMONKEY_2_1b1_BUILD2 SEAMONKEY_2_1b1_BUILD1 SEAMONKEY_2_1a3_RELEASE SEAMONKEY_2_1a3_BUILD2 SEAMONKEY_2_1a3_BUILD1 SEAMONKEY_2_1a2_RELEASE SEAMONKEY_2_1a2_BUILD2 SEAMONKEY_2_1a2_BUILD1 SEAMONKEY_2_1a1_RELEASE SEAMONKEY_2_1a1_BUILD1 SEAMONKEY_2_0a1_RELEASE SEAMONKEY_2_0a1_BUILD1 PRE_MOBILE_MERGE_20110406 PRE_MOBILE_MERGE MOZILLA_1_9_a7_BASE MOZILLA_1_9_a6_BASE MOZILLA_1_9_a4_BASE GECKO_2_1_BASE GECKO_2_0_BASE GECKO_1_9_2_BASE GECKO_1_9_1_BASE FIREFOX_4_0b12_RELEASE FIREFOX_4_0b12_BUILD1 FIREFOX_4_0b11_RELEASE FIREFOX_4_0b11_BUILD3 FIREFOX_4_0b11_BUILD2 FIREFOX_4_0b11_BUILD1 FIREFOX_4_0b10_RELEASE FIREFOX_4_0b10_BUILD1 FIREFOX_4_0b9_RELEASE FIREFOX_4_0b9_BUILD1 FIREFOX_4_0b8_RELEASE FIREFOX_4_0b8_BUILD1 FIREFOX_4_0b7_RELEASE FIREFOX_4_0b7_BUILD1 FIREFOX_4_0b6_RELEASE FIREFOX_4_0b6_BUILD2 FIREFOX_4_0b6_BUILD1 FIREFOX_4_0b5_RELEASE FIREFOX_4_0b5_BUILD1 FIREFOX_4_0b4_RELEASE FIREFOX_4_0b4_BUILD3 FIREFOX_4_0b4_BUILD2 FIREFOX_4_0b4_BUILD1 FIREFOX_4_0b3_RELEASE FIREFOX_4_0b3_BUILD3 FIREFOX_4_0b3_BUILD2 FIREFOX_4_0b3_BUILD1 FIREFOX_4_0b2_RELEASE FIREFOX_4_0b2_BUILD1 FIREFOX_4_0b1_RELEASE FIREFOX_4_0b1_BUILD2 FIREFOX_4_0b1_BUILD1 FIREFOX_3_7a5_RELEASE FIREFOX_3_7a5_BUILD1 FIREFOX_3_7a4_RELEASE FIREFOX_3_7a4_BUILD1 FIREFOX_3_7a3_RELEASE FIREFOX_3_7a3_BUILD1 FIREFOX_3_7a2_RELEASE FIREFOX_3_7a2_BUILD1 FIREFOX_3_7a1_RELEASE FIREFOX_3_7a1_BUILD1 FIREFOX_3_6a1_RELEASE FIREFOX_3_6a1_BUILD1 FIREFOX_3_1b2_RELEASE FIREFOX_3_1b2_BUILD2 FIREFOX_3_1b2_BUILD1 FIREFOX_3_1b1_RELEASE FIREFOX_3_1b1_BUILD1 FIREFOX_3_1a2_RELEASE FIREFOX_3_1a2_BUILD1 FIREFOX_3_1a1_RELEASE FIREFOX_3_1a1_BUILD2 FIREFOX_3_1a1_BUILD1
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
220 lines (187 sloc) 6.44 KB
#
# 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/.
DEPTH = .
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
ifndef .PYMAKE
ifeq (,$(MAKE_VERSION))
$(error GNU Make is required)
endif
ifeq (,$(filter-out 3.78 3.79,$(MAKE_VERSION)))
$(error GNU Make 3.80 or higher is required)
endif
endif
include $(DEPTH)/config/autoconf.mk
default::
TIERS += base
#
# tier "base" - basic setup
#
tier_base_dirs = \
config \
build \
probes \
mfbt \
$(NULL)
ifndef LIBXUL_SDK
ifeq (android,$(MOZ_WIDGET_TOOLKIT))
tier_base_dirs += \
other-licenses/android \
other-licenses/skia-npapi \
$(NULL)
endif
ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
tier_base_dirs += \
other-licenses/android \
$(NULL)
endif
ifdef MOZ_MEMORY
tier_base_dirs += memory/jemalloc
tier_base_dirs += memory/build
endif
tier_base_dirs += \
mozglue \
memory/mozalloc \
$(NULL)
endif
ifdef COMPILE_ENVIRONMENT
include $(topsrcdir)/$(MOZ_BUILD_APP)/build.mk
endif
include $(topsrcdir)/config/config.mk
GARBAGE_DIRS += dist _javagen _profile _tests staticlib
DIST_GARBAGE = config.cache config.log config.status config-defs.h \
config/autoconf.mk \
unallmakefiles mozilla-config.h \
netwerk/necko-config.h xpcom/xpcom-config.h xpcom/xpcom-private.h \
$(topsrcdir)/.mozconfig.mk $(topsrcdir)/.mozconfig.out
default alldep all:: $(topsrcdir)/configure config.status
$(RM) -r $(DIST)/sdk
$(RM) -r $(DIST)/include
$(RM) -r $(DIST)/private
$(RM) -r $(DIST)/public
$(RM) -r $(DIST)/bin/components
$(RM) -r _tests
$(topsrcdir)/configure: $(topsrcdir)/configure.in
@echo "STOP! configure.in has changed, and your configure is out of date."
@echo "Please rerun autoconf and re-configure your build directory."
@echo "To ignore this message, touch 'configure' in the source directory,"
@echo "but your build might not succeed."
@exit 1
config.status: $(topsrcdir)/configure
@echo "STOP! configure has changed and needs to be run in this build directory."
@echo "Please rerun configure."
@echo "To ignore this message, touch 'config.status' in the build directory,"
@echo "but your build might not succeed."
@exit 1
# Build pseudo-external modules first when export is explicitly called
export::
$(RM) -r $(DIST)/sdk
$(MAKE) -C config export
$(MAKE) tier_nspr
ifdef ENABLE_TESTS
# Additional makefile targets to call automated test suites
include $(topsrcdir)/testing/testsuite-targets.mk
endif
include $(topsrcdir)/config/rules.mk
distclean::
cat unallmakefiles | $(XARGS) rm -f
$(RM) unallmakefiles $(DIST_GARBAGE)
ifeq ($(OS_ARCH),WINNT)
# we want to copy PDB files on Windows
MAKE_SYM_STORE_ARGS := -c --vcs-info
ifdef PDBSTR_PATH
MAKE_SYM_STORE_ARGS += -i
endif
DUMP_SYMS_BIN ?= $(topsrcdir)/toolkit/crashreporter/tools/win32/dump_syms_vc$(_MSC_VER).exe
# PDB files don't get moved to dist, so we need to scan the whole objdir
MAKE_SYM_STORE_PATH := .
endif
ifeq ($(OS_ARCH),Darwin)
# need to pass arch flags for universal builds
ifdef UNIVERSAL_BINARY
MAKE_SYM_STORE_ARGS := -c -a "i386 x86_64" --vcs-info
MAKE_SYM_STORE_PATH := $(DIST)/universal
else
MAKE_SYM_STORE_ARGS := -c -a $(OS_TEST) --vcs-info
MAKE_SYM_STORE_PATH := $(DIST)/bin
endif
DUMP_SYMS_BIN ?= $(DIST)/host/bin/dump_syms
endif
ifeq (,$(filter-out Linux SunOS,$(OS_ARCH)))
MAKE_SYM_STORE_ARGS := -c --vcs-info
DUMP_SYMS_BIN ?= $(DIST)/host/bin/dump_syms
MAKE_SYM_STORE_PATH := $(DIST)/bin
endif
SYM_STORE_SOURCE_DIRS := $(topsrcdir)
include $(topsrcdir)/toolkit/mozapps/installer/package-name.mk
ifdef MOZ_SYMBOLS_EXTRA_BUILDID
EXTRA_BUILDID := -$(MOZ_SYMBOLS_EXTRA_BUILDID)
endif
SYMBOL_INDEX_NAME = \
$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)-$(OS_TARGET)-$(BUILDID)-$(CPU_ARCH)$(EXTRA_BUILDID)-symbols.txt
buildsymbols:
ifdef MOZ_CRASHREPORTER
ifdef USE_ELF_HACK
ifeq (mobile,$(MOZ_BUILD_APP))
$(MAKE) -C mobile/xul/installer elfhack
else
$(MAKE) -C $(MOZ_BUILD_APP)/installer elfhack
endif
endif
echo building symbol store
$(RM) -r $(DIST)/crashreporter-symbols
$(RM) "$(DIST)/$(SYMBOL_ARCHIVE_BASENAME).zip"
$(NSINSTALL) -D $(DIST)/crashreporter-symbols
OBJCOPY="$(OBJCOPY)" \
$(PYTHON) $(topsrcdir)/toolkit/crashreporter/tools/symbolstore.py \
$(MAKE_SYM_STORE_ARGS) \
$(foreach dir,$(SYM_STORE_SOURCE_DIRS),-s $(dir)) \
$(DUMP_SYMS_BIN) \
$(DIST)/crashreporter-symbols \
$(MAKE_SYM_STORE_PATH) > \
$(DIST)/crashreporter-symbols/$(SYMBOL_INDEX_NAME)
echo packing symbols
$(NSINSTALL) -D $(DIST)/$(PKG_PATH)
cd $(DIST)/crashreporter-symbols && \
zip -r9D "../$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).zip" .
cd $(DIST)/crashreporter-symbols && \
grep "sym" $(SYMBOL_INDEX_NAME) > $(SYMBOL_INDEX_NAME).tmp && \
mv $(SYMBOL_INDEX_NAME).tmp $(SYMBOL_INDEX_NAME)
cd $(DIST)/crashreporter-symbols && \
zip -r9D "../$(PKG_PATH)$(SYMBOL_ARCHIVE_BASENAME).zip" . -i "*.sym" -i "*.txt"
endif # MOZ_CRASHREPORTER
uploadsymbols:
ifdef MOZ_CRASHREPORTER
$(SHELL) $(topsrcdir)/toolkit/crashreporter/tools/upload_symbols.sh $(SYMBOL_INDEX_NAME) "$(DIST)/$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).zip"
endif
codesighs:
$(MAKE) -C $(MOZ_BUILD_APP)/installer codesighs
# defined in package-name.mk
export MOZ_SOURCE_STAMP
#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
ifneq ($(OS_ARCH)_$(GNU_CC), WINNT_)
# No point in clobbering if PGO has been explicitly disabled.
ifndef NO_PROFILE_GUIDED_OPTIMIZE
maybe_clobber_profiledbuild: clean
else
maybe_clobber_profiledbuild:
endif
else
maybe_clobber_profiledbuild:
$(RM) $(DIST)/bin/*.pgc
find $(DIST)/$(MOZ_APP_NAME) -name "*.pgc" -exec mv {} $(DIST)/bin \;
endif
# put in our default gdbinit so that the gdb debugging experience is happier.
libs:: .gdbinit
$(INSTALL) $< $(DIST)/bin
.PHONY: maybe_clobber_profiledbuild
# Look for R_386_PC32 relocations in shared libs, these
# break x86_64 builds and SELinux users.
ifeq ($(OS_TARGET)_$(TARGET_XPCOM_ABI),Linux_x86-gcc3)
scheck::
@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
endif