Make enumeration over SJOWs walk the prototype chain. Also make SJOWs unwrap same...
[mozilla-1.9.git] / client.mk
blobf02b8a7c55da8812e2d6e34299468f7613ad14e7
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://developer.mozilla.org/en/docs/Build_Documentation for
83 # more information.
85 # Options:
86 # MOZ_BUILD_PROJECTS - Build multiple projects in subdirectories
87 # of MOZ_OBJDIR
88 # MOZ_OBJDIR - Destination object directory
89 # MOZ_CO_DATE - Date tag to use for checkout (default: none)
90 # MOZ_CO_LOCALES_DATE - Date tag to use for locale checkout
91 # (default: MOZ_CO_DATE)
92 # MOZ_CO_MODULE - Module to checkout
93 # MOZ_CVS_FLAGS - Flags to pass cvs (default: -q -z3)
94 # MOZ_CO_FLAGS - Flags to pass after 'cvs co' (default: -P)
95 # MOZ_MAKE_FLAGS - Flags to pass to $(MAKE)
96 # MOZ_CO_LOCALES - localizations to pull (MOZ_CO_LOCALES="de-DE,pt-BR")
97 # MOZ_LOCALE_DIRS - directories which contain localizations
98 # LOCALES_CVSROOT - CVSROOT to use to pull localizations
99 # MOZ_PREFLIGHT_ALL } - Makefiles to run before any project in
100 # MOZ_PREFLIGHT } MOZ_BUILD_PROJECTS, before each project, after
101 # MOZ_POSTFLIGHT } each project, and after all projects; these
102 # MOZ_POSTFLIGHT_ALL } variables contain space-separated lists
103 # MOZ_UNIFY_BDATE - Set to use the same bdate for each project in
104 # MOZ_BUILD_PROJECTS
107 AVAILABLE_PROJECTS = \
108 all \
109 suite \
110 toolkit \
111 browser \
112 mail \
113 minimo \
114 composer \
115 calendar \
116 xulrunner \
117 camino \
118 necko \
119 tamarin \
120 $(NULL)
122 # Trailing / on top-level mozilla dir required to stop fast-update thinking
123 # it is a module name.
124 MODULES_NS_necko := \
125 mozilla/ \
126 $(NULL)
128 MODULES_necko := \
129 mozilla/README \
130 mozilla/config \
131 mozilla/build \
132 mozilla/intl \
133 mozilla/modules/libpref \
134 mozilla/modules/zlib \
135 mozilla/netwerk \
136 mozilla/xpcom \
137 mozilla/tools/test-harness \
138 $(NULL)
140 MODULES_NS_core := \
141 $(MODULES_NS_necko) \
142 mozilla/js \
143 mozilla/js/src \
144 mozilla/js/jsd \
145 mozilla/db \
146 $(NULL)
148 MODULES_core := \
149 $(MODULES_necko) \
150 mozilla/caps \
151 mozilla/content \
152 mozilla/db/mdb \
153 mozilla/db/mork \
154 mozilla/docshell \
155 mozilla/dom \
156 mozilla/editor \
157 mozilla/embedding \
158 mozilla/extensions \
159 mozilla/gfx \
160 mozilla/parser \
161 mozilla/layout \
162 mozilla/jpeg \
163 mozilla/js/src/fdlibm \
164 mozilla/js/src/liveconnect \
165 mozilla/js/src/xpconnect \
166 mozilla/js/jsd/idl \
167 mozilla/modules/lcms \
168 mozilla/modules/libimg \
169 mozilla/modules/libjar \
170 mozilla/modules/libpr0n \
171 mozilla/modules/libreg \
172 mozilla/modules/libutil \
173 mozilla/modules/oji \
174 mozilla/modules/plugin \
175 mozilla/modules/staticmod \
176 mozilla/plugin/oji \
177 mozilla/profile \
178 mozilla/probes \
179 mozilla/rdf \
180 mozilla/security/manager \
181 mozilla/sun-java \
182 mozilla/ipc/ipcd \
183 mozilla/modules/libpr0n \
184 mozilla/modules/libmar \
185 mozilla/modules/libbz2 \
186 mozilla/accessible \
187 mozilla/other-licenses/atk-1.0 \
188 mozilla/other-licenses/ia2 \
189 mozilla/security/manager \
190 mozilla/tools/elf-dynstr-gc \
191 mozilla/uriloader \
192 mozilla/view \
193 mozilla/webshell \
194 mozilla/widget \
195 mozilla/xpfe \
196 mozilla/xpinstall \
197 mozilla/toolkit \
198 mozilla/storage \
199 mozilla/db/sqlite3 \
200 mozilla/db/morkreader \
201 mozilla/testing/crashtest \
202 mozilla/testing/mochitest \
203 $(NULL)
205 LOCALES_necko := \
206 netwerk \
207 $(NULL)
209 LOCALES_core := \
210 $(LOCALES_necko) \
211 dom \
212 $(NULL)
214 BOOTSTRAP_necko := \
215 mozilla/browser/config/version.txt \
216 mozilla/mail/config/version.txt \
217 mozilla/calendar/sunbird/config/version.txt \
218 mozilla/suite/config/version.txt \
219 $(NULL)
221 BOOTSTRAP_core := \
222 $(BOOTSTRAP_necko) \
223 $(NULL)
225 MODULES_NS_toolkit := \
226 $(MODULES_NS_core) \
227 $(NULL)
229 MODULES_toolkit := \
230 $(MODULES_core) \
231 mozilla/chrome \
232 $(NULL)
234 LOCALES_toolkit := \
235 $(LOCALES_core) \
236 toolkit \
237 security/manager \
238 $(NULL)
240 BOOTSTRAP_toolkit := \
241 $(BOOTSTRAP_core) \
242 $(NULL)
244 MODULES_NS_suite := \
245 $(MODULES_NS_toolkit) \
246 $(NULL)
248 MODULES_suite := \
249 $(MODULES_toolkit) \
250 mozilla/directory/xpcom \
251 mozilla/mailnews \
252 mozilla/suite \
253 mozilla/other-licenses/7zstub/seamonkey \
254 $(NULL)
256 LOCALES_suite := \
257 $(LOCALES_toolkit) \
258 suite \
259 editor/ui \
260 extensions/reporter \
261 extensions/spellcheck \
262 $(NULL)
264 BOOTSTRAP_suite := \
265 $(BOOTSTRAP_toolkit) \
266 $(NULL)
268 MODULES_NS_browser := \
269 $(MODULES_NS_toolkit) \
270 $(NULL)
272 MODULES_browser := \
273 $(MODULES_toolkit) \
274 mozilla/browser \
275 mozilla/other-licenses/branding/firefox \
276 mozilla/other-licenses/7zstub/firefox \
277 $(NULL)
279 LOCALES_browser := \
280 $(LOCALES_toolkit) \
281 browser \
282 extensions/reporter \
283 extensions/spellcheck \
284 other-licenses/branding/firefox \
285 $(NULL)
287 BOOTSTRAP_browser := \
288 $(BOOTSTRAP_toolkit) \
289 mozilla/browser/config/mozconfig \
290 $(NULL)
292 MODULES_NS_minimo := \
293 $(MODULES_NS_toolkit) \
294 $(NULL)
296 MODULES_minimo := \
297 $(MODULES_toolkit) \
298 mozilla/minimo \
299 $(NULL)
301 BOOTSTRAP_minimo := \
302 $(BOOTSTRAP_toolkit) \
303 $(NULL)
305 MODULES_NS_mail := \
306 $(MODULES_NS_toolkit) \
307 $(NULL)
309 MODULES_mail := \
310 $(MODULES_toolkit) \
311 mozilla/directory/xpcom \
312 mozilla/mailnews \
313 mozilla/mail \
314 mozilla/other-licenses/branding/thunderbird \
315 mozilla/other-licenses/7zstub/thunderbird \
316 $(NULL)
318 LOCALES_mail := \
319 $(LOCALES_toolkit) \
320 mail \
321 other-licenses/branding/thunderbird \
322 editor/ui \
323 extensions/spellcheck \
324 $(NULL)
326 BOOTSTRAP_mail := \
327 $(BOOTSTRAP_toolkit) \
328 mozilla/mail/config/mozconfig \
329 $(NULL)
331 MODULES_composer := \
332 $(MODULES_toolkit) \
333 mozilla/composer \
334 $(NULL)
336 MODULES_NS_calendar := \
337 $(MODULES_NS_toolkit) \
338 $(NULL)
340 MODULES_calendar := \
341 $(MODULES_toolkit) \
342 mozilla/storage \
343 mozilla/db/sqlite3 \
344 mozilla/calendar \
345 mozilla/other-licenses/branding/sunbird \
346 mozilla/other-licenses/7zstub/sunbird \
347 $(NULL)
349 LOCALES_calendar := \
350 $(LOCALES_toolkit) \
351 calendar \
352 other-licenses/branding/sunbird \
353 $(NULL)
355 BOOTSTRAP_calendar := \
356 $(BOOTSTRAP_toolkit) \
357 mozilla/calendar/sunbird/config/mozconfig \
358 $(NULL)
360 MODULES_NS_xulrunner := \
361 $(MODULES_NS_toolkit) \
362 $(NULL)
364 MODULES_xulrunner := \
365 $(MODULES_toolkit) \
366 mozilla/xulrunner \
367 $(NULL)
369 LOCALES_xulrunner := \
370 $(LOCALES_toolkit) \
371 $(NULL)
373 BOOTSTRAP_xulrunner := \
374 $(BOOTSTRAP_toolkit) \
375 mozilla/xulrunner/config/mozconfig \
376 $(NULL)
378 MODULES_NS_camino := \
379 $(MODULES_NS_toolkit) \
380 $(NULL)
382 MODULES_camino := \
383 $(MODULES_core) \
384 mozilla/camino \
385 mozilla/themes \
386 $(NULL)
388 BOOTSTRAP_camino := \
389 $(BOOTSTRAP_toolkit) \
390 mozilla/camino/config/mozconfig \
391 $(NULL)
393 MODULES_tamarin := \
394 mozilla/js/tamarin \
395 mozilla/modules/zlib \
396 $(NULL)
398 MODULES_all := \
399 mozilla/other-licenses/bsdiff \
400 mozilla/other-licenses/libart_lgpl \
401 mozilla/tools/trace-malloc \
402 mozilla/tools/jprof \
403 mozilla/tools/codesighs \
404 mozilla/tools/update-packaging \
405 $(NULL)
407 #######################################################################
408 # Checkout Tags
410 # For branches, uncomment the MOZ_CO_TAG line with the proper tag,
411 # and commit this file on that tag.
412 #MOZ_CO_TAG = <tag>
413 NSPR_CO_TAG = NSPR_HEAD_20071218
414 NSS_CO_TAG = NSS_3_12_ALPHA_2B
415 LDAPCSDK_CO_TAG = LDAPCSDK_6_0_3_CLIENT_BRANCH
416 LOCALES_CO_TAG =
418 #######################################################################
419 # Defines
421 CVS = cvs
422 comma := ,
424 CWD := $(shell pwd)
425 ifneq (1,$(words $(CWD)))
426 $(error The mozilla directory cannot be located in a path with spaces.)
427 endif
429 ifeq "$(CWD)" "/"
430 CWD := /.
431 endif
433 ifneq (, $(wildcard client.mk))
434 # Ran from mozilla directory
435 ROOTDIR := $(shell dirname $(CWD))
436 TOPSRCDIR := $(CWD)
437 else
438 # Ran from mozilla/.. directory (?)
439 ROOTDIR := $(CWD)
440 TOPSRCDIR := $(CWD)/mozilla
441 endif
443 # on os2, TOPSRCDIR may have two forward slashes in a row, which doesn't
444 # work; replace first instance with one forward slash
445 TOPSRCDIR := $(shell echo "$(TOPSRCDIR)" | sed -e 's%//%/%')
447 ifndef TOPSRCDIR_MOZ
448 TOPSRCDIR_MOZ=$(TOPSRCDIR)
449 endif
451 # if ROOTDIR equals only drive letter (i.e. "C:"), set to "/"
452 DIRNAME := $(shell echo "$(ROOTDIR)" | sed -e 's/^.://')
453 ifeq ($(DIRNAME),)
454 ROOTDIR := /.
455 endif
457 AUTOCONF := autoconf
458 MKDIR := mkdir
459 SH := /bin/sh
460 ifndef MAKE
461 MAKE := gmake
462 endif
463 PERL ?= perl
464 PYTHON ?= python
466 CONFIG_GUESS_SCRIPT := $(wildcard $(TOPSRCDIR)/build/autoconf/config.guess)
467 ifdef CONFIG_GUESS_SCRIPT
468 CONFIG_GUESS = $(shell $(CONFIG_GUESS_SCRIPT))
469 else
470 _IS_FIRST_CHECKOUT := 1
471 endif
473 ####################################
474 # Sanity checks
476 ifneq (,$(filter MINGW%,$(shell uname -s)))
477 # check for CRLF line endings
478 ifneq (0,$(shell $(PERL) -e 'binmode(STDIN); while (<STDIN>) { if (/\r/) { print "1"; exit } } print "0"' < $(TOPSRCDIR)/client.mk))
479 $(error This source tree appears to have Windows-style line endings. To \
480 convert it to Unix-style line endings, run \
481 "python mozilla/build/win32/mozilla-dos2unix.py")
482 endif
483 endif
485 ####################################
486 # CVS
488 # Add the CVS root to CVS_FLAGS if needed
489 CVS_ROOT_IN_TREE := $(shell cat $(TOPSRCDIR)/CVS/Root 2>/dev/null)
490 ifneq ($(CVS_ROOT_IN_TREE),)
491 ifneq ($(CVS_ROOT_IN_TREE),$(CVSROOT))
492 CVS_FLAGS := -d $(CVS_ROOT_IN_TREE)
493 endif
494 endif
496 CVS_CO_DATE_FLAGS = $(if $(MOZ_CO_DATE),-D "$(MOZ_CO_DATE)")
497 CVS_CO_LOCALES_DATE_FLAGS = $(if $(MOZ_CO_LOCALES_DATE),-D "$(MOZ_CO_LOCALES_DATE)")
498 CVSCO = $(CVS) $(CVS_FLAGS) co $(MOZ_CO_FLAGS) $(if $(MOZ_CO_TAG),-r $(MOZ_CO_TAG)) $(CVS_CO_DATE_FLAGS)
500 MOZ_CO_LOCALES_DATE ?= $(MOZ_CO_DATE)
502 CVSCO_LOGFILE := $(ROOTDIR)/cvsco.log
503 CVSCO_LOGFILE := $(shell echo $(CVSCO_LOGFILE) | sed s%//%/%)
505 # if LOCALES_CVSROOT is not specified, set it here
506 # (and let mozconfig override it)
507 LOCALES_CVSROOT ?= :pserver:anonymous:anonymous@cvs-mirror.mozilla.org:/l10n
509 ####################################
510 # Load mozconfig Options
512 # See build pages, http://www.mozilla.org/build/ for how to set up mozconfig.
514 MOZCONFIG_LOADER := mozilla/build/autoconf/mozconfig2client-mk
515 MOZCONFIG_FINDER := mozilla/build/autoconf/mozconfig-find
516 MOZCONFIG_MODULES := mozilla/build/unix/uniq.pl
517 run_for_side_effects := \
518 $(shell cd $(ROOTDIR); \
519 if test "$(_IS_FIRST_CHECKOUT)"; then \
520 $(CVSCO) $(MOZCONFIG_FINDER) $(MOZCONFIG_LOADER) $(MOZCONFIG_MODULES); \
521 else true; \
522 fi; \
523 $(MOZCONFIG_LOADER) $(TOPSRCDIR) mozilla/.mozconfig.mk > mozilla/.mozconfig.out)
524 include $(TOPSRCDIR)/.mozconfig.mk
526 ####################################
527 # Options that may come from mozconfig
529 MOZ_PROJECT_LIST := $(subst $(comma), ,$(MOZ_CO_PROJECT))
530 MOZ_PROJECT_LIST := $(subst macbrowser,camino,$(MOZ_PROJECT_LIST))
532 ifneq (,$(filter-out $(AVAILABLE_PROJECTS),$(MOZ_PROJECT_LIST)))
533 $(error MOZ_CO_PROJECT contains an unrecognized project.)
534 endif
536 ifeq (all,$(filter all,$(MOZ_PROJECT_LIST)))
537 MOZ_PROJECT_LIST := $(AVAILABLE_PROJECTS)
538 endif
540 MOZ_MODULE_LIST := $(subst $(comma), ,$(MOZ_CO_MODULE)) $(foreach project,$(MOZ_PROJECT_LIST),$(MODULES_$(project)))
541 MOZ_MODULE_LIST_NS := $(foreach project,$(MOZ_PROJECT_LIST),$(MODULES_NS_$(project)))
542 LOCALE_DIRS := $(MOZ_LOCALE_DIRS) $(foreach project,$(MOZ_PROJECT_LIST),$(LOCALES_$(project)))
544 MOZCONFIG_MODULES += $(foreach project,$(MOZ_PROJECT_LIST),$(BOOTSTRAP_$(project)))
546 # Using $(sort) here because it also removes duplicate entries.
547 MOZ_MODULE_LIST := $(sort $(MOZ_MODULE_LIST))
548 LOCALE_DIRS := $(sort $(LOCALE_DIRS))
549 MOZCONFIG_MODULES := $(sort $(MOZCONFIG_MODULES))
551 # Change CVS flags if anonymous root is requested
552 ifdef MOZ_CO_USE_MIRROR
553 CVS_FLAGS := -d :pserver:anonymous:anonymous@cvs-mirror.mozilla.org:/cvsroot
554 endif
556 # MOZ_CVS_FLAGS - Basic CVS flags
557 ifeq "$(origin MOZ_CVS_FLAGS)" "undefined"
558 CVS_FLAGS := $(CVS_FLAGS) -q -z 3
559 else
560 CVS_FLAGS := $(MOZ_CVS_FLAGS)
561 endif
563 ifdef MOZ_BUILD_PROJECTS
565 ifndef MOZ_OBJDIR
566 $(error When MOZ_BUILD_PROJECTS is set, you must set MOZ_OBJDIR)
567 endif
568 ifdef MOZ_CURRENT_PROJECT
569 OBJDIR = $(MOZ_OBJDIR)/$(MOZ_CURRENT_PROJECT)
570 MOZ_MAKE = $(MAKE) $(MOZ_MAKE_FLAGS) -C $(OBJDIR)
571 BUILD_PROJECT_ARG = MOZ_BUILD_APP=$(MOZ_CURRENT_PROJECT)
572 else
573 OBJDIR = $(error Cannot find the OBJDIR when MOZ_CURRENT_PROJECT is not set.)
574 MOZ_MAKE = $(error Cannot build in the OBJDIR when MOZ_CURRENT_PROJECT is not set.)
575 endif
577 else # MOZ_BUILD_PROJECTS
579 ifdef MOZ_OBJDIR
580 OBJDIR = $(MOZ_OBJDIR)
581 MOZ_MAKE = $(MAKE) $(MOZ_MAKE_FLAGS) -C $(OBJDIR)
582 else
583 OBJDIR := $(TOPSRCDIR)
584 MOZ_MAKE := $(MAKE) $(MOZ_MAKE_FLAGS)
585 endif
587 endif # MOZ_BUILD_PROJECTS
589 ####################################
590 # CVS defines for NSS
592 NSS_CO_MODULE = \
593 mozilla/dbm \
594 mozilla/security/nss \
595 mozilla/security/coreconf \
596 mozilla/security/dbm \
597 $(NULL)
599 NSS_CO_FLAGS := -P
600 ifdef MOZ_CO_FLAGS
601 NSS_CO_FLAGS := $(MOZ_CO_FLAGS)
602 endif
603 NSS_CO_FLAGS := $(NSS_CO_FLAGS) $(if $(NSS_CO_TAG),-r $(NSS_CO_TAG),-A)
605 # Can only pull the tip or branch tags by date
606 ifeq (,$(filter-out HEAD %BRANCH,$(NSS_CO_TAG)))
607 CVSCO_NSS = $(CVS) $(CVS_FLAGS) co $(NSS_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(NSS_CO_MODULE)
608 else
609 CVSCO_NSS = $(CVS) $(CVS_FLAGS) co $(NSS_CO_FLAGS) $(NSS_CO_MODULE)
610 endif
612 ####################################
613 # CVS defines for NSPR
615 NSPR_CO_MODULE = mozilla/nsprpub
616 NSPR_CO_FLAGS := -P
617 ifdef MOZ_CO_FLAGS
618 NSPR_CO_FLAGS := $(MOZ_CO_FLAGS)
619 endif
620 NSPR_CO_FLAGS := $(NSPR_CO_FLAGS) $(if $(NSPR_CO_TAG),-r $(NSPR_CO_TAG),-A)
622 # Can only pull the tip or branch tags by date
623 ifeq (,$(filter-out HEAD %BRANCH,$(NSPR_CO_TAG)))
624 CVSCO_NSPR = $(CVS) $(CVS_FLAGS) co $(NSPR_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(NSPR_CO_MODULE)
625 else
626 CVSCO_NSPR = $(CVS) $(CVS_FLAGS) co $(NSPR_CO_FLAGS) $(NSPR_CO_MODULE)
627 endif
629 ####################################
630 # CVS defines for the C LDAP SDK
632 LDAPCSDK_CO_MODULE = mozilla/directory/c-sdk
633 LDAPCSDK_CO_FLAGS := -P
634 ifdef MOZ_CO_FLAGS
635 LDAPCSDK_CO_FLAGS := $(MOZ_CO_FLAGS)
636 endif
637 LDAPCSDK_CO_FLAGS := $(LDAPCSDK_CO_FLAGS) $(if $(LDAPCSDK_CO_TAG),-r $(LDAPCSDK_CO_TAG),-A)
639 # Can only pull the tip or branch tags by date
640 ifeq (,$(filter-out HEAD %BRANCH,$(LDAPCSDK_CO_TAG)))
641 CVSCO_LDAPCSDK = $(CVS) $(CVS_FLAGS) co $(LDAPCSDK_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(LDAPCSDK_CO_MODULE)
642 else
643 CVSCO_LDAPCSDK = $(CVS) $(CVS_FLAGS) co $(LDAPCSDK_CO_FLAGS) $(LDAPCSDK_CO_MODULE)
644 endif
646 ####################################
647 # Error on obsolete variables.
650 ifdef MOZ_MAPINFO
651 $(warning MOZ_MAPINFO is obsolete, use MOZ_CO_MODULE=mozilla/tools/codesighs instead.)
652 MOZ_MODULE_LIST += mozilla/tools/codesighs
653 endif
654 ifdef MOZ_INTERNAL_LIBART_LGPL
655 $(error MOZ_INTERNAL_LIBART_LGPL is obsolete, use MOZ_CO_MODULE=mozilla/other-licenses/libart_lgpl instead.)
656 endif
657 ifdef MOZ_PHOENIX
658 $(warning MOZ_PHOENIX is obsolete.)
659 MOZ_MODULE_LIST += $(MODULES_browser)
660 # $(error MOZ_PHOENIX is obsolete, use MOZ_CO_PROJECT=browser and --enable-application=browser)
661 endif
662 ifdef MOZ_THUNDERBIRD
663 $(warning MOZ_THUNDERBIRD is obsolete.)
664 MOZ_MODULE_LIST += $(MODULES_mail)
665 # $(error MOZ_THUNDERBIRD is obsolete, use MOZ_CO_PROJECT=mail and --enable-application=mail)
666 endif
668 ###################################
669 # Checkout main modules
672 # sort is used to remove duplicates.
673 MOZ_MODULE_LIST := $(sort $(MOZ_MODULE_LIST))
674 MOZ_MODULE_LIST_NS := $(sort $(MOZ_MODULE_LIST_NS))
676 ####################################
677 # Suppress standalone modules if they're not needed.
679 CONFIGURES := $(TOPSRCDIR)/configure
680 ifeq (,$(filter mozilla/xpcom,$(MOZ_MODULE_LIST)))
681 CVSCO_NSPR :=
682 else
683 CONFIGURES += $(TOPSRCDIR)/nsprpub/configure
684 endif
686 ifeq (,$(filter mozilla/security/manager,$(MOZ_MODULE_LIST)))
687 CVSCO_NSS :=
688 endif
689 ifeq (,$(filter mozilla/directory/xpcom,$(MOZ_MODULE_LIST)))
690 CVSCO_LDAPCSDK :=
691 else
692 CONFIGURES += $(TOPSRCDIR)/directory/c-sdk/configure
693 endif
695 MODULES_CO_FLAGS := -P
696 ifdef MOZ_CO_FLAGS
697 MODULES_CO_FLAGS := $(MOZ_CO_FLAGS)
698 endif
699 MODULES_CO_FLAGS := $(MODULES_CO_FLAGS) $(if $(MOZ_CO_TAG),-r $(MOZ_CO_TAG),-A)
701 CVSCO_MODULES_NS = $(CVS) $(CVS_FLAGS) co $(MODULES_CO_FLAGS) $(CVS_CO_DATE_FLAGS) -l $(MOZ_MODULE_LIST_NS)
703 ifeq (,$(strip $(MOZ_MODULE_LIST)))
704 FASTUPDATE_MODULES = $(error No modules or projects were specified. Use MOZ_CO_PROJECT to specify a project for checkout.)
705 CHECKOUT_MODULES = $(error No modules or projects were specified. Use MOZ_CO_PROJECT to specify a project for checkout.)
706 else
707 FASTUPDATE_MODULES := fast_update $(CVS) $(CVS_FLAGS) co $(MODULES_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(MOZ_MODULE_LIST)
708 CHECKOUT_MODULES := cvs_co $(CVS) $(CVS_FLAGS) co $(MODULES_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(MOZ_MODULE_LIST);
709 endif
710 ifeq (,$(MOZ_MODULE_LIST_NS))
711 FASTUPDATE_MODULES_NS := true
712 CHECKOUT_MODULES_NS := true
713 else
714 FASTUPDATE_MODULES_NS := fast_update $(CVSCO_MODULES_NS)
715 CHECKOUT_MODULES_NS := cvs_co $(CVSCO_MODULES_NS)
716 endif
718 ###################################
719 # CVS defines for locales
722 LOCALES_CO_FLAGS := -P
723 ifdef MOZ_CO_FLAGS
724 LOCALES_CO_FLAGS := $(MOZ_CO_FLAGS)
725 endif
726 LOCALES_CO_FLAGS := $(LOCALES_CO_FLAGS) $(if $(LOCALES_CO_TAG),-r $(LOCALES_CO_TAG),-A)
728 ifndef MOZ_CO_LOCALES
729 FASTUPDATE_LOCALES := true
730 CHECKOUT_LOCALES := true
731 else
733 override MOZ_CO_LOCALES := $(subst $(comma), ,$(MOZ_CO_LOCALES))
735 ifeq (all,$(MOZ_CO_LOCALES))
736 MOZCONFIG_MODULES += $(foreach project,$(MOZ_PROJECT_LIST),mozilla/$(project)/locales/all-locales)
738 LOCALE_CO_DIRS := $(sort $(foreach project,$(MOZ_PROJECT_LIST),$(foreach locale,$(shell cat mozilla/$(project)/locales/all-locales),l10n/$(locale)/)))
739 else # MOZ_CO_LOCALES != all
740 LOCALE_CO_DIRS = $(sort $(foreach locale,$(MOZ_CO_LOCALES),l10n/$(locale)/))
741 endif
743 CVSCO_LOCALES := $(CVS) $(CVS_FLAGS) -d $(LOCALES_CVSROOT) co $(LOCALES_CO_FLAGS) $(CVS_CO_LOCALES_DATE_FLAGS) $(LOCALE_CO_DIRS)
745 FASTUPDATE_LOCALES := fast_update $(CVSCO_LOCALES)
746 CHECKOUT_LOCALES := cvs_co $(CVSCO_LOCALES)
747 endif #MOZ_CO_LOCALES
749 #######################################################################
750 # Rules
753 # Print out any options loaded from mozconfig.
754 all build checkout clean depend distclean export libs install realclean::
755 @if test -f .mozconfig.out; then \
756 cat .mozconfig.out; \
757 rm -f .mozconfig.out; \
758 else true; \
761 ifdef _IS_FIRST_CHECKOUT
762 all:: checkout build
763 else
764 all:: checkout alldep
765 endif
767 # Windows equivalents
768 pull_all: checkout
769 build_all: build
770 build_all_dep: alldep
771 build_all_depend: alldep
772 clobber clobber_all: clean
773 pull_and_build_all: checkout alldep
775 # Do everything from scratch
776 everything: checkout clean build
778 ####################################
779 # CVS checkout
781 checkout::
782 # @: Backup the last checkout log.
783 @if test -f $(CVSCO_LOGFILE) ; then \
784 mv $(CVSCO_LOGFILE) $(CVSCO_LOGFILE).old; \
785 else true; \
787 ifdef RUN_AUTOCONF_LOCALLY
788 @echo "Removing local configures" ; \
789 cd $(ROOTDIR) && \
790 $(RM) -f $(CONFIGURES)
791 endif
792 @echo "checkout start: "`date` | tee $(CVSCO_LOGFILE)
793 @echo '$(CVSCO) $(CVS_CO_DATE_FLAGS) mozilla/client.mk $(MOZCONFIG_MODULES)'; \
794 cd $(ROOTDIR) && \
795 $(CVSCO) $(CVS_CO_DATE_FLAGS) mozilla/client.mk $(MOZCONFIG_MODULES)
796 @cd $(ROOTDIR) && $(MAKE) -f mozilla/client.mk real_checkout
798 # Start the checkout. Split the output to the tty and a log file.
800 real_checkout:
801 @set -e; \
802 cvs_co() { set -e; echo "$$@" ; \
803 "$$@" 2>&1 | tee -a $(CVSCO_LOGFILE); }; \
804 cvs_co $(CVSCO_NSPR); \
805 cvs_co $(CVSCO_NSS); \
806 cvs_co $(CVSCO_LDAPCSDK); \
807 $(CHECKOUT_MODULES_NS); \
808 $(CHECKOUT_MODULES) \
809 $(CHECKOUT_LOCALES);
810 @echo "checkout finish: "`date` | tee -a $(CVSCO_LOGFILE)
811 # update the NSS checkout timestamp, if we checked PSM out
812 @if test -d $(TOPSRCDIR)/security/manager -a \
813 `egrep -c '^(U|C) mozilla/security/(nss|coreconf)' $(CVSCO_LOGFILE) 2>/dev/null` != 0; then \
814 touch $(TOPSRCDIR)/security/manager/.nss.checkout; \
816 ifdef RUN_AUTOCONF_LOCALLY
817 cd $(ROOTDIR) && \
818 $(RM) -f $(CONFIGURES)
819 endif
820 # @: Check the log for conflicts. ;
821 @conflicts=`egrep "^C " $(CVSCO_LOGFILE)` ;\
822 if test "$$conflicts" ; then \
823 echo "$(MAKE): *** Conflicts during checkout." ;\
824 echo "$$conflicts" ;\
825 echo "$(MAKE): Refer to $(CVSCO_LOGFILE) for full log." ;\
826 false; \
827 else true; \
830 fast-update:
831 # @: Backup the last checkout log.
832 @if test -f $(CVSCO_LOGFILE) ; then \
833 mv $(CVSCO_LOGFILE) $(CVSCO_LOGFILE).old; \
834 else true; \
836 ifdef RUN_AUTOCONF_LOCALLY
837 @echo "Removing local configures" ; \
838 cd $(ROOTDIR) && \
839 $(RM) -f $(CONFIGURES)
840 endif
841 @echo "checkout start: "`date` | tee $(CVSCO_LOGFILE)
842 @echo '$(CVSCO) mozilla/client.mk $(MOZCONFIG_MODULES)'; \
843 cd $(ROOTDIR) && \
844 $(CVSCO) mozilla/client.mk $(MOZCONFIG_MODULES)
845 @cd $(TOPSRCDIR) && \
846 $(MAKE) -f client.mk real_fast-update
848 # Start the update. Split the output to the tty and a log file.
849 real_fast-update:
850 @set -e; \
851 fast_update() { set -e; config/cvsco-fast-update.pl $$@ 2>&1 | tee -a $(CVSCO_LOGFILE); }; \
852 cvs_co() { set -e; echo "$$@" ; \
853 "$$@" 2>&1 | tee -a $(CVSCO_LOGFILE); }; \
854 fast_update $(CVSCO_NSPR); \
855 cd $(ROOTDIR); \
856 cvs_co $(CVSCO_NSS); \
857 cd mozilla; \
858 fast_update $(CVSCO_LDAPCSDK); \
859 $(FASTUPDATE_MODULES); \
860 $(FASTUPDATE_MODULES_NS); \
861 $(FASTUPDATE_LOCALES);
862 @echo "fast_update finish: "`date` | tee -a $(CVSCO_LOGFILE)
863 # update the NSS checkout timestamp
864 @if test `egrep -c '^(U|C) mozilla/security/(nss|coreconf)' $(CVSCO_LOGFILE) 2>/dev/null` != 0; then \
865 touch $(TOPSRCDIR)/security/manager/.nss.checkout; \
867 ifdef RUN_AUTOCONF_LOCALLY
868 cd $(ROOTDIR) && \
869 $(RM) -f $(CONFIGURES)
870 endif
871 # @: Check the log for conflicts. ;
872 @conflicts=`egrep "^C " $(CVSCO_LOGFILE)` ;\
873 if test "$$conflicts" ; then \
874 echo "$(MAKE): *** Conflicts during fast-update." ;\
875 echo "$$conflicts" ;\
876 echo "$(MAKE): Refer to $(CVSCO_LOGFILE) for full log." ;\
877 false; \
878 else true; \
881 CVSCO_LOGFILE_L10N := $(ROOTDIR)/cvsco-l10n.log
882 CVSCO_LOGFILE_L10N := $(shell echo $(CVSCO_LOGFILE_L10N) | sed s%//%/%)
884 l10n-checkout:
885 # @: Backup the last checkout log.
886 @if test -f $(CVSCO_LOGFILE_L10N) ; then \
887 mv $(CVSCO_LOGFILE_L10N) $(CVSCO_LOGFILE_L10N).old; \
888 else true; \
890 @echo "checkout start: "`date` | tee $(CVSCO_LOGFILE_L10N)
891 @echo '$(CVSCO) $(CVS_CO_DATE_FLAGS) mozilla/client.mk $(MOZCONFIG_MODULES)'; \
892 cd $(ROOTDIR) && \
893 $(CVSCO) $(CVS_CO_DATE_FLAGS) mozilla/client.mk $(MOZCONFIG_MODULES)
894 @cd $(ROOTDIR) && $(MAKE) -f mozilla/client.mk real_l10n-checkout
896 FULL_EN_US_DIRS := toolkit \
897 extensions \
898 $(MOZ_PROJECT_LIST) \
899 $(NULL)
901 EN_US_LOCALE_DIRS := $(foreach dir, \
902 $(filter-out toolkit extensions/% $(MOZ_PROJECT_LIST), $(LOCALE_DIRS)), \
903 mozilla/$(dir)/locales)
905 EN_US_CO_DIRS := $(EN_US_LOCALE_DIRS) \
906 $(foreach mod,$(FULL_EN_US_DIRS),mozilla/$(mod)) \
907 mozilla/client.mk \
908 mozilla/configure \
909 mozilla/configure.in \
910 mozilla/allmakefiles.sh \
911 mozilla/build \
912 mozilla/config \
913 $(NULL)
915 # Start the checkout. Split the output to the tty and a log file.
916 real_l10n-checkout:
917 @set -e; \
918 cvs_co() { set -e; echo "$$@" ; \
919 "$$@" 2>&1 | tee -a $(CVSCO_LOGFILE_L10N); }; \
920 cvs_co $(CVS) $(CVS_FLAGS) co $(MODULES_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(EN_US_CO_DIRS); \
921 cvs_co $(CVSCO_LOCALES)
922 @echo "checkout finish: "`date` | tee -a $(CVSCO_LOGFILE_L10N)
923 # @: Check the log for conflicts. ;
924 @conflicts=`egrep "^C " $(CVSCO_LOGFILE_L10N)` ;\
925 if test "$$conflicts" ; then \
926 echo "$(MAKE): *** Conflicts during checkout." ;\
927 echo "$$conflicts" ;\
928 echo "$(MAKE): Refer to $(CVSCO_LOGFILE_L10N) for full log." ;\
929 false; \
930 else true; \
933 #####################################################
934 # First Checkout
936 ifdef _IS_FIRST_CHECKOUT
937 # First time, do build target in a new process to pick up new files.
938 build::
939 $(MAKE) -f $(TOPSRCDIR)/client.mk build
940 else
942 #####################################################
943 # After First Checkout
945 #####################################################
946 # Build date unification
948 ifdef MOZ_UNIFY_BDATE
949 ifndef MOZ_BUILD_DATE
950 ifdef MOZ_BUILD_PROJECTS
951 MOZ_BUILD_DATE = $(shell $(PYTHON) $(TOPSRCDIR)/toolkit/xre/make-platformini.py --print-buildid)
952 export MOZ_BUILD_DATE
953 endif
954 endif
955 endif
957 #####################################################
958 # Preflight, before building any project
960 build profiledbuild alldep preflight_all::
961 ifeq (,$(MOZ_CURRENT_PROJECT)$(if $(MOZ_PREFLIGHT_ALL),,1))
962 # Don't run preflight_all for individual projects in multi-project builds
963 # (when MOZ_CURRENT_PROJECT is set.)
964 ifndef MOZ_BUILD_PROJECTS
965 # Building a single project, OBJDIR is usable.
966 set -e; \
967 for mkfile in $(MOZ_PREFLIGHT_ALL); do \
968 $(MAKE) -f $(TOPSRCDIR)/$$mkfile preflight_all TOPSRCDIR=$(TOPSRCDIR) OBJDIR=$(OBJDIR) MOZ_OBJDIR=$(MOZ_OBJDIR); \
969 done
970 else
971 # OBJDIR refers to the project-specific OBJDIR, which is not available at
972 # this point when building multiple projects. Only MOZ_OBJDIR is available.
973 set -e; \
974 for mkfile in $(MOZ_PREFLIGHT_ALL); do \
975 $(MAKE) -f $(TOPSRCDIR)/$$mkfile preflight_all TOPSRCDIR=$(TOPSRCDIR) MOZ_OBJDIR=$(MOZ_OBJDIR) MOZ_BUILD_PROJECTS="$(MOZ_BUILD_PROJECTS)"; \
976 done
977 endif
978 endif
980 # If we're building multiple projects, but haven't specified which project,
981 # loop through them.
983 ifeq (,$(MOZ_CURRENT_PROJECT)$(if $(MOZ_BUILD_PROJECTS),,1))
984 configure depend build profiledbuild install export libs clean realclean distclean alldep preflight postflight::
985 set -e; \
986 for app in $(MOZ_BUILD_PROJECTS); do \
987 $(MAKE) -f $(TOPSRCDIR)/client.mk $@ MOZ_CURRENT_PROJECT=$$app; \
988 done
990 else
992 # MOZ_CURRENT_PROJECT: either doing a single-project build, or building an
993 # individual project in a multi-project build.
995 ####################################
996 # Configure
998 CONFIG_STATUS = $(wildcard $(OBJDIR)/config.status)
999 CONFIG_CACHE = $(wildcard $(OBJDIR)/config.cache)
1001 ifdef RUN_AUTOCONF_LOCALLY
1002 EXTRA_CONFIG_DEPS := \
1003 $(TOPSRCDIR)/aclocal.m4 \
1004 $(wildcard $(TOPSRCDIR)/build/autoconf/*.m4) \
1005 $(NULL)
1007 $(TOPSRCDIR)/configure: $(TOPSRCDIR)/configure.in $(EXTRA_CONFIG_DEPS)
1008 @echo Generating $@ using autoconf
1009 cd $(TOPSRCDIR); $(AUTOCONF)
1011 $(TOPSRCDIR)/nsprpub/configure: $(TOPSRCDIR)/nsprpub/configure.in $(EXTRA_CONFIG_DEPS)
1012 @echo Generating $@ using autoconf
1013 cd $(TOPSRCDIR)/nsprpub; $(AUTOCONF)
1015 $(TOPSRCDIR)/directory/c-sdk/configure: $(TOPSRCDIR)/directory/c-sdk/configure.in $(EXTRA_CONFIG_DEPS)
1016 @echo Generating $@ using autoconf
1017 cd $(TOPSRCDIR)/directory/c-sdk; $(AUTOCONF)
1018 endif
1020 CONFIG_STATUS_DEPS := \
1021 $(TOPSRCDIR)/configure \
1022 $(TOPSRCDIR)/.mozconfig.mk \
1023 $(wildcard $(TOPSRCDIR)/nsprpub/configure) \
1024 $(wildcard $(TOPSRCDIR)/directory/c-sdk/configure) \
1025 $(wildcard $(TOPSRCDIR)/config/milestone.txt) \
1026 $(wildcard $(TOPSRCDIR)/config/chrome-versions.sh) \
1027 $(wildcard $(addsuffix confvars.sh,$(wildcard */))) \
1028 $(NULL)
1030 # configure uses the program name to determine @srcdir@. Calling it without
1031 # $(TOPSRCDIR) will set @srcdir@ to "."; otherwise, it is set to the full
1032 # path of $(TOPSRCDIR).
1033 ifeq ($(TOPSRCDIR),$(OBJDIR))
1034 CONFIGURE = ./configure
1035 else
1036 CONFIGURE = $(TOPSRCDIR)/configure
1037 endif
1039 ifdef MOZ_TOOLS
1040 CONFIGURE = $(TOPSRCDIR)/configure
1041 endif
1043 configure:: $(CONFIGURES)
1044 ifdef MOZ_BUILD_PROJECTS
1045 @if test ! -d $(MOZ_OBJDIR); then $(MKDIR) $(MOZ_OBJDIR); else true; fi
1046 endif
1047 @if test ! -d $(OBJDIR); then $(MKDIR) $(OBJDIR); else true; fi
1048 @echo cd $(OBJDIR);
1049 @echo $(CONFIGURE) $(CONFIGURE_ARGS)
1050 @cd $(OBJDIR) && $(BUILD_PROJECT_ARG) $(CONFIGURE_ENV_ARGS) $(CONFIGURE) $(CONFIGURE_ARGS) \
1051 || ( echo "*** Fix above errors and then restart with\
1052 \"$(MAKE) -f client.mk build\"" && exit 1 )
1053 @touch $(OBJDIR)/Makefile
1055 $(OBJDIR)/Makefile $(OBJDIR)/config.status: $(CONFIG_STATUS_DEPS)
1056 @$(MAKE) -f $(TOPSRCDIR)/client.mk configure
1058 ifneq (,$(CONFIG_STATUS))
1059 $(OBJDIR)/config/autoconf.mk: $(TOPSRCDIR)/config/autoconf.mk.in
1060 cd $(OBJDIR); \
1061 CONFIG_FILES=config/autoconf.mk ./config.status
1062 endif
1065 ####################################
1066 # Depend
1068 depend:: $(OBJDIR)/Makefile $(OBJDIR)/config.status
1069 $(MOZ_MAKE) export && $(MOZ_MAKE) depend
1071 ####################################
1072 # Preflight
1074 build profiledbuild alldep preflight::
1075 ifdef MOZ_PREFLIGHT
1076 set -e; \
1077 for mkfile in $(MOZ_PREFLIGHT); do \
1078 $(MAKE) -f $(TOPSRCDIR)/$$mkfile preflight TOPSRCDIR=$(TOPSRCDIR) OBJDIR=$(OBJDIR) MOZ_OBJDIR=$(MOZ_OBJDIR); \
1079 done
1080 endif
1082 ####################################
1083 # Build it
1085 build:: $(OBJDIR)/Makefile $(OBJDIR)/config.status
1086 $(MOZ_MAKE)
1088 ####################################
1089 # Profile-feedback build (gcc only)
1090 # To use this, you should set the following variables in your mozconfig
1091 # mk_add_options PROFILE_GEN_SCRIPT=/path/to/profile-script
1093 # The profile script should exercise the functionality to be included
1094 # in the profile feedback.
1096 profiledbuild:: $(OBJDIR)/Makefile $(OBJDIR)/config.status
1097 $(MOZ_MAKE) MOZ_PROFILE_GENERATE=1
1098 OBJDIR=${OBJDIR} $(PROFILE_GEN_SCRIPT)
1099 $(MOZ_MAKE) clobber_all
1100 $(MOZ_MAKE) MOZ_PROFILE_USE=1
1101 find $(OBJDIR) -name "*.da" -exec rm {} \;
1103 ####################################
1104 # Other targets
1106 # Pass these target onto the real build system
1107 install export libs clean realclean distclean alldep:: $(OBJDIR)/Makefile $(OBJDIR)/config.status
1108 $(MOZ_MAKE) $@
1110 ####################################
1111 # Postflight
1113 build profiledbuild alldep postflight::
1114 ifdef MOZ_POSTFLIGHT
1115 set -e; \
1116 for mkfile in $(MOZ_POSTFLIGHT); do \
1117 $(MAKE) -f $(TOPSRCDIR)/$$mkfile postflight TOPSRCDIR=$(TOPSRCDIR) OBJDIR=$(OBJDIR) MOZ_OBJDIR=$(MOZ_OBJDIR); \
1118 done
1119 endif
1121 endif # MOZ_CURRENT_PROJECT
1123 ####################################
1124 # Postflight, after building all projects
1126 build profiledbuild alldep postflight_all::
1127 ifeq (,$(MOZ_CURRENT_PROJECT)$(if $(MOZ_POSTFLIGHT_ALL),,1))
1128 # Don't run postflight_all for individual projects in multi-project builds
1129 # (when MOZ_CURRENT_PROJECT is set.)
1130 ifndef MOZ_BUILD_PROJECTS
1131 # Building a single project, OBJDIR is usable.
1132 set -e; \
1133 for mkfile in $(MOZ_POSTFLIGHT_ALL); do \
1134 $(MAKE) -f $(TOPSRCDIR)/$$mkfile postflight_all TOPSRCDIR=$(TOPSRCDIR) OBJDIR=$(OBJDIR) MOZ_OBJDIR=$(MOZ_OBJDIR); \
1135 done
1136 else
1137 # OBJDIR refers to the project-specific OBJDIR, which is not available at
1138 # this point when building multiple projects. Only MOZ_OBJDIR is available.
1139 set -e; \
1140 for mkfile in $(MOZ_POSTFLIGHT_ALL); do \
1141 $(MAKE) -f $(TOPSRCDIR)/$$mkfile postflight_all TOPSRCDIR=$(TOPSRCDIR) MOZ_OBJDIR=$(MOZ_OBJDIR) MOZ_BUILD_PROJECTS="$(MOZ_BUILD_PROJECTS)"; \
1142 done
1143 endif
1144 endif
1146 cleansrcdir:
1147 @cd $(TOPSRCDIR); \
1148 if [ -f Makefile ]; then \
1149 $(MAKE) distclean ; \
1150 else \
1151 echo "Removing object files from srcdir..."; \
1152 rm -fr `find . -type d \( -name .deps -print -o -name CVS \
1153 -o -exec test ! -d {}/CVS \; \) -prune \
1154 -o \( -name '*.[ao]' -o -name '*.so' \) -type f -print`; \
1155 build/autoconf/clean-config.sh; \
1158 # (! IS_FIRST_CHECKOUT)
1159 endif
1161 echo-variable-%:
1162 @echo $($*)
1164 .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