forked from Floorp-Projects/Floorp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.in
155 lines (122 loc) · 4.06 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
#
# 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/.
USE_RCS_MK := 1
include $(topsrcdir)/config/makefiles/makeutils.mk
ifdef MOZ_APP_BASENAME
DIST_FILES = $(srcdir)/application.ini
ifneq (android,$(MOZ_WIDGET_TOOLKIT))
ifdef MOZ_UPDATER
DIST_FILES += update-settings.ini
endif
endif
ifdef LIBXUL_SDK
APP_INI_DEPS = $(LIBXUL_DIST)/bin/platform.ini
else
APP_INI_DEPS = $(topsrcdir)/config/milestone.txt
endif
APP_BUILDID := $(shell cat $(DEPTH)/config/buildid)
APP_INI_DEPS += $(DEPTH)/config/buildid
DEFINES += -DGRE_MILESTONE=$(GRE_MILESTONE) -DAPP_BUILDID=$(APP_BUILDID)
DEFINES += -DMOZ_APP_VERSION="$(MOZ_APP_VERSION)"
APP_INI_DEPS += $(DEPTH)/config/autoconf.mk
MOZ_SOURCE_STAMP := $(firstword $(shell cd $(topsrcdir)/$(MOZ_BUILD_APP)/.. && hg parent --template="{node|short}\n" 2>/dev/null))
ifdef MOZ_SOURCE_STAMP
DEFINES += -DMOZ_SOURCE_STAMP="$(MOZ_SOURCE_STAMP)"
endif
source_repo ?= $(call getSourceRepo,$(topsrcdir)/$(MOZ_BUILD_APP)/..)
ifneq (,$(source_repo))
DEFINES += -DMOZ_SOURCE_REPO="$(source_repo)"
endif
DEFINES += \
-DMOZ_APP_BASENAME="$(MOZ_APP_BASENAME)" \
-DMOZ_APP_VENDOR="$(MOZ_APP_VENDOR)" \
-DMOZ_APP_ID="$(MOZ_APP_ID)" \
-DMAR_CHANNEL_ID="$(MAR_CHANNEL_ID)" \
-DACCEPTED_MAR_CHANNEL_IDS="$(ACCEPTED_MAR_CHANNEL_IDS)" \
$(NULL)
ifdef MOZ_APP_PROFILE
DEFINES += -DMOZ_APP_PROFILE="$(MOZ_APP_PROFILE)"
endif
ifdef MOZ_CRASHREPORTER
DEFINES += -DMOZ_CRASHREPORTER
endif
ifdef MOZ_PROFILE_MIGRATOR
DEFINES += -DMOZ_PROFILE_MIGRATOR
endif
ifdef MOZ_EXTENSION_MANAGER
DEFINES += -DMOZ_EXTENSION_MANAGER
endif
endif
# Put a useful .gdbinit in the bin directory, to be picked up automatically
# by GDB when we debug executables there.
# NOTE: Keep .gdbinit in the topsrcdir for people who run gdb from the topsrcdir.
GDBINIT_FILES := $(topsrcdir)/.gdbinit
GDBINIT_DEST = $(FINAL_TARGET)
INSTALL_TARGETS += GDBINIT
include $(topsrcdir)/config/rules.mk
# we install to _leaktest/
TARGET_DEPTH = ..
include $(srcdir)/automation-build.mk
_LEAKTEST_DIR = $(DEPTH)/_leaktest
_LEAKTEST_FILES = \
automation.py \
automationutils.py \
$(topsrcdir)/testing/profiles/prefs_general.js \
leaktest.py \
bloatcycle.html \
$(topsrcdir)/build/pgo/server-locations.txt \
$(topsrcdir)/build/pgo/favicon.ico \
$(topsrcdir)/build/pgo/blueprint/sample.html \
$(topsrcdir)/build/pgo/blueprint/elements.html \
$(topsrcdir)/build/pgo/blueprint/forms.html \
$(topsrcdir)/build/pgo/blueprint/grid.html \
$(topsrcdir)/build/pgo/blueprint/test.jpg \
$(topsrcdir)/build/pgo/blueprint/test-small.jpg \
$(topsrcdir)/build/pgo/blueprint/valid.png \
$(topsrcdir)/build/pgo/blueprint/screen.css \
$(topsrcdir)/build/pgo/blueprint/print.css \
$(topsrcdir)/build/pgo/blueprint/grid.png \
$(topsrcdir)/build/pgo/blueprint/fancytype-screen.css \
$(NULL)
leaktest.py: leaktest.py.in
$(PYTHON) $(topsrcdir)/config/Preprocessor.py $^ > $@
chmod +x $@
GARBAGE += leaktest.py
ifdef MOZ_APP_BASENAME
$(FINAL_TARGET)/application.ini: $(APP_INI_DEPS)
ifdef MOZ_APP_STATIC_INI
DEFINES += -DMOZ_APP_STATIC_INI
application.ini.h: appini_header.py $(FINAL_TARGET)/application.ini
$(PYTHON) $^ > $@
export:: application.ini.h
GARBAGE += application.ini.h
endif
endif
libs:: $(_LEAKTEST_FILES)
$(INSTALL) $^ $(_LEAKTEST_DIR)
ifdef MOZ_VALGRIND
_VALGRIND_DIR = $(DEPTH)/_valgrind
GARBAGE_DIRS += $(_VALGRIND_DIR)
_VALGRIND_FILES = \
$(topsrcdir)/build/valgrind/cross-architecture.sup \
$(topsrcdir)/build/valgrind/i386-redhat-linux-gnu.sup \
$(topsrcdir)/build/valgrind/x86_64-redhat-linux-gnu.sup \
$(NULL)
libs:: $(_VALGRIND_FILES)
$(INSTALL) $^ $(_VALGRIND_DIR)
endif
ifdef ENABLE_TESTS
libs:: $(topsrcdir)/tools/rb/fix_stack_using_bpsyms.py
$(INSTALL) $< $(DIST)/bin
ifeq ($(OS_ARCH),Darwin)
libs:: $(topsrcdir)/tools/rb/fix_macosx_stack.py
$(INSTALL) $< $(DIST)/bin
endif
ifeq ($(OS_ARCH),Linux)
libs:: $(topsrcdir)/tools/rb/fix-linux-stack.pl
$(INSTALL) $< $(DIST)/bin
endif
GARBAGE += $(srcdir)/automationutils.pyc
endif # ENABLE_TESTS