Bumping manifests a=b2g-bump
[gecko.git] / build / Makefile.in
blob40c3514d2d265e710ad45fae133da76c96dfa4cd
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 include $(topsrcdir)/config/rules.mk
71 TARGET_DEPTH = ..
72 include $(srcdir)/automation-build.mk
74 ifdef MOZ_APP_BASENAME
75 $(FINAL_TARGET)/application.ini: $(APP_INI_DEPS)
77 ifdef MOZ_APP_STATIC_INI
78 application.ini.h: appini_header.py $(FINAL_TARGET)/application.ini
79 $(PYTHON) $^ > $@
80 export:: application.ini.h
81 GARBAGE += application.ini.h
82 endif
83 endif
85 libs:: automation.py
87 ifdef MOZ_VALGRIND
88 _VALGRIND_DIR = $(DEPTH)/_valgrind
89 GARBAGE_DIRS += $(_VALGRIND_DIR)
91 _VALGRIND_FILES = \
92 $(topsrcdir)/build/valgrind/cross-architecture.sup \
93 $(topsrcdir)/build/valgrind/i386-redhat-linux-gnu.sup \
94 $(topsrcdir)/build/valgrind/x86_64-redhat-linux-gnu.sup \
95 $(NULL)
97 libs:: $(_VALGRIND_FILES)
98 $(INSTALL) $^ $(_VALGRIND_DIR)
99 endif
101 ifdef ENABLE_TESTS
102 libs:: $(topsrcdir)/tools/rb/fix_stack_using_bpsyms.py
103 $(INSTALL) $< $(DIST)/bin
105 ifeq ($(OS_ARCH),Darwin)
106 libs:: $(topsrcdir)/tools/rb/fix_macosx_stack.py
107 $(INSTALL) $< $(DIST)/bin
108 endif
110 ifeq ($(OS_ARCH),Linux)
111 libs:: $(topsrcdir)/tools/rb/fix-linux-stack.pl
112 $(INSTALL) $< $(DIST)/bin
113 endif
115 GARBAGE += $(srcdir)/automationutils.pyc
117 endif # ENABLE_TESTS