Bug 793338 - Implement blocklist click-to-play plugin notification popup UI. r=jaws
[gecko.git] / Makefile.in
blobe3414622bfc9612e07ca13f5ff7e0586719e1e23
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 DEPTH = @DEPTH@
7 topsrcdir = @top_srcdir@
8 srcdir = @srcdir@
9 VPATH = @srcdir@
11 ifndef .PYMAKE
12 ifeq (,$(MAKE_VERSION))
13 $(error GNU Make is required)
14 endif
15 ifeq (,$(filter-out 3.78 3.79,$(MAKE_VERSION)))
16 $(error GNU Make 3.80 or higher is required)
17 endif
18 endif
20 include $(DEPTH)/config/autoconf.mk
22 default::
24 TIERS += base
27 # tier "base" - basic setup
29 tier_base_dirs = \
30 config \
31 build \
32 probes \
33 mfbt \
34 $(NULL)
36 ifndef LIBXUL_SDK
37 ifeq (android,$(MOZ_WIDGET_TOOLKIT))
38 tier_base_dirs += \
39 other-licenses/android \
40 $(NULL)
41 endif
42 ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
43 tier_base_dirs += \
44 other-licenses/android \
45 $(NULL)
46 endif
48 ifdef MOZ_MEMORY
49 tier_base_dirs += memory/mozjemalloc
50 ifdef MOZ_JEMALLOC
51 tier_base_dirs += memory/jemalloc
52 endif
53 tier_base_dirs += memory/build
54 endif
55 ifndef MOZ_NATIVE_ZLIB
56 tier_base_dirs += modules/zlib
57 endif
58 tier_base_dirs += \
59 mozglue \
60 memory/mozalloc \
61 $(NULL)
62 endif
64 ifdef COMPILE_ENVIRONMENT
65 include $(topsrcdir)/$(MOZ_BUILD_APP)/build.mk
66 endif
69 include $(topsrcdir)/config/config.mk
71 GARBAGE_DIRS += dist _javagen _profile _tests staticlib
72 DIST_GARBAGE = config.cache config.log config.status* config-defs.h \
73 config/autoconf.mk \
74 unallmakefiles mozilla-config.h \
75 netwerk/necko-config.h xpcom/xpcom-config.h xpcom/xpcom-private.h \
76 $(topsrcdir)/.mozconfig.mk $(topsrcdir)/.mozconfig.out
78 default alldep all:: $(topsrcdir)/configure config.status
79 $(RM) -r $(DIST)/sdk
80 $(RM) -r $(DIST)/include
81 $(RM) -r $(DIST)/private
82 $(RM) -r $(DIST)/public
83 $(RM) $(DIST)/chrome.manifest
84 $(RM) -r _tests
86 $(topsrcdir)/configure: $(topsrcdir)/configure.in
87 @echo "STOP! configure.in has changed, and your configure is out of date."
88 @echo "Please rerun autoconf and re-configure your build directory."
89 @echo "To ignore this message, touch 'configure' in the source directory,"
90 @echo "but your build might not succeed."
91 @exit 1
93 config.status: $(topsrcdir)/configure
94 @echo "STOP! configure has changed and needs to be run in this build directory."
95 @echo "Please rerun configure."
96 @echo "To ignore this message, touch 'config.status' in the build directory,"
97 @echo "but your build might not succeed."
98 @exit 1
100 # Build pseudo-external modules first when export is explicitly called
101 export::
102 $(RM) -r $(DIST)/sdk
103 $(MAKE) -C config export
104 $(MAKE) tier_nspr
106 ifdef ENABLE_TESTS
107 # Additional makefile targets to call automated test suites
108 include $(topsrcdir)/testing/testsuite-targets.mk
109 endif
111 include $(topsrcdir)/config/rules.mk
113 distclean::
114 cat unallmakefiles | $(XARGS) rm -f
115 $(RM) unallmakefiles $(DIST_GARBAGE)
117 ifeq ($(OS_ARCH),WINNT)
118 # we want to copy PDB files on Windows
119 MAKE_SYM_STORE_ARGS := -c --vcs-info
120 ifdef PDBSTR_PATH
121 MAKE_SYM_STORE_ARGS += -i
122 endif
123 DUMP_SYMS_BIN ?= $(topsrcdir)/toolkit/crashreporter/tools/win32/dump_syms_vc$(_MSC_VER).exe
124 # PDB files don't get moved to dist, so we need to scan the whole objdir
125 MAKE_SYM_STORE_PATH := .
126 endif
127 ifeq ($(OS_ARCH),Darwin)
128 # need to pass arch flags for universal builds
129 ifdef UNIVERSAL_BINARY
130 MAKE_SYM_STORE_ARGS := -c -a "i386 x86_64" --vcs-info
131 MAKE_SYM_STORE_PATH := $(DIST)/universal
132 else
133 MAKE_SYM_STORE_ARGS := -c -a $(OS_TEST) --vcs-info
134 MAKE_SYM_STORE_PATH := $(DIST)/bin
135 endif
136 DUMP_SYMS_BIN ?= $(DIST)/host/bin/dump_syms
137 endif
138 ifeq (,$(filter-out Linux SunOS,$(OS_ARCH)))
139 MAKE_SYM_STORE_ARGS := -c --vcs-info
140 DUMP_SYMS_BIN ?= $(DIST)/host/bin/dump_syms
141 MAKE_SYM_STORE_PATH := $(DIST)/bin
142 endif
144 SYM_STORE_SOURCE_DIRS := $(topsrcdir)
146 include $(topsrcdir)/toolkit/mozapps/installer/package-name.mk
148 ifdef MOZ_SYMBOLS_EXTRA_BUILDID
149 EXTRA_BUILDID := -$(MOZ_SYMBOLS_EXTRA_BUILDID)
150 endif
152 SYMBOL_INDEX_NAME = \
153 $(MOZ_APP_NAME)-$(MOZ_APP_VERSION)-$(OS_TARGET)-$(BUILDID)-$(CPU_ARCH)$(EXTRA_BUILDID)-symbols.txt
155 buildsymbols:
156 ifdef MOZ_CRASHREPORTER
157 ifdef USE_ELF_HACK
158 ifeq (mobile,$(MOZ_BUILD_APP))
159 $(MAKE) -C mobile/xul/installer elfhack
160 else
161 $(MAKE) -C $(MOZ_BUILD_APP)/installer elfhack
162 endif
163 endif
164 echo building symbol store
165 $(RM) -r $(DIST)/crashreporter-symbols
166 $(RM) "$(DIST)/$(SYMBOL_ARCHIVE_BASENAME).zip"
167 $(NSINSTALL) -D $(DIST)/crashreporter-symbols
168 OBJCOPY="$(OBJCOPY)" \
169 $(PYTHON) $(topsrcdir)/toolkit/crashreporter/tools/symbolstore.py \
170 $(MAKE_SYM_STORE_ARGS) \
171 --exclude="*test*" --exclude="*Test*" \
172 $(foreach dir,$(SYM_STORE_SOURCE_DIRS),-s $(dir)) \
173 $(DUMP_SYMS_BIN) \
174 $(DIST)/crashreporter-symbols \
175 $(MAKE_SYM_STORE_PATH) > \
176 $(DIST)/crashreporter-symbols/$(SYMBOL_INDEX_NAME)
177 echo packing symbols
178 $(NSINSTALL) -D $(DIST)/$(PKG_PATH)
179 cd $(DIST)/crashreporter-symbols && \
180 zip -r9D "../$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).zip" .
181 cd $(DIST)/crashreporter-symbols && \
182 grep "sym" $(SYMBOL_INDEX_NAME) > $(SYMBOL_INDEX_NAME).tmp && \
183 mv $(SYMBOL_INDEX_NAME).tmp $(SYMBOL_INDEX_NAME)
184 cd $(DIST)/crashreporter-symbols && \
185 zip -r9D "../$(PKG_PATH)$(SYMBOL_ARCHIVE_BASENAME).zip" . -i "*.sym" -i "*.txt"
186 endif # MOZ_CRASHREPORTER
188 uploadsymbols:
189 ifdef MOZ_CRASHREPORTER
190 $(SHELL) $(topsrcdir)/toolkit/crashreporter/tools/upload_symbols.sh $(SYMBOL_INDEX_NAME) "$(DIST)/$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).zip"
191 endif
193 codesighs:
194 $(MAKE) -C $(MOZ_BUILD_APP)/installer codesighs
196 # defined in package-name.mk
197 export MOZ_SOURCE_STAMP
199 #XXX: this is a hack, since we don't want to clobber for MSVC
200 # PGO support, but we can't do this test in client.mk
201 ifneq ($(OS_ARCH)_$(GNU_CC), WINNT_)
202 # No point in clobbering if PGO has been explicitly disabled.
203 ifndef NO_PROFILE_GUIDED_OPTIMIZE
204 maybe_clobber_profiledbuild: clean
205 else
206 maybe_clobber_profiledbuild:
207 endif
208 else
209 maybe_clobber_profiledbuild:
210 $(RM) $(DIST)/bin/*.pgc
211 find $(DIST)/$(MOZ_APP_NAME) -name "*.pgc" -exec mv {} $(DIST)/bin \;
212 endif
214 # put in our default gdbinit so that the gdb debugging experience is happier.
215 libs:: .gdbinit
216 $(INSTALL) $< $(DIST)/bin
218 .PHONY: maybe_clobber_profiledbuild
220 # Look for R_386_PC32 relocations in shared libs, these
221 # break x86_64 builds and SELinux users.
222 ifeq ($(OS_TARGET)_$(TARGET_XPCOM_ABI),Linux_x86-gcc3)
223 scheck::
224 @relcount=`find $(DIST)/bin -name "*.so" | xargs objdump -R | grep R_386_PC32 | wc -l` && if test $$relcount -gt 0; then echo "FAILED: R_386_PC32 relocations detected in a shared library. Did you use a system header without adding it to config/system-headers?"; exit 1; else echo "PASSED"; fi
225 endif
227 js/src/Makefile: subsrcdir := js/src