|
1 # |
|
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/. |
|
5 |
|
6 USE_RCS_MK := 1 |
|
7 include $(topsrcdir)/config/makefiles/makeutils.mk |
|
8 |
|
9 ifdef MOZ_APP_BASENAME |
|
10 DIST_FILES = $(srcdir)/application.ini |
|
11 |
|
12 ifneq (android,$(MOZ_WIDGET_TOOLKIT)) |
|
13 ifdef MOZ_UPDATER |
|
14 DIST_FILES += update-settings.ini |
|
15 endif |
|
16 endif |
|
17 |
|
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 |
|
23 |
|
24 APP_BUILDID := $(shell cat $(DEPTH)/config/buildid) |
|
25 APP_INI_DEPS += $(DEPTH)/config/buildid |
|
26 |
|
27 DEFINES += -DAPP_BUILDID=$(APP_BUILDID) |
|
28 |
|
29 APP_INI_DEPS += $(DEPTH)/config/autoconf.mk |
|
30 |
|
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 |
|
35 |
|
36 source_repo ?= $(call getSourceRepo,$(topsrcdir)/$(MOZ_BUILD_APP)/..) |
|
37 ifneq (,$(source_repo)) |
|
38 DEFINES += -DMOZ_SOURCE_REPO='$(source_repo)' |
|
39 endif |
|
40 |
|
41 endif |
|
42 |
|
43 # Put a useful .gdbinit in the bin directory, to be picked up automatically |
|
44 # by GDB when we debug executables there. |
|
45 # NOTE: Keep .gdbinit in the topsrcdir for people who run gdb from the topsrcdir. |
|
46 GDBINIT_FILES := $(topsrcdir)/.gdbinit |
|
47 GDBINIT_OBJDIR_FILES = $(topsrcdir)/.gdbinit |
|
48 GDBINIT_DEST = $(FINAL_TARGET) |
|
49 |
|
50 # needs to be absolute to be distinct from $(topsrcdir)/.gdbinit |
|
51 GDBINIT_OBJDIR_DEST = $(abspath $(DEPTH)) |
|
52 INSTALL_TARGETS += GDBINIT GDBINIT_OBJDIR |
|
53 |
|
54 # Put a .lldbinit in the bin directory and the objdir, to be picked up |
|
55 # automatically by LLDB when we debug executables using either of those two |
|
56 # directories as the current working directory. The .lldbinit file will |
|
57 # load $(topsrcdir)/.lldbinit, which is where the actual debugging commands are. |
|
58 LLDBINIT_OBJDIR := .lldbinit.in |
|
59 LLDBINIT_OBJDIR_PATH = $(DEPTH) |
|
60 LLDBINIT_OBJDIR_FLAGS += -Dtopsrcdir=$(abspath $(topsrcdir)) |
|
61 PP_TARGETS += LLDBINIT_OBJDIR |
|
62 |
|
63 LLDBINIT_FINAL_TARGET_FILES := $(DEPTH)/.lldbinit |
|
64 LLDBINIT_FINAL_TARGET_DEST = $(FINAL_TARGET) |
|
65 INSTALL_TARGETS += LLDBINIT_FINAL_TARGET |
|
66 |
|
67 include $(topsrcdir)/config/rules.mk |
|
68 |
|
69 # we install to _leaktest/ |
|
70 TARGET_DEPTH = .. |
|
71 include $(srcdir)/automation-build.mk |
|
72 |
|
73 _LEAKTEST_DIR = $(DEPTH)/_leaktest |
|
74 |
|
75 _LEAKTEST_FILES = \ |
|
76 automation.py \ |
|
77 automationutils.py \ |
|
78 $(topsrcdir)/testing/profiles/prefs_general.js \ |
|
79 leaktest.py \ |
|
80 bloatcycle.html \ |
|
81 $(topsrcdir)/build/pgo/server-locations.txt \ |
|
82 $(topsrcdir)/build/pgo/favicon.ico \ |
|
83 $(topsrcdir)/build/pgo/blueprint/sample.html \ |
|
84 $(topsrcdir)/build/pgo/blueprint/elements.html \ |
|
85 $(topsrcdir)/build/pgo/blueprint/forms.html \ |
|
86 $(topsrcdir)/build/pgo/blueprint/grid.html \ |
|
87 $(topsrcdir)/build/pgo/blueprint/test.jpg \ |
|
88 $(topsrcdir)/build/pgo/blueprint/test-small.jpg \ |
|
89 $(topsrcdir)/build/pgo/blueprint/valid.png \ |
|
90 $(topsrcdir)/build/pgo/blueprint/screen.css \ |
|
91 $(topsrcdir)/build/pgo/blueprint/print.css \ |
|
92 $(topsrcdir)/build/pgo/blueprint/grid.png \ |
|
93 $(topsrcdir)/build/pgo/blueprint/fancytype-screen.css \ |
|
94 $(NULL) |
|
95 |
|
96 leaktest.py: leaktest.py.in |
|
97 $(call py_action,preprocessor,$^ -o $@) |
|
98 chmod +x $@ |
|
99 GARBAGE += leaktest.py |
|
100 |
|
101 ifdef MOZ_APP_BASENAME |
|
102 $(FINAL_TARGET)/application.ini: $(APP_INI_DEPS) |
|
103 |
|
104 ifdef MOZ_APP_STATIC_INI |
|
105 application.ini.h: appini_header.py $(FINAL_TARGET)/application.ini |
|
106 $(PYTHON) $^ > $@ |
|
107 export:: application.ini.h |
|
108 GARBAGE += application.ini.h |
|
109 endif |
|
110 endif |
|
111 |
|
112 libs:: $(_LEAKTEST_FILES) |
|
113 $(INSTALL) $^ $(_LEAKTEST_DIR) |
|
114 |
|
115 ifdef MOZ_VALGRIND |
|
116 _VALGRIND_DIR = $(DEPTH)/_valgrind |
|
117 GARBAGE_DIRS += $(_VALGRIND_DIR) |
|
118 |
|
119 _VALGRIND_FILES = \ |
|
120 $(topsrcdir)/build/valgrind/cross-architecture.sup \ |
|
121 $(topsrcdir)/build/valgrind/i386-redhat-linux-gnu.sup \ |
|
122 $(topsrcdir)/build/valgrind/x86_64-redhat-linux-gnu.sup \ |
|
123 $(NULL) |
|
124 |
|
125 libs:: $(_VALGRIND_FILES) |
|
126 $(INSTALL) $^ $(_VALGRIND_DIR) |
|
127 endif |
|
128 |
|
129 ifdef ENABLE_TESTS |
|
130 libs:: $(topsrcdir)/tools/rb/fix_stack_using_bpsyms.py |
|
131 $(INSTALL) $< $(DIST)/bin |
|
132 |
|
133 ifeq ($(OS_ARCH),Darwin) |
|
134 libs:: $(topsrcdir)/tools/rb/fix_macosx_stack.py |
|
135 $(INSTALL) $< $(DIST)/bin |
|
136 endif |
|
137 |
|
138 ifeq ($(OS_ARCH),Linux) |
|
139 libs:: $(topsrcdir)/tools/rb/fix-linux-stack.pl |
|
140 $(INSTALL) $< $(DIST)/bin |
|
141 endif |
|
142 |
|
143 GARBAGE += $(srcdir)/automationutils.pyc |
|
144 |
|
145 endif # ENABLE_TESTS |