Make enumeration over SJOWs walk the prototype chain. Also make SJOWs unwrap same...
[mozilla-1.9.git] / Makefile.in
blobab3aaa372ec98a0d36ab2c037be606d6e6c71287
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 include $(DEPTH)/config/autoconf.mk
45 include $(topsrcdir)/config/config.mk
47 default alldep all::
48 $(RM) -rf $(DIST)/sdk
49 $(RM) -rf $(DIST)/include
50 $(RM) -rf _tests
51 $(MAKE) -C config export
53 TIERS += base
56 # tier "base" - basic setup
58 tier_base_dirs = \
59 config \
60 build \
61 probes \
62 $(NULL)
64 include $(topsrcdir)/$(MOZ_BUILD_APP)/build.mk
66 TIERS += testharness
68 # test harnesses
69 ifdef ENABLE_TESTS
70 tier_testharness_dirs += tools/test-harness
71 endif
73 GARBAGE_DIRS += dist
74 DIST_GARBAGE = config.cache config.log config.status config-defs.h \
75 dependencies.beos config/autoconf.mk config/myrules.mk config/myconfig.mk \
76 unallmakefiles mozilla-config.h \
77 gfx/gfx-config.h netwerk/necko-config.h xpcom/xpcom-config.h xpcom/xpcom-private.h \
78 $(topsrcdir)/.mozconfig.mk $(topsrcdir)/.mozconfig.out
80 # Build pseudo-external modules first when export is explicitly called
81 export::
82 $(RM) -rf $(DIST)/sdk
83 $(MAKE) -C config export
84 $(MAKE) tier_nspr
86 include $(topsrcdir)/config/rules.mk
88 # After we build tier toolkit, go back and build the tools from previous dirs
89 tier_toolkit::
90 $(MAKE) tools_tier_js
91 $(MAKE) tools_tier_xpcom
92 $(MAKE) tools_tier_necko
93 $(MAKE) tools_tier_gecko
94 $(MAKE) tools_tier_toolkit
96 ifeq (netwerk,$(MOZ_BUILD_APP))
97 tier_necko::
98 $(EXIT_ON_ERROR) \
99 $(foreach tier,$(TIERS),$(MAKE) tools_tier_$(tier); )
100 endif
102 distclean::
103 cat unallmakefiles | $(XARGS) rm -f
104 rm -f unallmakefiles $(DIST_GARBAGE)
106 ifeq ($(OS_ARCH),WINNT)
107 rebase:
108 ifdef MOZILLA_OFFICIAL
109 echo rebasing $(DIST)
110 /bin/find $(DIST) -name "*.dll" -a -not -name "msvc*" > rebase.lst
111 rebase -b 60000000 -R . -G rebase.lst
112 rm rebase.lst
113 endif
115 splitsymbols:
116 ifdef MOZILLA_OFFICIAL
117 ifdef MOZ_DEBUG_SYMBOLS
118 echo finding pdb files
119 mkdir -p $(DIST)/$(BUILDID)
120 -cp `/bin/find . -path "./dist" -prune -o -name "*.dll" | sed "s/\.dll$$/\.pdb/" | xargs` $(DIST)/$(BUILDID)
121 -cp `/bin/find . -path "./dist" -prune -o -name "*.exe" | sed "s/\.exe$$/\.pdb/" | xargs` $(DIST)/$(BUILDID)
122 -cp `/bin/find . -path "./dist" -prune -o -name "*.EXE" | sed "s/\.EXE$$/\.pdb/" | xargs` $(DIST)/$(BUILDID)
123 endif # MOZ_DEBUG_SYMBOLS
124 ifdef MOZ_PROFILE
125 echo splitting symbols out of binaries
126 /bin/find $(DIST) -name "*.dll" -exec splitsym {} \;
127 /bin/find $(DIST) -name "*.exe" -exec splitsym {} \;
128 /bin/find $(DIST) -name "*.EXE" -exec splitsym {} \;
129 mkdir -p $(DIST)/$(BUILDID)
130 /bin/find $(DIST) -name "*.dbg" -exec mv {} $(DIST)/$(BUILDID) \;
131 endif # MOZ_PROFILE
132 endif # MOZILLA_OFFICIAL
133 endif # WINNT
135 ifeq ($(OS_ARCH),WINNT)
136 # we want to copy PDB files on Windows
137 MAKE_SYM_STORE_ARGS := -c
138 ifeq (,$(CYGWIN_WRAPPER))
139 # this doesn't work with Cygwin Python
140 MAKE_SYM_STORE_ARGS += --vcs-info
141 endif
142 DUMP_SYMS_BIN ?= $(topsrcdir)/toolkit/crashreporter/tools/win32/dump_syms.exe
143 # PDB files don't get moved to dist, so we need to scan the whole objdir
144 MAKE_SYM_STORE_PATH := .
145 endif
146 ifeq ($(OS_ARCH),Darwin)
147 # need to pass arch flags for universal builds
148 ifdef UNIVERSAL_BINARY
149 MAKE_SYM_STORE_ARGS := -a "ppc i386" --vcs-info
150 MAKE_SYM_STORE_PATH := $(DIST)/universal
151 else
152 MAKE_SYM_STORE_ARGS := -a $(OS_TEST) --vcs-info
153 MAKE_SYM_STORE_PATH := $(DIST)/bin
154 endif
155 DUMP_SYMS_BIN ?= $(DIST)/host/bin/dump_syms
156 endif
157 ifeq ($(OS_ARCH),Linux)
158 MAKE_SYM_STORE_ARGS := --vcs-info
159 DUMP_SYMS_BIN ?= $(DIST)/host/bin/dump_syms
160 MAKE_SYM_STORE_PATH := $(DIST)/bin
161 endif
163 ifdef MOZ_SYMBOLS_EXTRA_BUILDID
164 EXTRA_BUILDID := -$(MOZ_SYMBOLS_EXTRA_BUILDID)
165 endif
167 SYMBOL_ARCHIVE_BASENAME = \
168 $(MOZ_APP_NAME)-$(MOZ_APP_VERSION)-$(OS_ARCH)-$(BUILDID)$(EXTRA_BUILDID)
170 buildsymbols:
171 ifdef MOZ_CRASHREPORTER
172 echo building symbol store
173 mkdir -p $(DIST)/crashreporter-symbols/$(BUILDID)
174 $(PYTHON) $(topsrcdir)/toolkit/crashreporter/tools/symbolstore.py \
175 $(MAKE_SYM_STORE_ARGS) -s $(topsrcdir) $(DUMP_SYMS_BIN) \
176 $(DIST)/crashreporter-symbols/$(BUILDID) \
177 $(MAKE_SYM_STORE_PATH) > \
178 $(DIST)/crashreporter-symbols/$(BUILDID)/$(SYMBOL_ARCHIVE_BASENAME)-symbols.txt
179 echo packing symbols
180 mkdir -p $(topsrcdir)/../$(BUILDID)
181 cd $(DIST)/crashreporter-symbols/$(BUILDID) && \
182 zip -r9D ../crashreporter-symbols-$(SYMBOL_ARCHIVE_BASENAME).zip .
183 mv $(DIST)/crashreporter-symbols/crashreporter-symbols-$(SYMBOL_ARCHIVE_BASENAME).zip \
184 $(topsrcdir)/../$(BUILDID)
185 endif # MOZ_CRASHREPORTER
187 uploadsymbols:
188 ifdef MOZ_CRASHREPORTER
189 $(topsrcdir)/toolkit/crashreporter/tools/upload_symbols.sh $(topsrcdir)/../$(BUILDID)/crashreporter-symbols-$(SYMBOL_ARCHIVE_BASENAME).zip
190 endif
192 ifeq ($(OS_ARCH),WINNT)
193 signnss:
194 ifdef MOZILLA_OFFICIAL
195 echo signing NSS libs
196 cd $(DIST)/bin; ./shlibsign.exe -v -i softokn3.dll
197 cd $(DIST)/bin; ./shlibsign.exe -v -i freebl3.dll
198 endif # MOZILLA_OFFICIAL
200 deliver: splitsymbols rebase signnss
202 endif # WINNT
204 ifneq (,$(wildcard $(DIST)/bin/application.ini))
205 BUILDID = $(shell $(PYTHON) $(srcdir)/config/printconfigsetting.py $(DIST)/bin/application.ini App BuildID)
206 else
207 BUILDID = $(shell $(PYTHON) $(srcdir)/config/printconfigsetting.py $(DIST)/bin/platform.ini Build BuildID)
208 endif