For bug 379240, update bootstrap.cfg for RC2
[mozilla-1.9.git] / Makefile.in
blobef782c79d4c579191a15be7b561f3b5fbd867356
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 $(NULL)
63 include $(topsrcdir)/$(MOZ_BUILD_APP)/build.mk
65 TIERS += testharness
67 # test harnesses
68 ifdef ENABLE_TESTS
69 tier_testharness_dirs += tools/test-harness
70 endif
72 GARBAGE_DIRS += dist
73 DIST_GARBAGE = config.cache config.log config.status config-defs.h \
74 dependencies.beos config/autoconf.mk config/myrules.mk config/myconfig.mk \
75 unallmakefiles mozilla-config.h \
76 gfx/gfx-config.h netwerk/necko-config.h xpcom/xpcom-config.h xpcom/xpcom-private.h \
77 $(topsrcdir)/.mozconfig.mk $(topsrcdir)/.mozconfig.out
79 # Build pseudo-external modules first when export is explicitly called
80 export::
81 $(RM) -rf $(DIST)/sdk
82 $(MAKE) -C config export
83 $(MAKE) tier_nspr
85 install::
86 ifdef MOZ_LDAP_XPCOM
87 $(MAKE) -C directory/c-sdk real_install DESTDIR=$(DESTDIR) libdir=$(mozappdir) includedir=$(includedir)/ldap
88 endif
90 include $(topsrcdir)/config/rules.mk
92 # After we build tier toolkit, go back and build the tools from previous dirs
93 tier_toolkit::
94 $(MAKE) tools_tier_js
95 $(MAKE) tools_tier_xpcom
96 $(MAKE) tools_tier_necko
97 $(MAKE) tools_tier_gecko
98 $(MAKE) tools_tier_toolkit
100 ifeq (netwerk,$(MOZ_BUILD_APP))
101 tier_necko::
102 $(EXIT_ON_ERROR) \
103 $(foreach tier,$(TIERS),$(MAKE) tools_tier_$(tier); )
104 endif
106 distclean::
107 cat unallmakefiles | $(XARGS) rm -f
108 rm -f unallmakefiles $(DIST_GARBAGE)
110 ifeq ($(OS_ARCH),WINNT)
111 rebase:
112 ifdef MOZILLA_OFFICIAL
113 echo rebasing $(DIST)
114 /bin/find $(DIST) -name "*.dll" > rebase.lst
115 rebase -b 60000000 -R . -G rebase.lst
116 rm rebase.lst
117 endif
119 splitsymbols:
120 ifdef MOZILLA_OFFICIAL
121 ifdef MOZ_DEBUG_SYMBOLS
122 echo finding pdb files
123 mkdir -p $(DIST)/$(BUILDID)
124 -cp `/bin/find . -path "./dist" -prune -o -name "*.dll" | sed "s/\.dll$$/\.pdb/" | xargs` $(DIST)/$(BUILDID)
125 -cp `/bin/find . -path "./dist" -prune -o -name "*.exe" | sed "s/\.exe$$/\.pdb/" | xargs` $(DIST)/$(BUILDID)
126 -cp `/bin/find . -path "./dist" -prune -o -name "*.EXE" | sed "s/\.EXE$$/\.pdb/" | xargs` $(DIST)/$(BUILDID)
127 endif # MOZ_DEBUG_SYMBOLS
128 ifdef MOZ_PROFILE
129 echo splitting symbols out of binaries
130 /bin/find $(DIST) -name "*.dll" -exec splitsym {} \;
131 /bin/find $(DIST) -name "*.exe" -exec splitsym {} \;
132 /bin/find $(DIST) -name "*.EXE" -exec splitsym {} \;
133 mkdir -p $(DIST)/$(BUILDID)
134 /bin/find $(DIST) -name "*.dbg" -exec mv {} $(DIST)/$(BUILDID) \;
135 endif # MOZ_PROFILE
136 endif # MOZILLA_OFFICIAL
137 endif # WINNT
139 ifeq ($(OS_ARCH),WINNT)
140 SYM_FIND_CMD := /bin/find . -path dist -prune -o -name "*.exe" \
141 -o -name "*.dll" -o -name "*.EXE" | sed "s/\.[^\.]*$$/\.pdb/"
142 # we want to copy PDB files on Windows
143 MAKE_SYM_STORE_ARGS := -c
144 DUMP_SYMS_BIN := $(topsrcdir)/toolkit/airbag/tools/win32/dump_syms.exe
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"
150 SYM_DIST := $(DIST)/universal
151 else
152 MAKE_SYM_STORE_ARGS := -a $(OS_TEST)
153 SYM_DIST := $(DIST)
154 endif
155 # |file| is stupid on universal binaries, it produces one line of output
156 # for the file, and one line of output for each architecture contained within.
157 SYM_FIND_CMD := find -L $(SYM_DIST) -type f -a -perm -100 -o -name "*.dylib" \
158 | xargs file -L | grep "Mach-O" | grep -v "for architecture" | cut -f1 -d':'
159 DUMP_SYMS_BIN := $(DIST)/host/bin/dump_syms
160 endif
162 buildsymbols:
163 ifdef MOZ_AIRBAG
164 echo building symbol store
165 mkdir -p $(DIST)/crashreporter-symbols/$(BUILDID)
166 $(SYM_FIND_CMD) | \
167 xargs $(topsrcdir)/toolkit/airbag/tools/make_symbol_store.pl \
168 $(MAKE_SYM_STORE_ARGS) $(DUMP_SYMS_BIN) \
169 $(DIST)/crashreporter-symbols/$(BUILDID) > \
170 $(DIST)/crashreporter-symbols/$(BUILDID)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)-$(OS_ARCH)-$(BUILDID)-symbols.txt
171 echo packing symbols
172 mkdir -p $(topsrcdir)/../$(BUILDID)
173 cd $(DIST)/crashreporter-symbols/$(BUILDID) && \
174 zip -r9D ../crashreporter-symbols-$(BUILDID).zip .
175 mv $(DIST)/crashreporter-symbols/crashreporter-symbols-$(BUILDID).zip \
176 $(topsrcdir)/../$(BUILDID)
177 endif # MOZ_AIRBAG
179 uploadsymbols:
180 ifdef MOZ_AIRBAG
181 $(topsrcdir)/toolkit/airbag/tools/upload_symbols.sh $(topsrcdir)/../$(BUILDID)/crashreporter-symbols-$(BUILDID).zip
182 endif
184 ifeq ($(OS_ARCH),WINNT)
185 signnss:
186 ifdef MOZILLA_OFFICIAL
187 echo signing NSS libs
188 cd $(DIST)/bin; ./shlibsign.exe -v -i softokn3.dll
189 cd $(DIST)/bin; ./shlibsign.exe -v -i freebl3.dll
190 endif # MOZILLA_OFFICIAL
192 deliver: splitsymbols rebase signnss
194 endif # WINNT
196 BUILDID = $(shell cat $(DEPTH)/config/build_number)