Bug 474152 - [SeaMonkey] TUnit toolkit/.../test_contentAreaUtils.js fails now; (Av1...
[mozilla-central.git] / Makefile.in
blobe5d58c2e7f9fd036684617260951587163a5123f
2 # ***** BEGIN LICENSE BLOCK *****
3 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 # The contents of this file are subject to the Mozilla Public License Version
6 # 1.1 (the "License"); you may not use this file except in compliance with
7 # the License. You may obtain a copy of the License at
8 # http://www.mozilla.org/MPL/
10 # Software distributed under the License is distributed on an "AS IS" basis,
11 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 # for the specific language governing rights and limitations under the
13 # License.
15 # The Original Code is mozilla.org code.
17 # The Initial Developer of the Original Code is
18 # Netscape Communications Corporation.
19 # Portions created by the Initial Developer are Copyright (C) 1998
20 # the Initial Developer. All Rights Reserved.
22 # Contributor(s):
24 # Alternatively, the contents of this file may be used under the terms of
25 # either the GNU General Public License Version 2 or later (the "GPL"), or
26 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 # in which case the provisions of the GPL or the LGPL are applicable instead
28 # of those above. If you wish to allow use of your version of this file only
29 # under the terms of either the GPL or the LGPL, and not to allow others to
30 # use your version of this file under the terms of the MPL, indicate your
31 # decision by deleting the provisions above and replace them with the notice
32 # and other provisions required by the GPL or the LGPL. If you do not delete
33 # the provisions above, a recipient may use your version of this file under
34 # the terms of any one of the MPL, the GPL or the LGPL.
36 # ***** END LICENSE BLOCK *****
38 DEPTH = .
39 topsrcdir = @top_srcdir@
40 srcdir = @srcdir@
41 VPATH = @srcdir@
43 ifndef .PYMAKE
44 ifeq (,$(MAKE_VERSION))
45 $(error GNU Make is required)
46 endif
47 ifeq (,$(filter-out 3.78 3.79,$(MAKE_VERSION)))
48 $(error GNU Make 3.80 or higher is required)
49 endif
50 endif
52 include $(DEPTH)/config/autoconf.mk
54 default::
56 TIERS += base
59 # tier "base" - basic setup
61 tier_base_dirs = \
62 config \
63 build \
64 probes \
65 $(NULL)
67 ifdef MOZ_MEMORY
68 tier_base_dirs += memory/jemalloc
69 endif
71 include $(topsrcdir)/$(MOZ_BUILD_APP)/build.mk
73 TIERS += testharness
75 # test harnesses
76 ifdef ENABLE_TESTS
77 tier_testharness_dirs += testing/xpcshell
78 endif
80 include $(topsrcdir)/config/config.mk
82 GARBAGE_DIRS += dist _javagen _profile _tests staticlib
83 DIST_GARBAGE = config.cache config.log config.status config-defs.h \
84 dependencies.beos config/autoconf.mk config/myrules.mk config/myconfig.mk \
85 unallmakefiles mozilla-config.h \
86 netwerk/necko-config.h xpcom/xpcom-config.h xpcom/xpcom-private.h \
87 $(topsrcdir)/.mozconfig.mk $(topsrcdir)/.mozconfig.out
89 default alldep all::
90 $(RM) -rf $(DIST)/sdk
91 $(RM) -rf $(DIST)/include
92 $(RM) -rf $(DIST)/private
93 $(RM) -rf $(DIST)/public
94 $(RM) -rf $(DIST)/bin/components
95 $(RM) -rf _tests
97 # Build pseudo-external modules first when export is explicitly called
98 export::
99 $(RM) -rf $(DIST)/sdk
100 $(MAKE) -C config export
101 $(MAKE) tier_nspr
103 ifdef ENABLE_TESTS
104 # Additional makefile targets to call automated test suites
105 include $(topsrcdir)/testing/testsuite-targets.mk
106 endif
108 include $(topsrcdir)/config/rules.mk
110 # After we build tier toolkit, go back and build the tools from previous dirs
111 tier_toolkit::
112 $(MAKE) tools_tier_js
113 $(MAKE) tools_tier_xpcom
114 $(MAKE) tools_tier_necko
115 $(MAKE) tools_tier_gecko
116 $(MAKE) tools_tier_toolkit
118 ifeq (netwerk,$(MOZ_BUILD_APP))
119 tier_necko::
120 $(EXIT_ON_ERROR) \
121 $(foreach tier,$(TIERS),$(MAKE) tools_tier_$(tier); )
122 endif
124 distclean::
125 cat unallmakefiles | $(XARGS) rm -f
126 rm -f unallmakefiles $(DIST_GARBAGE)
128 ifeq ($(OS_ARCH),WINNT)
129 rebase:
130 ifdef MOZILLA_OFFICIAL
131 echo rebasing $(DIST)
132 /bin/find $(DIST) -name "*.dll" -a -not -name "msvc*" > rebase.lst
133 rebase -b 60000000 -R . -G rebase.lst
134 rm rebase.lst
135 endif
136 endif # WINNT
138 ifeq ($(OS_ARCH),WINNT)
139 # we want to copy PDB files on Windows
140 MAKE_SYM_STORE_ARGS := -c
141 ifdef PDBSTR_PATH
142 MAKE_SYM_STORE_ARGS += -i
143 endif
144 ifeq (,$(CYGWIN_WRAPPER))
145 # this doesn't work with Cygwin Python
146 MAKE_SYM_STORE_ARGS += --vcs-info
147 endif
148 DUMP_SYMS_BIN ?= $(topsrcdir)/toolkit/crashreporter/tools/win32/dump_syms.exe
149 # PDB files don't get moved to dist, so we need to scan the whole objdir
150 MAKE_SYM_STORE_PATH := .
151 endif
152 ifeq ($(OS_ARCH),Darwin)
153 # need to pass arch flags for universal builds
154 ifdef UNIVERSAL_BINARY
155 MAKE_SYM_STORE_ARGS := -c -a "ppc i386" --vcs-info
156 MAKE_SYM_STORE_PATH := $(DIST)/universal
157 else
158 MAKE_SYM_STORE_ARGS := -c -a $(OS_TEST) --vcs-info
159 MAKE_SYM_STORE_PATH := $(DIST)/bin
160 endif
161 DUMP_SYMS_BIN ?= $(DIST)/host/bin/dump_syms
162 endif
163 ifeq (,$(filter-out Linux SunOS,$(OS_ARCH)))
164 MAKE_SYM_STORE_ARGS := -c --vcs-info
165 DUMP_SYMS_BIN ?= $(DIST)/host/bin/dump_syms
166 MAKE_SYM_STORE_PATH := $(DIST)/bin
167 endif
169 SYM_STORE_SOURCE_DIRS := $(topsrcdir)
171 include $(topsrcdir)/toolkit/mozapps/installer/package-name.mk
173 ifdef MOZ_SYMBOLS_EXTRA_BUILDID
174 EXTRA_BUILDID := -$(MOZ_SYMBOLS_EXTRA_BUILDID)
175 endif
177 SYMBOL_INDEX_NAME = \
178 $(MOZ_APP_NAME)-$(MOZ_APP_VERSION)-$(OS_ARCH)-$(BUILDID)$(EXTRA_BUILDID)-symbols.txt
180 buildsymbols:
181 ifdef MOZ_CRASHREPORTER
182 echo building symbol store
183 $(RM) -rf $(DIST)/crashreporter-symbols
184 $(RM) -f "$(DIST)/$(SYMBOL_ARCHIVE_BASENAME).zip"
185 $(NSINSTALL) -D $(DIST)/crashreporter-symbols
186 $(PYTHON) $(topsrcdir)/toolkit/crashreporter/tools/symbolstore.py \
187 $(MAKE_SYM_STORE_ARGS) \
188 $(foreach dir,$(SYM_STORE_SOURCE_DIRS),-s $(dir)) \
189 $(DUMP_SYMS_BIN) \
190 $(DIST)/crashreporter-symbols \
191 $(MAKE_SYM_STORE_PATH) > \
192 $(DIST)/crashreporter-symbols/$(SYMBOL_INDEX_NAME)
193 echo packing symbols
194 mkdir -p $(topsrcdir)/../$(BUILDID)
195 cd $(DIST)/crashreporter-symbols && \
196 zip -r9D ../"$(SYMBOL_ARCHIVE_BASENAME).zip" .
197 endif # MOZ_CRASHREPORTER
199 uploadsymbols:
200 ifdef MOZ_CRASHREPORTER
201 $(SHELL) $(topsrcdir)/toolkit/crashreporter/tools/upload_symbols.sh "$(DIST)/$(SYMBOL_ARCHIVE_BASENAME).zip"
202 endif
204 ifeq ($(OS_ARCH),WINNT)
205 signnss:
206 ifdef MOZILLA_OFFICIAL
207 echo signing NSS libs
208 cd $(DIST)/bin; ./shlibsign.exe -v -i softokn3.dll
209 cd $(DIST)/bin; ./shlibsign.exe -v -i freebl3.dll
210 endif # MOZILLA_OFFICIAL
212 deliver: rebase signnss
214 endif # WINNT
216 ifneq (,$(wildcard $(DIST)/bin/application.ini))
217 BUILDID = $(shell $(PYTHON) $(srcdir)/config/printconfigsetting.py $(DIST)/bin/application.ini App BuildID)
218 else
219 BUILDID = $(shell $(PYTHON) $(srcdir)/config/printconfigsetting.py $(DIST)/bin/platform.ini Build BuildID)
220 endif
222 #XXX: this is a hack, since we don't want to clobber for MSVC
223 # PGO support, but we can't do this test in client.mk
224 ifneq ($(OS_ARCH)_$(GNU_CC), WINNT_)
225 # No point in clobbering if PGO has been explicitly disabled.
226 ifndef NO_PROFILE_GUIDED_OPTIMIZE
227 maybe_clobber_profiledbuild: clobber_all
228 else
229 maybe_clobber_profiledbuild:
230 endif
231 else
232 maybe_clobber_profiledbuild:
233 endif
235 .PHONY: maybe_clobber_profiledbuild