Bumping manifests a=b2g-bump
[gecko.git] / build / Makefile.in
blob496afdbfc6ecb9bd2c98acc47de625683022ff28
2 # This Source Code Form is subject to the terms of the Mozilla Public
3 # License, v. 2.0. If a copy of the MPL was not distributed with this
4 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 USE_RCS_MK := 1
7 include $(topsrcdir)/config/makefiles/makeutils.mk
9 ifdef MOZ_APP_BASENAME
10 DIST_FILES = $(srcdir)/application.ini
12 ifneq (android,$(MOZ_WIDGET_TOOLKIT))
13 ifdef MOZ_UPDATER
14 DIST_FILES += update-settings.ini
15 endif
16 endif
18 ifdef LIBXUL_SDK
19 APP_INI_DEPS = $(LIBXUL_DIST)/bin/platform.ini
20 else
21 APP_INI_DEPS = $(topsrcdir)/config/milestone.txt
22 endif
24 APP_BUILDID := $(shell cat $(DEPTH)/config/buildid)
25 APP_INI_DEPS += $(DEPTH)/config/buildid
27 DEFINES += -DAPP_BUILDID=$(APP_BUILDID)
29 APP_INI_DEPS += $(DEPTH)/config/autoconf.mk
31 MOZ_SOURCE_STAMP := $(firstword $(shell cd $(topsrcdir)/$(MOZ_BUILD_APP)/.. && hg parent --template='{node|short}\n' 2>/dev/null))
32 ifdef MOZ_SOURCE_STAMP
33 DEFINES += -DMOZ_SOURCE_STAMP='$(MOZ_SOURCE_STAMP)'
34 endif
36 ifdef MOZILLA_OFFICIAL
37 source_repo ?= $(call getSourceRepo,$(topsrcdir)/$(MOZ_BUILD_APP)/..)
38 ifneq (,$(source_repo))
39 DEFINES += -DMOZ_SOURCE_REPO='$(source_repo)'
40 endif
41 endif
43 endif
45 # Put a useful .gdbinit in the bin directory, to be picked up automatically
46 # by GDB when we debug executables there.
47 # NOTE: Keep .gdbinit in the topsrcdir for people who run gdb from the topsrcdir.
48 GDBINIT_FILES := $(topsrcdir)/.gdbinit
49 GDBINIT_OBJDIR_FILES = $(topsrcdir)/.gdbinit
50 GDBINIT_DEST = $(FINAL_TARGET)
52 # needs to be absolute to be distinct from $(topsrcdir)/.gdbinit
53 GDBINIT_OBJDIR_DEST = $(abspath $(DEPTH))
54 INSTALL_TARGETS += GDBINIT GDBINIT_OBJDIR
56 # Put a .lldbinit in the bin directory and the objdir, to be picked up
57 # automatically by LLDB when we debug executables using either of those two
58 # directories as the current working directory. The .lldbinit file will
59 # load $(topsrcdir)/.lldbinit, which is where the actual debugging commands are.
60 LLDBINIT_OBJDIR := .lldbinit.in
61 LLDBINIT_OBJDIR_PATH = $(DEPTH)
62 LLDBINIT_OBJDIR_FLAGS += -Dtopsrcdir=$(abspath $(topsrcdir))
63 PP_TARGETS += LLDBINIT_OBJDIR
65 LLDBINIT_FINAL_TARGET_FILES := $(DEPTH)/.lldbinit
66 LLDBINIT_FINAL_TARGET_DEST = $(FINAL_TARGET)
67 INSTALL_TARGETS += LLDBINIT_FINAL_TARGET
69 ifeq (1_1,$(MOZ_ASAN)_$(CLANG_CL))
70 # Install the clang-cl runtime library for ASAN next to the binaries we produce.
71 CLANG_RT_ASAN_FILES := $(MOZ_CLANG_RT_ASAN_LIB_PATH)
72 CLANG_RT_ASAN_DEST = $(FINAL_TARGET)
73 INSTALL_TARGETS += CLANG_RT_ASAN
74 endif
76 ifdef MOZTTDIR
77 # Install the Firefox OS fonts.
78 include $(MOZTTDIR)/fonts.mk
79 MOZTT_DEST = $(FINAL_TARGET)/fonts
80 MOZTT_FILES = $(patsubst external/moztt/%,$(MOZTTDIR)/%,$(filter external/moztt/%,$(subst :, ,$(PRODUCT_COPY_FILES))))
81 INSTALL_TARGETS += MOZTT
82 endif
84 include $(topsrcdir)/config/rules.mk
86 TARGET_DEPTH = ..
87 include $(srcdir)/automation-build.mk
89 ifdef MOZ_APP_BASENAME
90 $(FINAL_TARGET)/application.ini: $(APP_INI_DEPS)
92 ifdef MOZ_APP_STATIC_INI
93 application.ini.h: appini_header.py $(FINAL_TARGET)/application.ini
94 $(PYTHON) $^ > $@
95 export:: application.ini.h
96 GARBAGE += application.ini.h
97 endif
98 endif
100 libs:: automation.py
102 ifdef MOZ_VALGRIND
103 _VALGRIND_DIR = $(DEPTH)/_valgrind
104 GARBAGE_DIRS += $(_VALGRIND_DIR)
106 _VALGRIND_FILES = \
107 $(topsrcdir)/build/valgrind/cross-architecture.sup \
108 $(topsrcdir)/build/valgrind/i386-redhat-linux-gnu.sup \
109 $(topsrcdir)/build/valgrind/x86_64-redhat-linux-gnu.sup \
110 $(NULL)
112 libs:: $(_VALGRIND_FILES)
113 $(INSTALL) $^ $(_VALGRIND_DIR)
114 endif
116 ifneq (,$(ENABLE_TESTS)$(MOZ_DMD))
117 libs:: $(topsrcdir)/tools/rb/fix_stack_using_bpsyms.py
118 $(INSTALL) $< $(DIST)/bin
120 ifeq ($(OS_ARCH),Darwin)
121 libs:: $(topsrcdir)/tools/rb/fix_macosx_stack.py
122 $(INSTALL) $< $(DIST)/bin
123 endif
125 ifeq ($(OS_ARCH),Linux)
126 libs:: $(topsrcdir)/tools/rb/fix_linux_stack.py
127 $(INSTALL) $< $(DIST)/bin
128 endif
129 endif # ENABLE_TESTS or MOZ_DMD
131 ifdef ENABLE_TESTS
132 GARBAGE += $(srcdir)/automationutils.pyc
133 endif # ENABLE_TESTS
135 ifdef MOZ_DMD
136 libs:: $(topsrcdir)/memory/replace/dmd/dmd.py
137 $(INSTALL) $< $(DIST)/bin
138 endif