Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 415 lines (344 sloc) 13.63 kb
01823ab Bug 666908: Remove MAKE:=gmake. Fix editor colorization quoting problem....
Joey Armstrong authored
1 # -*- makefile -*-
2 # vim:set ts=8 sw=8 sts=8 noet:
465265d Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla:...
hg@mozilla.com authored
3 # ***** BEGIN LICENSE BLOCK *****
4 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 #
6 # The contents of this file are subject to the Mozilla Public License Version
7 # 1.1 (the "License"); you may not use this file except in compliance with
8 # the License. You may obtain a copy of the License at
9 # http://www.mozilla.org/MPL/
10 #
11 # Software distributed under the License is distributed on an "AS IS" basis,
12 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 # for the specific language governing rights and limitations under the
14 # License.
15 #
16 # The Original Code is mozilla.org code.
17 #
18 # The Initial Developer of the Original Code is
19 # Netscape Communications Corporation.
20 # Portions created by the Initial Developer are Copyright (C) 1998
21 # the Initial Developer. All Rights Reserved.
22 #
23 # Contributor(s):
24 # Stephen Lamm
25 # Benjamin Smedberg <bsmedberg@covad.net>
26 # Chase Phillips <chase@mozilla.org>
27 # Mark Mentovai <mark@moxienet.com>
01823ab Bug 666908: Remove MAKE:=gmake. Fix editor colorization quoting problem....
Joey Armstrong authored
28 # Joey Armstrong <joey@mozilla.com>
465265d Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla:...
hg@mozilla.com authored
29 #
30 # Alternatively, the contents of this file may be used under the terms of
31 # either the GNU General Public License Version 2 or later (the "GPL"), or
32 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
33 # in which case the provisions of the GPL or the LGPL are applicable instead
34 # of those above. If you wish to allow use of your version of this file only
35 # under the terms of either the GPL or the LGPL, and not to allow others to
36 # use your version of this file under the terms of the MPL, indicate your
37 # decision by deleting the provisions above and replace them with the notice
38 # and other provisions required by the GPL or the LGPL. If you do not delete
39 # the provisions above, a recipient may use your version of this file under
40 # the terms of any one of the MPL, the GPL or the LGPL.
41 #
42 # ***** END LICENSE BLOCK *****
43
44 # Build a mozilla application.
45 #
87c7bb0 @bsmedberg Bug 381611 - Client pull script to checkout Tamarin/NSPR/NSS into the ri...
bsmedberg authored
46 # To build a tree,
47 # 1. hg clone ssh://hg.mozilla.org/mozilla-central mozilla
465265d Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla:...
hg@mozilla.com authored
48 # 2. cd mozilla
b7c2978 client.mk still includes instructions to call python client.py checkout,...
Rob Campbell authored
49 # 3. create your .mozconfig file with
7dcef3f @Swatinem Bug 445143 - "clean mozilla-central from unneeded references to suite, m...
Swatinem authored
50 # ac_add_options --enable-application=browser
3e4e722 @vvuk dummy commit
vvuk authored
51 # 4. gmake -f client.mk
465265d Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla:...
hg@mozilla.com authored
52 #
53 # Other targets (gmake -f client.mk [targets...]),
54 # build
55 # clean (realclean is now the same as clean)
56 # distclean
57 #
72c521c Bug 405228 - "Update build documentation link in client.mk" [p=bugzilla@...
reed@reedloden.com authored
58 # See http://developer.mozilla.org/en/docs/Build_Documentation for
59 # more information.
465265d Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla:...
hg@mozilla.com authored
60 #
61 # Options:
62 # MOZ_BUILD_PROJECTS - Build multiple projects in subdirectories
63 # of MOZ_OBJDIR
64 # MOZ_OBJDIR - Destination object directory
65 # MOZ_MAKE_FLAGS - Flags to pass to $(MAKE)
66 # MOZ_PREFLIGHT_ALL } - Makefiles to run before any project in
67 # MOZ_PREFLIGHT } MOZ_BUILD_PROJECTS, before each project, after
68 # MOZ_POSTFLIGHT } each project, and after all projects; these
69 # MOZ_POSTFLIGHT_ALL } variables contain space-separated lists
70 # MOZ_UNIFY_BDATE - Set to use the same bdate for each project in
71 # MOZ_BUILD_PROJECTS
72 #
73 #######################################################################
74 # Defines
9e9e118 @Callek Bug 608036 - Cleanup some of client.mk r=khuey a=NPOTB
Callek authored
75
465265d Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla:...
hg@mozilla.com authored
76 comma := ,
77
702b16f @bsmedberg Bug 483856 - Use core_abspath and $(CURDIR) instead of shells. Use Prepr...
bsmedberg authored
78 CWD := $(CURDIR)
465265d Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla:...
hg@mozilla.com authored
79 ifneq (1,$(words $(CWD)))
80 $(error The mozilla directory cannot be located in a path with spaces.)
81 endif
82
83 ifeq "$(CWD)" "/"
84 CWD := /.
85 endif
86
87c7bb0 @bsmedberg Bug 381611 - Client pull script to checkout Tamarin/NSPR/NSS into the ri...
bsmedberg authored
87 ifndef TOPSRCDIR
88 ifeq (,$(wildcard client.mk))
2bc3783 Bug 572529 Make it even easier to build with pymake r=ted
Neil Rashbrook authored
89 TOPSRCDIR := $(patsubst %/,%,$(dir $(MAKEFILE_LIST)))
90 MOZ_OBJDIR = .
91 else
92 TOPSRCDIR := $(CWD)
465265d Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla:...
hg@mozilla.com authored
93 endif
94 endif
95
4a7672a @KaiRo-at bug 450948 - Remove Mac case from AUTOCONF detection code - simple, slig...
KaiRo-at authored
96 # try to find autoconf 2.13 - discard errors from 'which'
97 # MacOS X 10.4 sends "no autoconf*" errors to stdout, discard those via grep
98 AUTOCONF ?= $(shell which autoconf-2.13 autoconf2.13 autoconf213 2>/dev/null | grep -v '^no autoconf' | head -1)
e4211cd @benturner Bug 432911 - "Hardcoded autoconf-2.13 in client.mk breaks OS X builds". ...
benturner authored
99
c5e7d73 @gozer-mozillamessaging Bug 454449 - client.mk doesn't gracefully fail if it can't locate autoco...
gozer-mozillamessaging authored
100 ifeq (,$(strip $(AUTOCONF)))
01823ab Bug 666908: Remove MAKE:=gmake. Fix editor colorization quoting problem....
Joey Armstrong authored
101 AUTOCONF=$(error Could not find autoconf 2.13)
c5e7d73 @gozer-mozillamessaging Bug 454449 - client.mk doesn't gracefully fail if it can't locate autoco...
gozer-mozillamessaging authored
102 endif
103
465265d Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla:...
hg@mozilla.com authored
104 MKDIR := mkdir
105 SH := /bin/sh
106 PERL ?= perl
75dc0cf Bug 383167 try #3 - need buildid in an external file, r=luser sr=jst wit...
benjamin@smedbergs.us authored
107 PYTHON ?= python
465265d Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla:...
hg@mozilla.com authored
108
fd051a0 Bug 434068 - client.mk from mozilla-central does not provide CONFIG_GUES...
bcrowder@mozilla.com authored
109 CONFIG_GUESS_SCRIPT := $(wildcard $(TOPSRCDIR)/build/autoconf/config.guess)
110 ifdef CONFIG_GUESS_SCRIPT
111 CONFIG_GUESS = $(shell $(CONFIG_GUESS_SCRIPT))
112 endif
113
465265d Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla:...
hg@mozilla.com authored
114
115 ####################################
116 # Sanity checks
117
118 ifneq (,$(filter MINGW%,$(shell uname -s)))
119 # check for CRLF line endings
120 ifneq (0,$(shell $(PERL) -e 'binmode(STDIN); while (<STDIN>) { if (/\r/) { print "1"; exit } } print "0"' < $(TOPSRCDIR)/client.mk))
121 $(error This source tree appears to have Windows-style line endings. To \
122 convert it to Unix-style line endings, run \
123 "python mozilla/build/win32/mozilla-dos2unix.py")
124 endif
125 endif
126
127 ####################################
128 # Load mozconfig Options
129
130 # See build pages, http://www.mozilla.org/build/ for how to set up mozconfig.
131
87c7bb0 @bsmedberg Bug 381611 - Client pull script to checkout Tamarin/NSPR/NSS into the ri...
bsmedberg authored
132 MOZCONFIG_LOADER := build/autoconf/mozconfig2client-mk
133 MOZCONFIG_FINDER := build/autoconf/mozconfig-find
134 MOZCONFIG_MODULES := build/unix/uniq.pl
465265d Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla:...
hg@mozilla.com authored
135
136
137
87c7bb0 @bsmedberg Bug 381611 - Client pull script to checkout Tamarin/NSPR/NSS into the ri...
bsmedberg authored
138 run_for_side_effects := \
139 $(shell $(TOPSRCDIR)/$(MOZCONFIG_LOADER) $(TOPSRCDIR) $(TOPSRCDIR)/.mozconfig.mk > $(TOPSRCDIR)/.mozconfig.out)
465265d Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla:...
hg@mozilla.com authored
140
87c7bb0 @bsmedberg Bug 381611 - Client pull script to checkout Tamarin/NSPR/NSS into the ri...
bsmedberg authored
141 include $(TOPSRCDIR)/.mozconfig.mk
465265d Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla:...
hg@mozilla.com authored
142
143 ifndef MOZ_OBJDIR
49e431d @khuey Bug 578563: Make objdir builds the default when using client.mk. r=ted a...
khuey authored
144 MOZ_OBJDIR = obj-$(CONFIG_GUESS)
465265d Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla:...
hg@mozilla.com authored
145 endif
49e431d @khuey Bug 578563: Make objdir builds the default when using client.mk. r=ted a...
khuey authored
146
147 ifdef MOZ_BUILD_PROJECTS
148
465265d Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla:...
hg@mozilla.com authored
149 ifdef MOZ_CURRENT_PROJECT
150 OBJDIR = $(MOZ_OBJDIR)/$(MOZ_CURRENT_PROJECT)
151 MOZ_MAKE = $(MAKE) $(MOZ_MAKE_FLAGS) -C $(OBJDIR)
152 BUILD_PROJECT_ARG = MOZ_BUILD_APP=$(MOZ_CURRENT_PROJECT)
153 else
154 OBJDIR = $(error Cannot find the OBJDIR when MOZ_CURRENT_PROJECT is not set.)
155 MOZ_MAKE = $(error Cannot build in the OBJDIR when MOZ_CURRENT_PROJECT is not set.)
156 endif
157
158 else # MOZ_BUILD_PROJECTS
159
49e431d @khuey Bug 578563: Make objdir builds the default when using client.mk. r=ted a...
khuey authored
160 OBJDIR = $(MOZ_OBJDIR)
161 MOZ_MAKE = $(MAKE) $(MOZ_MAKE_FLAGS) -C $(OBJDIR)
465265d Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla:...
hg@mozilla.com authored
162
163 endif # MOZ_BUILD_PROJECTS
164
dd450ca Neaten up the handling of configure script regeneration in client.mk.
Jim Blandy authored
165 # 'configure' scripts generated by autoconf.
a9a82cd l10n tinderbox bustage fix b=375828
neil@parkwaycc.co.uk authored
166 CONFIGURES := $(TOPSRCDIR)/configure
f83d8c9 Bug 97954: Allow SpiderMonkey to be built on its own, or as part of Mozi...
Jim Blandy authored
167 CONFIGURES += $(TOPSRCDIR)/js/src/configure
465265d Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla:...
hg@mozilla.com authored
168
169 #######################################################################
170 # Rules
171
87c7bb0 @bsmedberg Bug 381611 - Client pull script to checkout Tamarin/NSPR/NSS into the ri...
bsmedberg authored
172 # The default rule is build
173 build::
78f6262 @glandium Bug 643704 - Allow to trigger PGO builds through mozconfig. r=ted
glandium authored
174 $(MAKE) -f $(TOPSRCDIR)/client.mk $(if $(MOZ_PGO),profiledbuild,realbuild)
175
87c7bb0 @bsmedberg Bug 381611 - Client pull script to checkout Tamarin/NSPR/NSS into the ri...
bsmedberg authored
176
465265d Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla:...
hg@mozilla.com authored
177 # Print out any options loaded from mozconfig.
78f6262 @glandium Bug 643704 - Allow to trigger PGO builds through mozconfig. r=ted
glandium authored
178 all realbuild clean depend distclean export libs install realclean::
465265d Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla:...
hg@mozilla.com authored
179 @if test -f .mozconfig.out; then \
180 cat .mozconfig.out; \
181 rm -f .mozconfig.out; \
182 else true; \
183 fi
184
185 # Windows equivalents
186 build_all: build
187 build_all_dep: alldep
188 build_all_depend: alldep
189 clobber clobber_all: clean
190
191 # Do everything from scratch
87c7bb0 @bsmedberg Bug 381611 - Client pull script to checkout Tamarin/NSPR/NSS into the ri...
bsmedberg authored
192 everything: clean build
465265d Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla:...
hg@mozilla.com authored
193
d143c68 bug 419348 - build config fixes for profile-guided optimization on mac. ...
ted.mielczarek@gmail.com authored
194 ####################################
195 # Profile-Guided Optimization
196 # To use this, you should set the following variables in your mozconfig
197 # mk_add_options PROFILE_GEN_SCRIPT=/path/to/profile-script
198 #
199 # The profile script should exercise the functionality to be included
200 # in the profile feedback.
201 #
202 # This is up here, outside of the MOZ_CURRENT_PROJECT logic so that this
203 # is usable in multi-pass builds, where you might not have a runnable
204 # application until all the build passes and postflight scripts have run.
205 ifdef MOZ_OBJDIR
206 PGO_OBJDIR = $(MOZ_OBJDIR)
207 else
208 PGO_OBJDIR := $(TOPSRCDIR)
209 endif
210
211 profiledbuild::
78f6262 @glandium Bug 643704 - Allow to trigger PGO builds through mozconfig. r=ted
glandium authored
212 $(MAKE) -f $(TOPSRCDIR)/client.mk realbuild MOZ_PROFILE_GENERATE=1
d5fc5a0 @michaelwu Bug 589971 - Omnijar before profiling part of PGO, r=ted a=beltzner
michaelwu authored
213 $(MAKE) -C $(PGO_OBJDIR) package
8ae245a @michaelwu Bug 641614 - Fix reordering of localized files in omnijar, r=ted
michaelwu authored
214 OBJDIR=${PGO_OBJDIR} JARLOG_DIR=${PGO_OBJDIR}/jarlog/en-US $(PROFILE_GEN_SCRIPT)
d143c68 bug 419348 - build config fixes for profile-guided optimization on mac. ...
ted.mielczarek@gmail.com authored
215 $(MAKE) -f $(TOPSRCDIR)/client.mk maybe_clobber_profiledbuild
78f6262 @glandium Bug 643704 - Allow to trigger PGO builds through mozconfig. r=ted
glandium authored
216 $(MAKE) -f $(TOPSRCDIR)/client.mk realbuild MOZ_PROFILE_USE=1
d143c68 bug 419348 - build config fixes for profile-guided optimization on mac. ...
ted.mielczarek@gmail.com authored
217
465265d Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla:...
hg@mozilla.com authored
218 #####################################################
219 # Build date unification
220
221 ifdef MOZ_UNIFY_BDATE
222 ifndef MOZ_BUILD_DATE
223 ifdef MOZ_BUILD_PROJECTS
75dc0cf Bug 383167 try #3 - need buildid in an external file, r=luser sr=jst wit...
benjamin@smedbergs.us authored
224 MOZ_BUILD_DATE = $(shell $(PYTHON) $(TOPSRCDIR)/toolkit/xre/make-platformini.py --print-buildid)
465265d Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla:...
hg@mozilla.com authored
225 export MOZ_BUILD_DATE
226 endif
227 endif
228 endif
229
230 #####################################################
231 # Preflight, before building any project
232
78f6262 @glandium Bug 643704 - Allow to trigger PGO builds through mozconfig. r=ted
glandium authored
233 realbuild alldep preflight_all::
465265d Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla:...
hg@mozilla.com authored
234 ifeq (,$(MOZ_CURRENT_PROJECT)$(if $(MOZ_PREFLIGHT_ALL),,1))
235 # Don't run preflight_all for individual projects in multi-project builds
236 # (when MOZ_CURRENT_PROJECT is set.)
237 ifndef MOZ_BUILD_PROJECTS
238 # Building a single project, OBJDIR is usable.
239 set -e; \
240 for mkfile in $(MOZ_PREFLIGHT_ALL); do \
241 $(MAKE) -f $(TOPSRCDIR)/$$mkfile preflight_all TOPSRCDIR=$(TOPSRCDIR) OBJDIR=$(OBJDIR) MOZ_OBJDIR=$(MOZ_OBJDIR); \
242 done
243 else
244 # OBJDIR refers to the project-specific OBJDIR, which is not available at
245 # this point when building multiple projects. Only MOZ_OBJDIR is available.
246 set -e; \
247 for mkfile in $(MOZ_PREFLIGHT_ALL); do \
248 $(MAKE) -f $(TOPSRCDIR)/$$mkfile preflight_all TOPSRCDIR=$(TOPSRCDIR) MOZ_OBJDIR=$(MOZ_OBJDIR) MOZ_BUILD_PROJECTS="$(MOZ_BUILD_PROJECTS)"; \
249 done
250 endif
251 endif
252
253 # If we're building multiple projects, but haven't specified which project,
254 # loop through them.
255
256 ifeq (,$(MOZ_CURRENT_PROJECT)$(if $(MOZ_BUILD_PROJECTS),,1))
78f6262 @glandium Bug 643704 - Allow to trigger PGO builds through mozconfig. r=ted
glandium authored
257 configure depend realbuild install export libs clean realclean distclean alldep preflight postflight maybe_clobber_profiledbuild upload sdk::
465265d Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla:...
hg@mozilla.com authored
258 set -e; \
259 for app in $(MOZ_BUILD_PROJECTS); do \
260 $(MAKE) -f $(TOPSRCDIR)/client.mk $@ MOZ_CURRENT_PROJECT=$$app; \
261 done
262
263 else
264
265 # MOZ_CURRENT_PROJECT: either doing a single-project build, or building an
266 # individual project in a multi-project build.
267
268 ####################################
269 # Configure
270
271 CONFIG_STATUS = $(wildcard $(OBJDIR)/config.status)
272 CONFIG_CACHE = $(wildcard $(OBJDIR)/config.cache)
273
274 EXTRA_CONFIG_DEPS := \
275 $(TOPSRCDIR)/aclocal.m4 \
276 $(wildcard $(TOPSRCDIR)/build/autoconf/*.m4) \
f83d8c9 Bug 97954: Allow SpiderMonkey to be built on its own, or as part of Mozi...
Jim Blandy authored
277 $(TOPSRCDIR)/js/src/aclocal.m4 \
465265d Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla:...
hg@mozilla.com authored
278 $(NULL)
279
dd450ca Neaten up the handling of configure script regeneration in client.mk.
Jim Blandy authored
280 $(CONFIGURES): %: %.in $(EXTRA_CONFIG_DEPS)
465265d Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla:...
hg@mozilla.com authored
281 @echo Generating $@ using autoconf
dd450ca Neaten up the handling of configure script regeneration in client.mk.
Jim Blandy authored
282 cd $(@D); $(AUTOCONF)
465265d Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla:...
hg@mozilla.com authored
283
284 CONFIG_STATUS_DEPS := \
dd450ca Neaten up the handling of configure script regeneration in client.mk.
Jim Blandy authored
285 $(wildcard $(CONFIGURES)) \
84a5960 bug 439078, add allmakefiles.sh to CONFIG_STATUS_DEPS, r=ted
Axel Hecht authored
286 $(TOPSRCDIR)/allmakefiles.sh \
465265d Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla:...
hg@mozilla.com authored
287 $(TOPSRCDIR)/.mozconfig.mk \
d05bbbc Bug 480680 - nsprpub/configure often gets this unwanted(!?) local modifi...
Serge Gautherie authored
288 $(wildcard $(TOPSRCDIR)/nsprpub/configure) \
465265d Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla:...
hg@mozilla.com authored
289 $(wildcard $(TOPSRCDIR)/config/milestone.txt) \
bc05b06 @khuey Bug 644164: Make configure depend on the Firefox version. r=ted
khuey authored
290 $(wildcard $(TOPSRCDIR)/js/src/config/milestone.txt) \
291 $(wildcard $(TOPSRCDIR)/browser/config/version.txt) \
9e9e118 @Callek Bug 608036 - Cleanup some of client.mk r=khuey a=NPOTB
Callek authored
292 $(wildcard $(addsuffix confvars.sh,$(wildcard $(TOPSRCDIR)/*/))) \
465265d Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla:...
hg@mozilla.com authored
293 $(NULL)
294
295 # configure uses the program name to determine @srcdir@. Calling it without
296 # $(TOPSRCDIR) will set @srcdir@ to "."; otherwise, it is set to the full
297 # path of $(TOPSRCDIR).
298 ifeq ($(TOPSRCDIR),$(OBJDIR))
299 CONFIGURE = ./configure
300 else
301 CONFIGURE = $(TOPSRCDIR)/configure
302 endif
303
dd450ca Neaten up the handling of configure script regeneration in client.mk.
Jim Blandy authored
304 configure-files: $(CONFIGURES)
305
306 configure:: configure-files
465265d Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla:...
hg@mozilla.com authored
307 ifdef MOZ_BUILD_PROJECTS
308 @if test ! -d $(MOZ_OBJDIR); then $(MKDIR) $(MOZ_OBJDIR); else true; fi
309 endif
310 @if test ! -d $(OBJDIR); then $(MKDIR) $(OBJDIR); else true; fi
311 @echo cd $(OBJDIR);
312 @echo $(CONFIGURE) $(CONFIGURE_ARGS)
313 @cd $(OBJDIR) && $(BUILD_PROJECT_ARG) $(CONFIGURE_ENV_ARGS) $(CONFIGURE) $(CONFIGURE_ARGS) \
314 || ( echo "*** Fix above errors and then restart with\
315 \"$(MAKE) -f client.mk build\"" && exit 1 )
316 @touch $(OBJDIR)/Makefile
317
318 $(OBJDIR)/Makefile $(OBJDIR)/config.status: $(CONFIG_STATUS_DEPS)
319 @$(MAKE) -f $(TOPSRCDIR)/client.mk configure
320
321 ifneq (,$(CONFIG_STATUS))
322 $(OBJDIR)/config/autoconf.mk: $(TOPSRCDIR)/config/autoconf.mk.in
323 cd $(OBJDIR); \
324 CONFIG_FILES=config/autoconf.mk ./config.status
325 endif
326
327
328 ####################################
329 # Depend
330
331 depend:: $(OBJDIR)/Makefile $(OBJDIR)/config.status
332 $(MOZ_MAKE) export && $(MOZ_MAKE) depend
333
334 ####################################
335 # Preflight
336
78f6262 @glandium Bug 643704 - Allow to trigger PGO builds through mozconfig. r=ted
glandium authored
337 realbuild alldep preflight::
465265d Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla:...
hg@mozilla.com authored
338 ifdef MOZ_PREFLIGHT
339 set -e; \
340 for mkfile in $(MOZ_PREFLIGHT); do \
341 $(MAKE) -f $(TOPSRCDIR)/$$mkfile preflight TOPSRCDIR=$(TOPSRCDIR) OBJDIR=$(OBJDIR) MOZ_OBJDIR=$(MOZ_OBJDIR); \
342 done
343 endif
344
345 ####################################
346 # Build it
347
78f6262 @glandium Bug 643704 - Allow to trigger PGO builds through mozconfig. r=ted
glandium authored
348 realbuild:: $(OBJDIR)/Makefile $(OBJDIR)/config.status
465265d Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla:...
hg@mozilla.com authored
349 $(MOZ_MAKE)
350
351 ####################################
352 # Other targets
353
354 # Pass these target onto the real build system
80e30b8 @catlee bug 445191 - Add upload target for xulrunner, upload SDK if it exists, ...
catlee authored
355 install export libs clean realclean distclean alldep maybe_clobber_profiledbuild upload sdk:: $(OBJDIR)/Makefile $(OBJDIR)/config.status
465265d Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla:...
hg@mozilla.com authored
356 $(MOZ_MAKE) $@
357
358 ####################################
359 # Postflight
360
78f6262 @glandium Bug 643704 - Allow to trigger PGO builds through mozconfig. r=ted
glandium authored
361 realbuild alldep postflight::
465265d Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla:...
hg@mozilla.com authored
362 ifdef MOZ_POSTFLIGHT
363 set -e; \
364 for mkfile in $(MOZ_POSTFLIGHT); do \
365 $(MAKE) -f $(TOPSRCDIR)/$$mkfile postflight TOPSRCDIR=$(TOPSRCDIR) OBJDIR=$(OBJDIR) MOZ_OBJDIR=$(MOZ_OBJDIR); \
366 done
367 endif
368
369 endif # MOZ_CURRENT_PROJECT
370
371 ####################################
372 # Postflight, after building all projects
373
78f6262 @glandium Bug 643704 - Allow to trigger PGO builds through mozconfig. r=ted
glandium authored
374 realbuild alldep postflight_all::
465265d Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla:...
hg@mozilla.com authored
375 ifeq (,$(MOZ_CURRENT_PROJECT)$(if $(MOZ_POSTFLIGHT_ALL),,1))
376 # Don't run postflight_all for individual projects in multi-project builds
377 # (when MOZ_CURRENT_PROJECT is set.)
378 ifndef MOZ_BUILD_PROJECTS
379 # Building a single project, OBJDIR is usable.
380 set -e; \
381 for mkfile in $(MOZ_POSTFLIGHT_ALL); do \
382 $(MAKE) -f $(TOPSRCDIR)/$$mkfile postflight_all TOPSRCDIR=$(TOPSRCDIR) OBJDIR=$(OBJDIR) MOZ_OBJDIR=$(MOZ_OBJDIR); \
383 done
384 else
385 # OBJDIR refers to the project-specific OBJDIR, which is not available at
386 # this point when building multiple projects. Only MOZ_OBJDIR is available.
387 set -e; \
388 for mkfile in $(MOZ_POSTFLIGHT_ALL); do \
389 $(MAKE) -f $(TOPSRCDIR)/$$mkfile postflight_all TOPSRCDIR=$(TOPSRCDIR) MOZ_OBJDIR=$(MOZ_OBJDIR) MOZ_BUILD_PROJECTS="$(MOZ_BUILD_PROJECTS)"; \
390 done
391 endif
392 endif
393
394 cleansrcdir:
395 @cd $(TOPSRCDIR); \
396 if [ -f Makefile ]; then \
397 $(MAKE) distclean ; \
398 else \
399 echo "Removing object files from srcdir..."; \
400 rm -fr `find . -type d \( -name .deps -print -o -name CVS \
401 -o -exec test ! -d {}/CVS \; \) -prune \
402 -o \( -name '*.[ao]' -o -name '*.so' \) -type f -print`; \
403 build/autoconf/clean-config.sh; \
404 fi;
405
bad0dbf bug 378762, opening a backdoor for client.mk vars, r=bsmedberg
axel@pike.org authored
406 echo-variable-%:
407 @echo $($*)
465265d Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla:...
hg@mozilla.com authored
408
f070fe7 @mrbkap Bug 422986 - client.mk doesn't support parallel make. r=ted
mrbkap authored
409 # This makefile doesn't support parallel execution. It does pass
410 # MOZ_MAKE_FLAGS to sub-make processes, so they will correctly execute
411 # in parallel.
412 .NOTPARALLEL:
413
78f6262 @glandium Bug 643704 - Allow to trigger PGO builds through mozconfig. r=ted
glandium authored
414 .PHONY: checkout real_checkout depend realbuild build profiledbuild maybe_clobber_profiledbuild export libs alldep install clean realclean distclean cleansrcdir pull_all build_all clobber clobber_all pull_and_build_all everything configure preflight_all preflight postflight postflight_all upload sdk
Something went wrong with that request. Please try again.