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/.
7 include $(topsrcdir
)/config
/makefiles
/makeutils.mk
10 DIST_FILES
= $(srcdir)/application.ini
12 ifneq (android
,$(MOZ_WIDGET_TOOLKIT
))
14 DIST_FILES
+= update-settings.ini
19 APP_INI_DEPS
= $(LIBXUL_DIST
)/bin
/platform.ini
21 APP_INI_DEPS
= $(topsrcdir
)/config
/milestone.txt
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)'
36 ifdef MOZILLA_OFFICIAL
37 source_repo ?
= $(call getSourceRepo
,$(topsrcdir
)/$(MOZ_BUILD_APP
)/..
)
38 ifneq (,$(source_repo
))
39 DEFINES
+= -DMOZ_SOURCE_REPO
='$(source_repo)'
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
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
84 include $(topsrcdir
)/config
/rules.mk
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
95 export:: application.ini.h
96 GARBAGE
+= application.ini.h
103 _VALGRIND_DIR
= $(DEPTH
)/_valgrind
104 GARBAGE_DIRS
+= $(_VALGRIND_DIR
)
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 \
112 libs
:: $(_VALGRIND_FILES
)
113 $(INSTALL
) $^
$(_VALGRIND_DIR
)
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
125 ifeq ($(OS_ARCH
),Linux
)
126 libs
:: $(topsrcdir
)/tools
/rb
/fix_linux_stack.py
127 $(INSTALL
) $< $(DIST
)/bin
129 endif # ENABLE_TESTS or MOZ_DMD
132 GARBAGE
+= $(srcdir)/automationutils.pyc
136 libs
:: $(topsrcdir
)/memory
/replace
/dmd
/dmd.py
137 $(INSTALL
) $< $(DIST
)/bin