For bug 379240, update bootstrap.cfg for RC2
[mozilla-1.9.git] / client.mk
blobd1f096b60f6af9db4d58cf53667aa81a5b5e742d
1 # ***** BEGIN LICENSE BLOCK *****
2 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 # The contents of this file are subject to the Mozilla Public License Version
5 # 1.1 (the "License"); you may not use this file except in compliance with
6 # the License. You may obtain a copy of the License at
7 # http://www.mozilla.org/MPL/
9 # Software distributed under the License is distributed on an "AS IS" basis,
10 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 # for the specific language governing rights and limitations under the
12 # License.
14 # The Original Code is mozilla.org code.
16 # The Initial Developer of the Original Code is
17 # Netscape Communications Corporation.
18 # Portions created by the Initial Developer are Copyright (C) 1998
19 # the Initial Developer. All Rights Reserved.
21 # Contributor(s):
22 # Stephen Lamm
23 # Benjamin Smedberg <bsmedberg@covad.net>
24 # Chase Phillips <chase@mozilla.org>
25 # Mark Mentovai <mark@moxienet.com>
27 # Alternatively, the contents of this file may be used under the terms of
28 # either the GNU General Public License Version 2 or later (the "GPL"), or
29 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
30 # in which case the provisions of the GPL or the LGPL are applicable instead
31 # of those above. If you wish to allow use of your version of this file only
32 # under the terms of either the GPL or the LGPL, and not to allow others to
33 # use your version of this file under the terms of the MPL, indicate your
34 # decision by deleting the provisions above and replace them with the notice
35 # and other provisions required by the GPL or the LGPL. If you do not delete
36 # the provisions above, a recipient may use your version of this file under
37 # the terms of any one of the MPL, the GPL or the LGPL.
39 # ***** END LICENSE BLOCK *****
41 # Build a mozilla application.
43 # To checkout and build a tree,
44 # 1. cvs co mozilla/client.mk
45 # 2. cd mozilla
46 # 3. create your .mozconfig file with
47 # mk_add_options MOZ_CO_PROJECT=
48 # suite,browser
49 # 4. gmake -f client.mk
51 # This script will pick up the CVSROOT from the CVS/Root file. If you wish
52 # to use a different CVSROOT, you must set CVSROOT in your environment:
54 # export CVSROOT=:pserver:anonymous:anonymous@cvs-mirror.mozilla.org:/cvsroot
55 # export CVSROOT=:pserver:username%somedomain.org@cvs.mozilla.org:/cvsroot
57 # You must specify which products/modules you wish to checkout, with
58 # MOZ_CO_PROJECT and MOZ_CO_MODULE variables.
60 # MOZ_CO_PROJECT possibilities include the following:
61 # suite (Seamonkey suite)
62 # browser (aka Firefox)
63 # mail (aka Thunderbird)
64 # minimo (small browser for devices)
65 # composer (standalone composer, aka NVU)
66 # calendar (aka Sunbird, use this to build the calendar extensions also)
67 # xulrunner
68 # camino
69 # tamarin
71 # Other common MOZ_CO_MODULE options include the following:
72 # mozilla/other-licenses/libart_lgpl
73 # mozilla/other-licenses/bsdiff
74 # mozilla/tools/codesighs
76 # Other targets (gmake -f client.mk [targets...]),
77 # checkout
78 # build
79 # clean (realclean is now the same as clean)
80 # distclean
82 # See http://www.mozilla.org/build/ for more information.
84 # Options:
85 # MOZ_BUILD_PROJECTS - Build multiple projects in subdirectories
86 # of MOZ_OBJDIR
87 # MOZ_OBJDIR - Destination object directory
88 # MOZ_CO_DATE - Date tag to use for checkout (default: none)
89 # MOZ_CO_LOCALES_DATE - Date tag to use for locale checkout
90 # (default: MOZ_CO_DATE)
91 # MOZ_CO_MODULE - Module to checkout
92 # MOZ_CVS_FLAGS - Flags to pass cvs (default: -q -z3)
93 # MOZ_CO_FLAGS - Flags to pass after 'cvs co' (default: -P)
94 # MOZ_MAKE_FLAGS - Flags to pass to $(MAKE)
95 # MOZ_CO_LOCALES - localizations to pull (MOZ_CO_LOCALES="de-DE,pt-BR")
96 # MOZ_LOCALE_DIRS - directories which contain localizations
97 # LOCALES_CVSROOT - CVSROOT to use to pull localizations
98 # MOZ_PREFLIGHT_ALL } - Makefiles to run before any project in
99 # MOZ_PREFLIGHT } MOZ_BUILD_PROJECTS, before each project, after
100 # MOZ_POSTFLIGHT } each project, and after all projects; these
101 # MOZ_POSTFLIGHT_ALL } variables contain space-separated lists
102 # MOZ_UNIFY_BDATE - Set to use the same bdate for each project in
103 # MOZ_BUILD_PROJECTS
106 AVAILABLE_PROJECTS = \
107 all \
108 suite \
109 toolkit \
110 browser \
111 mail \
112 minimo \
113 composer \
114 calendar \
115 xulrunner \
116 camino \
117 necko \
118 tamarin \
119 $(NULL)
121 # Trailing / on top-level mozilla dir required to stop fast-update thinking
122 # it is a module name.
123 MODULES_NS_necko := \
124 mozilla/ \
125 $(NULL)
127 MODULES_necko := \
128 mozilla/README \
129 mozilla/config \
130 mozilla/build \
131 mozilla/intl \
132 mozilla/modules/libpref \
133 mozilla/modules/zlib \
134 mozilla/netwerk \
135 mozilla/xpcom \
136 mozilla/tools/test-harness \
137 $(NULL)
139 MODULES_NS_core := \
140 $(MODULES_NS_necko) \
141 mozilla/js \
142 mozilla/js/src \
143 mozilla/js/jsd \
144 mozilla/db \
145 $(NULL)
147 MODULES_core := \
148 $(MODULES_necko) \
149 mozilla/caps \
150 mozilla/content \
151 mozilla/db/mdb \
152 mozilla/db/mork \
153 mozilla/docshell \
154 mozilla/dom \
155 mozilla/editor \
156 mozilla/embedding \
157 mozilla/extensions \
158 mozilla/gfx \
159 mozilla/parser \
160 mozilla/layout \
161 mozilla/jpeg \
162 mozilla/js/src/fdlibm \
163 mozilla/js/src/liveconnect \
164 mozilla/js/src/xpconnect \
165 mozilla/js/jsd/idl \
166 mozilla/modules/libimg \
167 mozilla/modules/libjar \
168 mozilla/modules/libpr0n \
169 mozilla/modules/libreg \
170 mozilla/modules/libutil \
171 mozilla/modules/oji \
172 mozilla/modules/plugin \
173 mozilla/modules/staticmod \
174 mozilla/plugin/oji \
175 mozilla/profile \
176 mozilla/rdf \
177 mozilla/security/manager \
178 mozilla/sun-java \
179 mozilla/ipc/ipcd \
180 mozilla/modules/libpr0n \
181 mozilla/modules/libmar \
182 mozilla/modules/libbz2 \
183 mozilla/accessible \
184 mozilla/other-licenses/atk-1.0 \
185 mozilla/other-licenses/ia2 \
186 mozilla/security/manager \
187 mozilla/tools/elf-dynstr-gc \
188 mozilla/uriloader \
189 mozilla/view \
190 mozilla/webshell \
191 mozilla/widget \
192 mozilla/xpfe \
193 mozilla/xpinstall \
194 mozilla/toolkit \
195 mozilla/storage \
196 mozilla/db/sqlite3 \
197 mozilla/db/morkreader \
198 mozilla/testing/mochitest \
199 $(NULL)
201 LOCALES_necko := \
202 netwerk \
203 $(NULL)
205 LOCALES_core := \
206 $(LOCALES_necko) \
207 dom \
208 $(NULL)
210 BOOTSTRAP_necko := \
211 mozilla/browser/config/version.txt \
212 mozilla/mail/config/version.txt \
213 mozilla/calendar/sunbird/config/version.txt \
214 mozilla/suite/config/version.txt \
215 $(NULL)
217 BOOTSTRAP_core := \
218 $(BOOTSTRAP_necko) \
219 $(NULL)
221 MODULES_NS_toolkit := \
222 $(MODULES_NS_core) \
223 $(NULL)
225 MODULES_toolkit := \
226 $(MODULES_core) \
227 mozilla/chrome \
228 $(NULL)
230 LOCALES_toolkit := \
231 $(LOCALES_core) \
232 toolkit \
233 security/manager \
234 $(NULL)
236 BOOTSTRAP_toolkit := \
237 $(BOOTSTRAP_core) \
238 $(NULL)
240 MODULES_NS_suite := \
241 $(MODULES_NS_toolkit) \
242 $(NULL)
244 MODULES_suite := \
245 $(MODULES_toolkit) \
246 mozilla/directory/xpcom \
247 mozilla/mailnews \
248 mozilla/themes \
249 mozilla/suite \
250 $(NULL)
252 LOCALES_suite := \
253 $(LOCALES_toolkit) \
254 suite \
255 editor/ui \
256 extensions/reporter \
257 $(NULL)
259 BOOTSTRAP_suite := \
260 $(BOOTSTRAP_toolkit) \
261 $(NULL)
263 MODULES_NS_browser := \
264 $(MODULES_NS_toolkit) \
265 $(NULL)
267 MODULES_browser := \
268 $(MODULES_toolkit) \
269 mozilla/browser \
270 mozilla/other-licenses/branding/firefox \
271 mozilla/other-licenses/7zstub/firefox \
272 $(NULL)
274 LOCALES_browser := \
275 $(LOCALES_toolkit) \
276 browser \
277 extensions/reporter \
278 extensions/spellcheck \
279 other-licenses/branding/firefox \
280 $(NULL)
282 BOOTSTRAP_browser := \
283 $(BOOTSTRAP_toolkit) \
284 mozilla/browser/config/mozconfig \
285 $(NULL)
287 MODULES_NS_minimo := \
288 $(MODULES_NS_toolkit) \
289 $(NULL)
291 MODULES_minimo := \
292 $(MODULES_toolkit) \
293 mozilla/minimo \
294 $(NULL)
296 BOOTSTRAP_minimo := \
297 $(BOOTSTRAP_toolkit) \
298 $(NULL)
300 MODULES_NS_mail := \
301 $(MODULES_NS_toolkit) \
302 $(NULL)
304 MODULES_mail := \
305 $(MODULES_toolkit) \
306 mozilla/directory/xpcom \
307 mozilla/mailnews \
308 mozilla/mail \
309 mozilla/other-licenses/branding/thunderbird \
310 mozilla/other-licenses/7zstub/thunderbird \
311 $(NULL)
313 LOCALES_mail := \
314 $(LOCALES_toolkit) \
315 mail \
316 other-licenses/branding/thunderbird \
317 editor/ui \
318 extensions/spellcheck \
319 $(NULL)
321 BOOTSTRAP_mail := \
322 $(BOOTSTRAP_toolkit) \
323 mozilla/mail/config/mozconfig \
324 $(NULL)
326 MODULES_composer := \
327 $(MODULES_toolkit) \
328 mozilla/composer \
329 $(NULL)
331 MODULES_NS_calendar := \
332 $(MODULES_NS_toolkit) \
333 $(NULL)
335 MODULES_calendar := \
336 $(MODULES_toolkit) \
337 mozilla/storage \
338 mozilla/db/sqlite3 \
339 mozilla/calendar \
340 mozilla/other-licenses/branding/sunbird \
341 mozilla/other-licenses/7zstub/sunbird \
342 $(NULL)
344 LOCALES_calendar := \
345 $(LOCALES_toolkit) \
346 calendar \
347 other-licenses/branding/sunbird \
348 $(NULL)
350 BOOTSTRAP_calendar := \
351 $(BOOTSTRAP_toolkit) \
352 mozilla/calendar/sunbird/config/mozconfig \
353 $(NULL)
355 MODULES_NS_xulrunner := \
356 $(MODULES_NS_toolkit) \
357 $(NULL)
359 MODULES_xulrunner := \
360 $(MODULES_toolkit) \
361 mozilla/xulrunner \
362 $(NULL)
364 LOCALES_xulrunner := \
365 $(LOCALES_toolkit) \
366 $(NULL)
368 BOOTSTRAP_xulrunner := \
369 $(BOOTSTRAP_toolkit) \
370 mozilla/xulrunner/config/mozconfig \
371 $(NULL)
373 MODULES_NS_camino := \
374 $(MODULES_NS_toolkit) \
375 $(NULL)
377 MODULES_camino := \
378 $(MODULES_core) \
379 mozilla/camino \
380 mozilla/themes \
381 $(NULL)
383 BOOTSTRAP_camino := \
384 $(BOOTSTRAP_toolkit) \
385 mozilla/camino/config/mozconfig \
386 $(NULL)
388 MODULES_tamarin := \
389 mozilla/js/tamarin \
390 mozilla/modules/zlib \
391 $(NULL)
393 MODULES_all := \
394 mozilla/other-licenses/bsdiff \
395 mozilla/other-licenses/libart_lgpl \
396 mozilla/tools/trace-malloc \
397 mozilla/tools/jprof \
398 mozilla/tools/codesighs \
399 mozilla/tools/update-packaging \
400 $(NULL)
402 #######################################################################
403 # Checkout Tags
405 # For branches, uncomment the MOZ_CO_TAG line with the proper tag,
406 # and commit this file on that tag.
407 #MOZ_CO_TAG = <tag>
408 NSPR_CO_TAG = NSPRPUB_PRE_4_2_CLIENT_BRANCH
409 NSS_CO_TAG = NSS_3_11_7_BETA1
410 LDAPCSDK_CO_TAG = LDAPCSDK_6_0_3_CLIENT_BRANCH
411 LOCALES_CO_TAG =
413 #######################################################################
414 # Defines
416 CVS = cvs
417 comma := ,
419 CWD := $(shell pwd)
420 ifneq (1,$(words $(CWD)))
421 $(error The mozilla directory cannot be located in a path with spaces.)
422 endif
424 ifeq "$(CWD)" "/"
425 CWD := /.
426 endif
428 ifneq (, $(wildcard client.mk))
429 # Ran from mozilla directory
430 ROOTDIR := $(shell dirname $(CWD))
431 TOPSRCDIR := $(CWD)
432 else
433 # Ran from mozilla/.. directory (?)
434 ROOTDIR := $(CWD)
435 TOPSRCDIR := $(CWD)/mozilla
436 endif
438 # on os2, TOPSRCDIR may have two forward slashes in a row, which doesn't
439 # work; replace first instance with one forward slash
440 TOPSRCDIR := $(shell echo "$(TOPSRCDIR)" | sed -e 's%//%/%')
442 ifndef TOPSRCDIR_MOZ
443 TOPSRCDIR_MOZ=$(TOPSRCDIR)
444 endif
446 # if ROOTDIR equals only drive letter (i.e. "C:"), set to "/"
447 DIRNAME := $(shell echo "$(ROOTDIR)" | sed -e 's/^.://')
448 ifeq ($(DIRNAME),)
449 ROOTDIR := /.
450 endif
452 AUTOCONF := autoconf
453 MKDIR := mkdir
454 SH := /bin/sh
455 ifndef MAKE
456 MAKE := gmake
457 endif
458 PERL ?= perl
460 CONFIG_GUESS_SCRIPT := $(wildcard $(TOPSRCDIR)/build/autoconf/config.guess)
461 ifdef CONFIG_GUESS_SCRIPT
462 CONFIG_GUESS = $(shell $(CONFIG_GUESS_SCRIPT))
463 else
464 _IS_FIRST_CHECKOUT := 1
465 endif
467 ####################################
468 # Sanity checks
470 ifneq (,$(filter MINGW%,$(shell uname -s)))
471 # check for CRLF line endings
472 ifneq (0,$(shell $(PERL) -e 'binmode(STDIN); while (<STDIN>) { if (/\r/) { print "1"; exit } } print "0"' < $(TOPSRCDIR)/client.mk))
473 $(error This source tree appears to have Windows-style line endings. To \
474 convert it to Unix-style line endings, run \
475 "python mozilla/build/win32/mozilla-dos2unix.py")
476 endif
477 endif
479 ####################################
480 # CVS
482 # Add the CVS root to CVS_FLAGS if needed
483 CVS_ROOT_IN_TREE := $(shell cat $(TOPSRCDIR)/CVS/Root 2>/dev/null)
484 ifneq ($(CVS_ROOT_IN_TREE),)
485 ifneq ($(CVS_ROOT_IN_TREE),$(CVSROOT))
486 CVS_FLAGS := -d $(CVS_ROOT_IN_TREE)
487 endif
488 endif
490 CVS_CO_DATE_FLAGS = $(if $(MOZ_CO_DATE),-D "$(MOZ_CO_DATE)")
491 CVS_CO_LOCALES_DATE_FLAGS = $(if $(MOZ_CO_LOCALES_DATE),-D "$(MOZ_CO_LOCALES_DATE)")
492 CVSCO = $(CVS) $(CVS_FLAGS) co $(MOZ_CO_FLAGS) $(if $(MOZ_CO_TAG),-r $(MOZ_CO_TAG)) $(CVS_CO_DATE_FLAGS)
494 MOZ_CO_LOCALES_DATE ?= $(MOZ_CO_DATE)
496 CVSCO_LOGFILE := $(ROOTDIR)/cvsco.log
497 CVSCO_LOGFILE := $(shell echo $(CVSCO_LOGFILE) | sed s%//%/%)
499 # if LOCALES_CVSROOT is not specified, set it here
500 # (and let mozconfig override it)
501 LOCALES_CVSROOT ?= :pserver:anonymous:anonymous@cvs-mirror.mozilla.org:/l10n
503 ####################################
504 # Load mozconfig Options
506 # See build pages, http://www.mozilla.org/build/ for how to set up mozconfig.
508 MOZCONFIG_LOADER := mozilla/build/autoconf/mozconfig2client-mk
509 MOZCONFIG_FINDER := mozilla/build/autoconf/mozconfig-find
510 MOZCONFIG_MODULES := mozilla/build/unix/uniq.pl
511 run_for_side_effects := \
512 $(shell cd $(ROOTDIR); \
513 if test "$(_IS_FIRST_CHECKOUT)"; then \
514 $(CVSCO) $(MOZCONFIG_FINDER) $(MOZCONFIG_LOADER) $(MOZCONFIG_MODULES); \
515 else true; \
516 fi; \
517 $(MOZCONFIG_LOADER) $(TOPSRCDIR) mozilla/.mozconfig.mk > mozilla/.mozconfig.out)
518 include $(TOPSRCDIR)/.mozconfig.mk
520 ####################################
521 # Options that may come from mozconfig
523 MOZ_PROJECT_LIST := $(subst $(comma), ,$(MOZ_CO_PROJECT))
524 MOZ_PROJECT_LIST := $(subst macbrowser,camino,$(MOZ_PROJECT_LIST))
526 ifneq (,$(filter-out $(AVAILABLE_PROJECTS),$(MOZ_PROJECT_LIST)))
527 $(error MOZ_CO_PROJECT contains an unrecognized project.)
528 endif
530 ifeq (all,$(filter all,$(MOZ_PROJECT_LIST)))
531 MOZ_PROJECT_LIST := $(AVAILABLE_PROJECTS)
532 endif
534 MOZ_MODULE_LIST := $(subst $(comma), ,$(MOZ_CO_MODULE)) $(foreach project,$(MOZ_PROJECT_LIST),$(MODULES_$(project)))
535 MOZ_MODULE_LIST_NS := $(foreach project,$(MOZ_PROJECT_LIST),$(MODULES_NS_$(project)))
536 LOCALE_DIRS := $(MOZ_LOCALE_DIRS) $(foreach project,$(MOZ_PROJECT_LIST),$(LOCALES_$(project)))
538 MOZCONFIG_MODULES += $(foreach project,$(MOZ_PROJECT_LIST),$(BOOTSTRAP_$(project)))
540 # Using $(sort) here because it also removes duplicate entries.
541 MOZ_MODULE_LIST := $(sort $(MOZ_MODULE_LIST))
542 LOCALE_DIRS := $(sort $(LOCALE_DIRS))
543 MOZCONFIG_MODULES := $(sort $(MOZCONFIG_MODULES))
545 # Change CVS flags if anonymous root is requested
546 ifdef MOZ_CO_USE_MIRROR
547 CVS_FLAGS := -d :pserver:anonymous:anonymous@cvs-mirror.mozilla.org:/cvsroot
548 endif
550 # MOZ_CVS_FLAGS - Basic CVS flags
551 ifeq "$(origin MOZ_CVS_FLAGS)" "undefined"
552 CVS_FLAGS := $(CVS_FLAGS) -q -z 3
553 else
554 CVS_FLAGS := $(MOZ_CVS_FLAGS)
555 endif
557 ifdef MOZ_BUILD_PROJECTS
559 ifndef MOZ_OBJDIR
560 $(error When MOZ_BUILD_PROJECTS is set, you must set MOZ_OBJDIR)
561 endif
562 ifdef MOZ_CURRENT_PROJECT
563 OBJDIR = $(MOZ_OBJDIR)/$(MOZ_CURRENT_PROJECT)
564 MOZ_MAKE = $(MAKE) $(MOZ_MAKE_FLAGS) -C $(OBJDIR)
565 BUILD_PROJECT_ARG = MOZ_BUILD_APP=$(MOZ_CURRENT_PROJECT)
566 else
567 OBJDIR = $(error Cannot find the OBJDIR when MOZ_CURRENT_PROJECT is not set.)
568 MOZ_MAKE = $(error Cannot build in the OBJDIR when MOZ_CURRENT_PROJECT is not set.)
569 endif
571 else # MOZ_BUILD_PROJECTS
573 ifdef MOZ_OBJDIR
574 OBJDIR = $(MOZ_OBJDIR)
575 MOZ_MAKE = $(MAKE) $(MOZ_MAKE_FLAGS) -C $(OBJDIR)
576 else
577 OBJDIR := $(TOPSRCDIR)
578 MOZ_MAKE := $(MAKE) $(MOZ_MAKE_FLAGS)
579 endif
581 endif # MOZ_BUILD_PROJECTS
583 ####################################
584 # CVS defines for NSS
586 NSS_CO_MODULE = \
587 mozilla/dbm \
588 mozilla/security/nss \
589 mozilla/security/coreconf \
590 mozilla/security/dbm \
591 $(NULL)
593 NSS_CO_FLAGS := -P
594 ifdef MOZ_CO_FLAGS
595 NSS_CO_FLAGS := $(MOZ_CO_FLAGS)
596 endif
597 NSS_CO_FLAGS := $(NSS_CO_FLAGS) $(if $(NSS_CO_TAG),-r $(NSS_CO_TAG),-A)
599 # Can only pull the tip or branch tags by date
600 ifeq (,$(filter-out HEAD %BRANCH,$(NSS_CO_TAG)))
601 CVSCO_NSS = $(CVS) $(CVS_FLAGS) co $(NSS_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(NSS_CO_MODULE)
602 else
603 CVSCO_NSS = $(CVS) $(CVS_FLAGS) co $(NSS_CO_FLAGS) $(NSS_CO_MODULE)
604 endif
606 ####################################
607 # CVS defines for NSPR
609 NSPR_CO_MODULE = mozilla/nsprpub
610 NSPR_CO_FLAGS := -P
611 ifdef MOZ_CO_FLAGS
612 NSPR_CO_FLAGS := $(MOZ_CO_FLAGS)
613 endif
614 NSPR_CO_FLAGS := $(NSPR_CO_FLAGS) $(if $(NSPR_CO_TAG),-r $(NSPR_CO_TAG),-A)
616 # Can only pull the tip or branch tags by date
617 ifeq (,$(filter-out HEAD %BRANCH,$(NSPR_CO_TAG)))
618 CVSCO_NSPR = $(CVS) $(CVS_FLAGS) co $(NSPR_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(NSPR_CO_MODULE)
619 else
620 CVSCO_NSPR = $(CVS) $(CVS_FLAGS) co $(NSPR_CO_FLAGS) $(NSPR_CO_MODULE)
621 endif
623 ####################################
624 # CVS defines for the C LDAP SDK
626 LDAPCSDK_CO_MODULE = mozilla/directory/c-sdk
627 LDAPCSDK_CO_FLAGS := -P
628 ifdef MOZ_CO_FLAGS
629 LDAPCSDK_CO_FLAGS := $(MOZ_CO_FLAGS)
630 endif
631 LDAPCSDK_CO_FLAGS := $(LDAPCSDK_CO_FLAGS) $(if $(LDAPCSDK_CO_TAG),-r $(LDAPCSDK_CO_TAG),-A)
633 # Can only pull the tip or branch tags by date
634 ifeq (,$(filter-out HEAD %BRANCH,$(LDAPCSDK_CO_TAG)))
635 CVSCO_LDAPCSDK = $(CVS) $(CVS_FLAGS) co $(LDAPCSDK_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(LDAPCSDK_CO_MODULE)
636 else
637 CVSCO_LDAPCSDK = $(CVS) $(CVS_FLAGS) co $(LDAPCSDK_CO_FLAGS) $(LDAPCSDK_CO_MODULE)
638 endif
640 ####################################
641 # Error on obsolete variables.
644 ifdef MOZ_MAPINFO
645 $(warning MOZ_MAPINFO is obsolete, use MOZ_CO_MODULE=mozilla/tools/codesighs instead.)
646 MOZ_MODULE_LIST += mozilla/tools/codesighs
647 endif
648 ifdef MOZ_INTERNAL_LIBART_LGPL
649 $(error MOZ_INTERNAL_LIBART_LGPL is obsolete, use MOZ_CO_MODULE=mozilla/other-licenses/libart_lgpl instead.)
650 endif
651 ifdef MOZ_PHOENIX
652 $(warning MOZ_PHOENIX is obsolete.)
653 MOZ_MODULE_LIST += $(MODULES_browser)
654 # $(error MOZ_PHOENIX is obsolete, use MOZ_CO_PROJECT=browser and --enable-application=browser)
655 endif
656 ifdef MOZ_THUNDERBIRD
657 $(warning MOZ_THUNDERBIRD is obsolete.)
658 MOZ_MODULE_LIST += $(MODULES_mail)
659 # $(error MOZ_THUNDERBIRD is obsolete, use MOZ_CO_PROJECT=mail and --enable-application=mail)
660 endif
662 ###################################
663 # Checkout main modules
666 # sort is used to remove duplicates.
667 MOZ_MODULE_LIST := $(sort $(MOZ_MODULE_LIST))
668 MOZ_MODULE_LIST_NS := $(sort $(MOZ_MODULE_LIST_NS))
670 ####################################
671 # Suppress standalone modules if they're not needed.
673 CONFIGURES := $(TOPSRCDIR)/configure
674 ifeq (,$(filter mozilla/xpcom,$(MOZ_MODULE_LIST)))
675 CVSCO_NSPR :=
676 else
677 CONFIGURES += $(TOPSRCDIR)/nsprpub/configure
678 endif
680 ifeq (,$(filter mozilla/security/manager,$(MOZ_MODULE_LIST)))
681 CVSCO_NSS :=
682 endif
683 ifeq (,$(filter mozilla/directory/xpcom,$(MOZ_MODULE_LIST)))
684 CVSCO_LDAPCSDK :=
685 else
686 CONFIGURES += $(TOPSRCDIR)/directory/c-sdk/configure
687 endif
689 MODULES_CO_FLAGS := -P
690 ifdef MOZ_CO_FLAGS
691 MODULES_CO_FLAGS := $(MOZ_CO_FLAGS)
692 endif
693 MODULES_CO_FLAGS := $(MODULES_CO_FLAGS) $(if $(MOZ_CO_TAG),-r $(MOZ_CO_TAG),-A)
695 CVSCO_MODULES_NS = $(CVS) $(CVS_FLAGS) co $(MODULES_CO_FLAGS) $(CVS_CO_DATE_FLAGS) -l $(MOZ_MODULE_LIST_NS)
697 ifeq (,$(strip $(MOZ_MODULE_LIST)))
698 FASTUPDATE_MODULES = $(error No modules or projects were specified. Use MOZ_CO_PROJECT to specify a project for checkout.)
699 CHECKOUT_MODULES = $(error No modules or projects were specified. Use MOZ_CO_PROJECT to specify a project for checkout.)
700 else
701 FASTUPDATE_MODULES := fast_update $(CVS) $(CVS_FLAGS) co $(MODULES_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(MOZ_MODULE_LIST)
702 CHECKOUT_MODULES := cvs_co $(CVS) $(CVS_FLAGS) co $(MODULES_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(MOZ_MODULE_LIST);
703 endif
704 ifeq (,$(MOZ_MODULE_LIST_NS))
705 FASTUPDATE_MODULES_NS := true
706 CHECKOUT_MODULES_NS := true
707 else
708 FASTUPDATE_MODULES_NS := fast_update $(CVSCO_MODULES_NS)
709 CHECKOUT_MODULES_NS := cvs_co $(CVSCO_MODULES_NS)
710 endif
712 ###################################
713 # CVS defines for locales
716 LOCALES_CO_FLAGS := -P
717 ifdef MOZ_CO_FLAGS
718 LOCALES_CO_FLAGS := $(MOZ_CO_FLAGS)
719 endif
720 LOCALES_CO_FLAGS := $(LOCALES_CO_FLAGS) $(if $(LOCALES_CO_TAG),-r $(LOCALES_CO_TAG),-A)
722 ifndef MOZ_CO_LOCALES
723 FASTUPDATE_LOCALES := true
724 CHECKOUT_LOCALES := true
725 else
727 override MOZ_CO_LOCALES := $(subst $(comma), ,$(MOZ_CO_LOCALES))
729 ifeq (all,$(MOZ_CO_LOCALES))
730 MOZCONFIG_MODULES += $(foreach project,$(MOZ_PROJECT_LIST),mozilla/$(project)/locales/all-locales)
732 LOCALE_CO_DIRS := $(sort $(foreach project,$(MOZ_PROJECT_LIST),$(foreach locale,$(shell cat mozilla/$(project)/locales/all-locales),$(foreach dir,$(LOCALES_$(project)),l10n/$(locale)/$(dir)))))
733 else # MOZ_CO_LOCALES != all
734 LOCALE_CO_DIRS = $(sort $(foreach locale,$(MOZ_CO_LOCALES),$(foreach dir,$(LOCALE_DIRS),l10n/$(locale)/$(dir))))
735 endif
737 CVSCO_LOCALES := $(CVS) $(CVS_FLAGS) -d $(LOCALES_CVSROOT) co $(LOCALES_CO_FLAGS) $(CVS_CO_LOCALES_DATE_FLAGS) $(LOCALE_CO_DIRS)
739 FASTUPDATE_LOCALES := fast_update $(CVSCO_LOCALES)
740 CHECKOUT_LOCALES := cvs_co $(CVSCO_LOCALES)
741 endif #MOZ_CO_LOCALES
743 #######################################################################
744 # Rules
747 # Print out any options loaded from mozconfig.
748 all build checkout clean depend distclean export libs install realclean::
749 @if test -f .mozconfig.out; then \
750 cat .mozconfig.out; \
751 rm -f .mozconfig.out; \
752 else true; \
755 ifdef _IS_FIRST_CHECKOUT
756 all:: checkout build
757 else
758 all:: checkout alldep
759 endif
761 # Windows equivalents
762 pull_all: checkout
763 build_all: build
764 build_all_dep: alldep
765 build_all_depend: alldep
766 clobber clobber_all: clean
767 pull_and_build_all: checkout alldep
769 # Do everything from scratch
770 everything: checkout clean build
772 ####################################
773 # CVS checkout
775 checkout::
776 # @: Backup the last checkout log.
777 @if test -f $(CVSCO_LOGFILE) ; then \
778 mv $(CVSCO_LOGFILE) $(CVSCO_LOGFILE).old; \
779 else true; \
781 ifdef RUN_AUTOCONF_LOCALLY
782 @echo "Removing local configures" ; \
783 cd $(ROOTDIR) && \
784 $(RM) -f $(CONFIGURES)
785 endif
786 @echo "checkout start: "`date` | tee $(CVSCO_LOGFILE)
787 @echo '$(CVSCO) $(CVS_CO_DATE_FLAGS) mozilla/client.mk $(MOZCONFIG_MODULES)'; \
788 cd $(ROOTDIR) && \
789 $(CVSCO) $(CVS_CO_DATE_FLAGS) mozilla/client.mk $(MOZCONFIG_MODULES)
790 @cd $(ROOTDIR) && $(MAKE) -f mozilla/client.mk real_checkout
792 # Start the checkout. Split the output to the tty and a log file.
794 real_checkout:
795 @set -e; \
796 cvs_co() { set -e; echo "$$@" ; \
797 "$$@" 2>&1 | tee -a $(CVSCO_LOGFILE); }; \
798 cvs_co $(CVSCO_NSPR); \
799 cvs_co $(CVSCO_NSS); \
800 cvs_co $(CVSCO_LDAPCSDK); \
801 $(CHECKOUT_MODULES_NS); \
802 $(CHECKOUT_MODULES) \
803 $(CHECKOUT_LOCALES);
804 @echo "checkout finish: "`date` | tee -a $(CVSCO_LOGFILE)
805 # update the NSS checkout timestamp, if we checked PSM out
806 @if test -d $(TOPSRCDIR)/security/manager -a \
807 `egrep -c '^(U|C) mozilla/security/(nss|coreconf)' $(CVSCO_LOGFILE) 2>/dev/null` != 0; then \
808 touch $(TOPSRCDIR)/security/manager/.nss.checkout; \
810 ifdef RUN_AUTOCONF_LOCALLY
811 cd $(ROOTDIR) && \
812 $(RM) -f $(CONFIGURES)
813 endif
814 # @: Check the log for conflicts. ;
815 @conflicts=`egrep "^C " $(CVSCO_LOGFILE)` ;\
816 if test "$$conflicts" ; then \
817 echo "$(MAKE): *** Conflicts during checkout." ;\
818 echo "$$conflicts" ;\
819 echo "$(MAKE): Refer to $(CVSCO_LOGFILE) for full log." ;\
820 false; \
821 else true; \
824 fast-update:
825 # @: Backup the last checkout log.
826 @if test -f $(CVSCO_LOGFILE) ; then \
827 mv $(CVSCO_LOGFILE) $(CVSCO_LOGFILE).old; \
828 else true; \
830 ifdef RUN_AUTOCONF_LOCALLY
831 @echo "Removing local configures" ; \
832 cd $(ROOTDIR) && \
833 $(RM) -f $(CONFIGURES)
834 endif
835 @echo "checkout start: "`date` | tee $(CVSCO_LOGFILE)
836 @echo '$(CVSCO) mozilla/client.mk $(MOZCONFIG_MODULES)'; \
837 cd $(ROOTDIR) && \
838 $(CVSCO) mozilla/client.mk $(MOZCONFIG_MODULES)
839 @cd $(TOPSRCDIR) && \
840 $(MAKE) -f client.mk real_fast-update
842 # Start the update. Split the output to the tty and a log file.
843 real_fast-update:
844 @set -e; \
845 fast_update() { set -e; config/cvsco-fast-update.pl $$@ 2>&1 | tee -a $(CVSCO_LOGFILE); }; \
846 cvs_co() { set -e; echo "$$@" ; \
847 "$$@" 2>&1 | tee -a $(CVSCO_LOGFILE); }; \
848 fast_update $(CVSCO_NSPR); \
849 cd $(ROOTDIR); \
850 cvs_co $(CVSCO_NSS); \
851 cd mozilla; \
852 fast_update $(CVSCO_LDAPCSDK); \
853 $(FASTUPDATE_MODULES); \
854 $(FASTUPDATE_MODULES_NS); \
855 $(FASTUPDATE_LOCALES);
856 @echo "fast_update finish: "`date` | tee -a $(CVSCO_LOGFILE)
857 # update the NSS checkout timestamp
858 @if test `egrep -c '^(U|C) mozilla/security/(nss|coreconf)' $(CVSCO_LOGFILE) 2>/dev/null` != 0; then \
859 touch $(TOPSRCDIR)/security/manager/.nss.checkout; \
861 ifdef RUN_AUTOCONF_LOCALLY
862 cd $(ROOTDIR) && \
863 $(RM) -f $(CONFIGURES)
864 endif
865 # @: Check the log for conflicts. ;
866 @conflicts=`egrep "^C " $(CVSCO_LOGFILE)` ;\
867 if test "$$conflicts" ; then \
868 echo "$(MAKE): *** Conflicts during fast-update." ;\
869 echo "$$conflicts" ;\
870 echo "$(MAKE): Refer to $(CVSCO_LOGFILE) for full log." ;\
871 false; \
872 else true; \
875 CVSCO_LOGFILE_L10N := $(ROOTDIR)/cvsco-l10n.log
876 CVSCO_LOGFILE_L10N := $(shell echo $(CVSCO_LOGFILE_L10N) | sed s%//%/%)
878 l10n-checkout:
879 # @: Backup the last checkout log.
880 @if test -f $(CVSCO_LOGFILE_L10N) ; then \
881 mv $(CVSCO_LOGFILE_L10N) $(CVSCO_LOGFILE_L10N).old; \
882 else true; \
884 @echo "checkout start: "`date` | tee $(CVSCO_LOGFILE_L10N)
885 @echo '$(CVSCO) $(CVS_CO_DATE_FLAGS) mozilla/client.mk $(MOZCONFIG_MODULES)'; \
886 cd $(ROOTDIR) && \
887 $(CVSCO) $(CVS_CO_DATE_FLAGS) mozilla/client.mk $(MOZCONFIG_MODULES)
888 @cd $(ROOTDIR) && $(MAKE) -f mozilla/client.mk real_l10n-checkout
890 EN_US_CO_DIRS := $(sort $(foreach dir,$(LOCALE_DIRS),mozilla/$(dir)/locales)) \
891 $(foreach mod,$(MOZ_PROJECT_LIST),mozilla/$(mod)/config) \
892 mozilla/client.mk \
893 $(MOZCONFIG_MODULES) \
894 mozilla/configure \
895 mozilla/configure.in \
896 mozilla/allmakefiles.sh \
897 mozilla/build \
898 mozilla/config \
899 $(NULL)
901 EN_US_CO_FILES_NS := \
902 mozilla/toolkit/mozapps/installer \
903 $(NULL)
905 # Start the checkout. Split the output to the tty and a log file.
906 real_l10n-checkout:
907 @set -e; \
908 cvs_co() { set -e; echo "$$@" ; \
909 "$$@" 2>&1 | tee -a $(CVSCO_LOGFILE_L10N); }; \
910 cvs_co $(CVS) $(CVS_FLAGS) co $(MODULES_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(EN_US_CO_DIRS); \
911 cvs_co $(CVS) $(CVS_FLAGS) co $(MODULES_CO_FLAGS) $(CVS_CO_DATE_FLAGS) -l $(EN_US_CO_FILES_NS); \
912 cvs_co $(CVSCO_LOCALES)
913 @echo "checkout finish: "`date` | tee -a $(CVSCO_LOGFILE_L10N)
914 # @: Check the log for conflicts. ;
915 @conflicts=`egrep "^C " $(CVSCO_LOGFILE_L10N)` ;\
916 if test "$$conflicts" ; then \
917 echo "$(MAKE): *** Conflicts during checkout." ;\
918 echo "$$conflicts" ;\
919 echo "$(MAKE): Refer to $(CVSCO_LOGFILE_L10N) for full log." ;\
920 false; \
921 else true; \
924 #####################################################
925 # First Checkout
927 ifdef _IS_FIRST_CHECKOUT
928 # First time, do build target in a new process to pick up new files.
929 build::
930 $(MAKE) -f $(TOPSRCDIR)/client.mk build
931 else
933 #####################################################
934 # After First Checkout
936 #####################################################
937 # Build date unification
939 ifdef MOZ_UNIFY_BDATE
940 ifndef MOZ_BUILD_DATE
941 ifdef MOZ_BUILD_PROJECTS
942 MOZ_BUILD_DATE = $(shell $(PERL) -I$(TOPSRCDIR)/config $(TOPSRCDIR)/config/bdate.pl)
943 export MOZ_BUILD_DATE
944 endif
945 endif
946 endif
948 #####################################################
949 # Preflight, before building any project
951 build profiledbuild alldep preflight_all::
952 ifeq (,$(MOZ_CURRENT_PROJECT)$(if $(MOZ_PREFLIGHT_ALL),,1))
953 # Don't run preflight_all for individual projects in multi-project builds
954 # (when MOZ_CURRENT_PROJECT is set.)
955 ifndef MOZ_BUILD_PROJECTS
956 # Building a single project, OBJDIR is usable.
957 set -e; \
958 for mkfile in $(MOZ_PREFLIGHT_ALL); do \
959 $(MAKE) -f $(TOPSRCDIR)/$$mkfile preflight_all TOPSRCDIR=$(TOPSRCDIR) OBJDIR=$(OBJDIR) MOZ_OBJDIR=$(MOZ_OBJDIR); \
960 done
961 else
962 # OBJDIR refers to the project-specific OBJDIR, which is not available at
963 # this point when building multiple projects. Only MOZ_OBJDIR is available.
964 set -e; \
965 for mkfile in $(MOZ_PREFLIGHT_ALL); do \
966 $(MAKE) -f $(TOPSRCDIR)/$$mkfile preflight_all TOPSRCDIR=$(TOPSRCDIR) MOZ_OBJDIR=$(MOZ_OBJDIR) MOZ_BUILD_PROJECTS="$(MOZ_BUILD_PROJECTS)"; \
967 done
968 endif
969 endif
971 # If we're building multiple projects, but haven't specified which project,
972 # loop through them.
974 ifeq (,$(MOZ_CURRENT_PROJECT)$(if $(MOZ_BUILD_PROJECTS),,1))
975 configure depend build profiledbuild install export libs clean realclean distclean alldep preflight postflight::
976 set -e; \
977 for app in $(MOZ_BUILD_PROJECTS); do \
978 $(MAKE) -f $(TOPSRCDIR)/client.mk $@ MOZ_CURRENT_PROJECT=$$app; \
979 done
981 else
983 # MOZ_CURRENT_PROJECT: either doing a single-project build, or building an
984 # individual project in a multi-project build.
986 ####################################
987 # Configure
989 CONFIG_STATUS = $(wildcard $(OBJDIR)/config.status)
990 CONFIG_CACHE = $(wildcard $(OBJDIR)/config.cache)
992 ifdef RUN_AUTOCONF_LOCALLY
993 EXTRA_CONFIG_DEPS := \
994 $(TOPSRCDIR)/aclocal.m4 \
995 $(wildcard $(TOPSRCDIR)/build/autoconf/*.m4) \
996 $(NULL)
998 $(TOPSRCDIR)/configure: $(TOPSRCDIR)/configure.in $(EXTRA_CONFIG_DEPS)
999 @echo Generating $@ using autoconf
1000 cd $(TOPSRCDIR); $(AUTOCONF)
1002 $(TOPSRCDIR)/nsprpub/configure: $(TOPSRCDIR)/nsprpub/configure.in $(EXTRA_CONFIG_DEPS)
1003 @echo Generating $@ using autoconf
1004 cd $(TOPSRCDIR)/nsprpub; $(AUTOCONF)
1006 $(TOPSRCDIR)/directory/c-sdk/configure: $(TOPSRCDIR)/directory/c-sdk/configure.in $(EXTRA_CONFIG_DEPS)
1007 @echo Generating $@ using autoconf
1008 cd $(TOPSRCDIR)/directory/c-sdk; $(AUTOCONF)
1009 endif
1011 CONFIG_STATUS_DEPS := \
1012 $(TOPSRCDIR)/configure \
1013 $(TOPSRCDIR)/allmakefiles.sh \
1014 $(TOPSRCDIR)/.mozconfig.mk \
1015 $(wildcard $(TOPSRCDIR)/nsprpub/configure) \
1016 $(wildcard $(TOPSRCDIR)/directory/c-sdk/configure) \
1017 $(wildcard $(TOPSRCDIR)/mailnews/makefiles) \
1018 $(wildcard $(TOPSRCDIR)/themes/makefiles) \
1019 $(wildcard $(TOPSRCDIR)/config/milestone.txt) \
1020 $(wildcard $(TOPSRCDIR)/config/chrome-versions.sh) \
1021 $(NULL)
1023 # configure uses the program name to determine @srcdir@. Calling it without
1024 # $(TOPSRCDIR) will set @srcdir@ to "."; otherwise, it is set to the full
1025 # path of $(TOPSRCDIR).
1026 ifeq ($(TOPSRCDIR),$(OBJDIR))
1027 CONFIGURE = ./configure
1028 else
1029 CONFIGURE = $(TOPSRCDIR)/configure
1030 endif
1032 ifdef MOZ_TOOLS
1033 CONFIGURE = $(TOPSRCDIR)/configure
1034 endif
1036 configure:: $(CONFIGURES)
1037 ifdef MOZ_BUILD_PROJECTS
1038 @if test ! -d $(MOZ_OBJDIR); then $(MKDIR) $(MOZ_OBJDIR); else true; fi
1039 endif
1040 @if test ! -d $(OBJDIR); then $(MKDIR) $(OBJDIR); else true; fi
1041 @echo cd $(OBJDIR);
1042 @echo $(CONFIGURE) $(CONFIGURE_ARGS)
1043 @cd $(OBJDIR) && $(BUILD_PROJECT_ARG) $(CONFIGURE_ENV_ARGS) $(CONFIGURE) $(CONFIGURE_ARGS) \
1044 || ( echo "*** Fix above errors and then restart with\
1045 \"$(MAKE) -f client.mk build\"" && exit 1 )
1046 @touch $(OBJDIR)/Makefile
1048 $(OBJDIR)/Makefile $(OBJDIR)/config.status: $(CONFIG_STATUS_DEPS)
1049 @$(MAKE) -f $(TOPSRCDIR)/client.mk configure
1051 ifneq (,$(CONFIG_STATUS))
1052 $(OBJDIR)/config/autoconf.mk: $(TOPSRCDIR)/config/autoconf.mk.in
1053 cd $(OBJDIR); \
1054 CONFIG_FILES=config/autoconf.mk ./config.status
1055 endif
1058 ####################################
1059 # Depend
1061 depend:: $(OBJDIR)/Makefile $(OBJDIR)/config.status
1062 $(MOZ_MAKE) export && $(MOZ_MAKE) depend
1064 ####################################
1065 # Preflight
1067 build profiledbuild alldep preflight::
1068 ifdef MOZ_PREFLIGHT
1069 set -e; \
1070 for mkfile in $(MOZ_PREFLIGHT); do \
1071 $(MAKE) -f $(TOPSRCDIR)/$$mkfile preflight TOPSRCDIR=$(TOPSRCDIR) OBJDIR=$(OBJDIR) MOZ_OBJDIR=$(MOZ_OBJDIR); \
1072 done
1073 endif
1075 ####################################
1076 # Build it
1078 build:: $(OBJDIR)/Makefile $(OBJDIR)/config.status
1079 $(MOZ_MAKE)
1081 ####################################
1082 # Profile-feedback build (gcc only)
1083 # To use this, you should set the following variables in your mozconfig
1084 # mk_add_options PROFILE_GEN_SCRIPT=/path/to/profile-script
1086 # The profile script should exercise the functionality to be included
1087 # in the profile feedback.
1089 profiledbuild:: $(OBJDIR)/Makefile $(OBJDIR)/config.status
1090 $(MOZ_MAKE) MOZ_PROFILE_GENERATE=1
1091 OBJDIR=${OBJDIR} $(PROFILE_GEN_SCRIPT)
1092 $(MOZ_MAKE) clobber_all
1093 $(MOZ_MAKE) MOZ_PROFILE_USE=1
1094 find $(OBJDIR) -name "*.da" -exec rm {} \;
1096 ####################################
1097 # Other targets
1099 # Pass these target onto the real build system
1100 install export libs clean realclean distclean alldep:: $(OBJDIR)/Makefile $(OBJDIR)/config.status
1101 $(MOZ_MAKE) $@
1103 ####################################
1104 # Postflight
1106 build profiledbuild alldep postflight::
1107 ifdef MOZ_POSTFLIGHT
1108 set -e; \
1109 for mkfile in $(MOZ_POSTFLIGHT); do \
1110 $(MAKE) -f $(TOPSRCDIR)/$$mkfile postflight TOPSRCDIR=$(TOPSRCDIR) OBJDIR=$(OBJDIR) MOZ_OBJDIR=$(MOZ_OBJDIR); \
1111 done
1112 endif
1114 endif # MOZ_CURRENT_PROJECT
1116 ####################################
1117 # Postflight, after building all projects
1119 build profiledbuild alldep postflight_all::
1120 ifeq (,$(MOZ_CURRENT_PROJECT)$(if $(MOZ_POSTFLIGHT_ALL),,1))
1121 # Don't run postflight_all for individual projects in multi-project builds
1122 # (when MOZ_CURRENT_PROJECT is set.)
1123 ifndef MOZ_BUILD_PROJECTS
1124 # Building a single project, OBJDIR is usable.
1125 set -e; \
1126 for mkfile in $(MOZ_POSTFLIGHT_ALL); do \
1127 $(MAKE) -f $(TOPSRCDIR)/$$mkfile postflight_all TOPSRCDIR=$(TOPSRCDIR) OBJDIR=$(OBJDIR) MOZ_OBJDIR=$(MOZ_OBJDIR); \
1128 done
1129 else
1130 # OBJDIR refers to the project-specific OBJDIR, which is not available at
1131 # this point when building multiple projects. Only MOZ_OBJDIR is available.
1132 set -e; \
1133 for mkfile in $(MOZ_POSTFLIGHT_ALL); do \
1134 $(MAKE) -f $(TOPSRCDIR)/$$mkfile postflight_all TOPSRCDIR=$(TOPSRCDIR) MOZ_OBJDIR=$(MOZ_OBJDIR) MOZ_BUILD_PROJECTS="$(MOZ_BUILD_PROJECTS)"; \
1135 done
1136 endif
1137 endif
1139 cleansrcdir:
1140 @cd $(TOPSRCDIR); \
1141 if [ -f Makefile ]; then \
1142 $(MAKE) distclean ; \
1143 else \
1144 echo "Removing object files from srcdir..."; \
1145 rm -fr `find . -type d \( -name .deps -print -o -name CVS \
1146 -o -exec test ! -d {}/CVS \; \) -prune \
1147 -o \( -name '*.[ao]' -o -name '*.so' \) -type f -print`; \
1148 build/autoconf/clean-config.sh; \
1151 # (! IS_FIRST_CHECKOUT)
1152 endif
1154 echo-variable-%:
1155 @echo $($*)
1157 .PHONY: checkout real_checkout depend build 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