1 | # The contents of this file are subject to the Netscape Public |
---|
2 | # License Version 1.1 (the "License"); you may not use this file |
---|
3 | # except in compliance with the License. You may obtain a copy of |
---|
4 | # the License at http://www.mozilla.org/NPL/ |
---|
5 | # |
---|
6 | # Software distributed under the License is distributed on an "AS |
---|
7 | # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or |
---|
8 | # implied. See the License for the specific language governing |
---|
9 | # rights and limitations under the License. |
---|
10 | # |
---|
11 | # The Original Code is mozilla.org code. |
---|
12 | # |
---|
13 | # The Initial Developer of the Original Code is Netscape |
---|
14 | # Communications Corporation. Portions created by Netscape are |
---|
15 | # Copyright (C) 1998 Netscape Communications Corporation. All |
---|
16 | # Rights Reserved. |
---|
17 | # |
---|
18 | # Contributor(s): Stephen Lamm |
---|
19 | |
---|
20 | # Build the Mozilla client. |
---|
21 | # |
---|
22 | # This needs CVSROOT set to work, e.g., |
---|
23 | # setenv CVSROOT :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot |
---|
24 | # or |
---|
25 | # setenv CVSROOT :pserver:username%somedomain.org@cvs.mozilla.org:/cvsroot |
---|
26 | # |
---|
27 | # To checkout and build a tree, |
---|
28 | # 1. cvs co mozilla/client.mk |
---|
29 | # 2. cd mozilla |
---|
30 | # 3. gmake -f client.mk |
---|
31 | # |
---|
32 | # Other targets (gmake -f client.mk [targets...]), |
---|
33 | # checkout |
---|
34 | # build |
---|
35 | # clean (realclean is now the same as clean) |
---|
36 | # distclean |
---|
37 | # |
---|
38 | # See http://www.mozilla.org/build/unix.html for more information. |
---|
39 | # |
---|
40 | # Options: |
---|
41 | # MOZ_OBJDIR - Destination object directory |
---|
42 | # MOZ_CO_DATE - Date tag to use for checkout (default: none) |
---|
43 | # MOZ_CO_MODULE - Module to checkout (default: SeaMonkeyAll) |
---|
44 | # MOZ_CVS_FLAGS - Flags to pass cvs (default: -q -z3) |
---|
45 | # MOZ_CO_FLAGS - Flags to pass after 'cvs co' (default: -P) |
---|
46 | # MOZ_MAKE_FLAGS - Flags to pass to $(MAKE) |
---|
47 | # MOZ_CO_BRANCH - Branch tag (Deprecated. Use MOZ_CO_TAG below.) |
---|
48 | # MOZ_CO_LOCALES - localizations to pull (MOZ_CO_LOCALES="de-DE pt-BR") |
---|
49 | # LOCALES_CVSROOT - CVSROOT to use to pull localizations |
---|
50 | # |
---|
51 | |
---|
52 | ####################################################################### |
---|
53 | # Checkout Tags |
---|
54 | # |
---|
55 | # For branches, uncomment the MOZ_CO_TAG line with the proper tag, |
---|
56 | # and commit this file on that tag. |
---|
57 | MOZ_CO_TAG = FIREFOX_1_0_7_RELEASE |
---|
58 | NSPR_CO_TAG = FIREFOX_1_0_7_RELEASE |
---|
59 | PSM_CO_TAG = FIREFOX_1_0_7_RELEASE |
---|
60 | NSS_CO_TAG = FIREFOX_1_0_7_RELEASE |
---|
61 | LDAPCSDK_CO_TAG = FIREFOX_1_0_7_RELEASE |
---|
62 | ACCESSIBLE_CO_TAG = FIREFOX_1_0_7_RELEASE |
---|
63 | IMGLIB2_CO_TAG = FIREFOX_1_0_7_RELEASE |
---|
64 | IPC_CO_TAG = FIREFOX_1_0_7_RELEASE |
---|
65 | TOOLKIT_CO_TAG = FIREFOX_1_0_7_RELEASE |
---|
66 | BROWSER_CO_TAG = FIREFOX_1_0_7_RELEASE |
---|
67 | MAIL_CO_TAG = FIREFOX_1_0_7_RELEASE |
---|
68 | STANDALONE_COMPOSER_CO_TAG = FIREFOX_1_0_7_RELEASE |
---|
69 | LOCALES_CO_TAG = FIREFOX_1_0_7_RELEASE |
---|
70 | BUILD_MODULES = all |
---|
71 | |
---|
72 | ####################################################################### |
---|
73 | # Defines |
---|
74 | # |
---|
75 | CVS = cvs |
---|
76 | |
---|
77 | CWD := $(shell pwd) |
---|
78 | |
---|
79 | ifeq "$(CWD)" "/" |
---|
80 | CWD := /. |
---|
81 | endif |
---|
82 | |
---|
83 | ifneq (, $(wildcard client.mk)) |
---|
84 | # Ran from mozilla directory |
---|
85 | ROOTDIR := $(shell dirname $(CWD)) |
---|
86 | TOPSRCDIR := $(CWD) |
---|
87 | else |
---|
88 | # Ran from mozilla/.. directory (?) |
---|
89 | ROOTDIR := $(CWD) |
---|
90 | TOPSRCDIR := $(CWD)/mozilla |
---|
91 | endif |
---|
92 | |
---|
93 | # on os2, TOPSRCDIR may have two forward slashes in a row, which doesn't |
---|
94 | # work; replace first instance with one forward slash |
---|
95 | TOPSRCDIR := $(shell echo "$(TOPSRCDIR)" | sed -e 's%//%/%') |
---|
96 | |
---|
97 | ifndef TOPSRCDIR_MOZ |
---|
98 | TOPSRCDIR_MOZ=$(TOPSRCDIR) |
---|
99 | endif |
---|
100 | |
---|
101 | # if ROOTDIR equals only drive letter (i.e. "C:"), set to "/" |
---|
102 | DIRNAME := $(shell echo "$(ROOTDIR)" | sed -e 's/^.://') |
---|
103 | ifeq ($(DIRNAME),) |
---|
104 | ROOTDIR := /. |
---|
105 | endif |
---|
106 | |
---|
107 | AUTOCONF := autoconf |
---|
108 | MKDIR := mkdir |
---|
109 | SH := /bin/sh |
---|
110 | ifndef MAKE |
---|
111 | MAKE := gmake |
---|
112 | endif |
---|
113 | |
---|
114 | CONFIG_GUESS_SCRIPT := $(wildcard $(TOPSRCDIR)/build/autoconf/config.guess) |
---|
115 | ifdef CONFIG_GUESS_SCRIPT |
---|
116 | CONFIG_GUESS = $(shell $(CONFIG_GUESS_SCRIPT)) |
---|
117 | else |
---|
118 | _IS_FIRST_CHECKOUT := 1 |
---|
119 | endif |
---|
120 | |
---|
121 | #################################### |
---|
122 | # CVS |
---|
123 | |
---|
124 | # Add the CVS root to CVS_FLAGS if needed |
---|
125 | CVS_ROOT_IN_TREE := $(shell cat $(TOPSRCDIR)/CVS/Root 2>/dev/null) |
---|
126 | ifneq ($(CVS_ROOT_IN_TREE),) |
---|
127 | ifneq ($(CVS_ROOT_IN_TREE),$(CVSROOT)) |
---|
128 | CVS_FLAGS := -d $(CVS_ROOT_IN_TREE) |
---|
129 | endif |
---|
130 | endif |
---|
131 | |
---|
132 | CVSCO = $(strip $(CVS) $(CVS_FLAGS) co $(CVS_CO_FLAGS)) |
---|
133 | CVSCO_LOGFILE := $(ROOTDIR)/cvsco.log |
---|
134 | CVSCO_LOGFILE := $(shell echo $(CVSCO_LOGFILE) | sed s%//%/%) |
---|
135 | |
---|
136 | ifdef MOZ_CO_TAG |
---|
137 | CVS_CO_FLAGS := -r $(MOZ_CO_TAG) |
---|
138 | endif |
---|
139 | |
---|
140 | # if LOCALES_CVSROOT is not specified, set it here |
---|
141 | # (and let mozconfig override it) |
---|
142 | LOCALES_CVSROOT ?= :pserver:anonymous@cvs-mirror.mozilla.org:/l10n |
---|
143 | |
---|
144 | #################################### |
---|
145 | # Load mozconfig Options |
---|
146 | |
---|
147 | # See build pages, http://www.mozilla.org/build/unix.html, |
---|
148 | # for how to set up mozconfig. |
---|
149 | MOZCONFIG_LOADER := mozilla/build/autoconf/mozconfig2client-mk |
---|
150 | MOZCONFIG_FINDER := mozilla/build/autoconf/mozconfig-find |
---|
151 | MOZCONFIG_MODULES := mozilla/build/unix/modules.mk mozilla/build/unix/uniq.pl |
---|
152 | run_for_side_effects := \ |
---|
153 | $(shell cd $(ROOTDIR); \ |
---|
154 | if test "$(_IS_FIRST_CHECKOUT)"; then \ |
---|
155 | $(CVSCO) $(MOZCONFIG_FINDER) $(MOZCONFIG_LOADER) $(MOZCONFIG_MODULES); \ |
---|
156 | else true; \ |
---|
157 | fi; \ |
---|
158 | $(MOZCONFIG_LOADER) $(TOPSRCDIR) mozilla/.mozconfig.mk > mozilla/.mozconfig.out) |
---|
159 | include $(TOPSRCDIR)/.mozconfig.mk |
---|
160 | include $(TOPSRCDIR)/build/unix/modules.mk |
---|
161 | |
---|
162 | #################################### |
---|
163 | # Options that may come from mozconfig |
---|
164 | |
---|
165 | # Change CVS flags if anonymous root is requested |
---|
166 | ifdef MOZ_CO_USE_MIRROR |
---|
167 | CVS_FLAGS := -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot |
---|
168 | endif |
---|
169 | |
---|
170 | # MOZ_CVS_FLAGS - Basic CVS flags |
---|
171 | ifeq "$(origin MOZ_CVS_FLAGS)" "undefined" |
---|
172 | CVS_FLAGS := $(CVS_FLAGS) -q -z 3 |
---|
173 | else |
---|
174 | CVS_FLAGS := $(MOZ_CVS_FLAGS) |
---|
175 | endif |
---|
176 | |
---|
177 | # This option is deprecated. The best way to have client.mk pull a tag |
---|
178 | # is to set MOZ_CO_TAG (see above) and commit that change on the tag. |
---|
179 | ifdef MOZ_CO_BRANCH |
---|
180 | $(warning Use MOZ_CO_TAG instead of MOZ_CO_BRANCH) |
---|
181 | CVS_CO_FLAGS := -r $(MOZ_CO_BRANCH) |
---|
182 | endif |
---|
183 | |
---|
184 | # MOZ_CO_FLAGS - Anything that we should use on all checkouts |
---|
185 | ifeq "$(origin MOZ_CO_FLAGS)" "undefined" |
---|
186 | CVS_CO_FLAGS := $(CVS_CO_FLAGS) -P |
---|
187 | else |
---|
188 | CVS_CO_FLAGS := $(CVS_CO_FLAGS) $(MOZ_CO_FLAGS) |
---|
189 | endif |
---|
190 | |
---|
191 | ifdef MOZ_CO_DATE |
---|
192 | CVS_CO_DATE_FLAGS := -D "$(MOZ_CO_DATE)" |
---|
193 | endif |
---|
194 | |
---|
195 | ifdef MOZ_OBJDIR |
---|
196 | OBJDIR := $(MOZ_OBJDIR) |
---|
197 | MOZ_MAKE := $(MAKE) $(MOZ_MAKE_FLAGS) -C $(OBJDIR) |
---|
198 | else |
---|
199 | OBJDIR := $(TOPSRCDIR) |
---|
200 | MOZ_MAKE := $(MAKE) $(MOZ_MAKE_FLAGS) |
---|
201 | endif |
---|
202 | |
---|
203 | #################################### |
---|
204 | # CVS defines for PSM |
---|
205 | # |
---|
206 | PSM_CO_MODULE= mozilla/security/manager |
---|
207 | PSM_CO_FLAGS := -P -A |
---|
208 | ifdef MOZ_CO_FLAGS |
---|
209 | PSM_CO_FLAGS := $(MOZ_CO_FLAGS) |
---|
210 | endif |
---|
211 | ifdef PSM_CO_TAG |
---|
212 | PSM_CO_FLAGS := $(PSM_CO_FLAGS) -r $(PSM_CO_TAG) |
---|
213 | endif |
---|
214 | CVSCO_PSM = $(CVS) $(CVS_FLAGS) co $(PSM_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(PSM_CO_MODULE) |
---|
215 | |
---|
216 | #################################### |
---|
217 | # CVS defines for NSS |
---|
218 | # |
---|
219 | NSS_CO_MODULE = mozilla/security/nss \ |
---|
220 | mozilla/security/coreconf \ |
---|
221 | $(NULL) |
---|
222 | |
---|
223 | NSS_CO_FLAGS := -P |
---|
224 | ifdef MOZ_CO_FLAGS |
---|
225 | NSS_CO_FLAGS := $(MOZ_CO_FLAGS) |
---|
226 | endif |
---|
227 | ifdef NSS_CO_TAG |
---|
228 | NSS_CO_FLAGS := $(NSS_CO_FLAGS) -r $(NSS_CO_TAG) |
---|
229 | endif |
---|
230 | # Cannot pull static tags by date |
---|
231 | ifeq ($(NSS_CO_TAG),NSS_CLIENT_TAG) |
---|
232 | CVSCO_NSS = $(CVS) $(CVS_FLAGS) co $(NSS_CO_FLAGS) $(NSS_CO_MODULE) |
---|
233 | else |
---|
234 | CVSCO_NSS = $(CVS) $(CVS_FLAGS) co $(NSS_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(NSS_CO_MODULE) |
---|
235 | endif |
---|
236 | |
---|
237 | #################################### |
---|
238 | # CVS defines for NSPR |
---|
239 | # |
---|
240 | NSPR_CO_MODULE = mozilla/nsprpub |
---|
241 | NSPR_CO_FLAGS := -P |
---|
242 | ifdef MOZ_CO_FLAGS |
---|
243 | NSPR_CO_FLAGS := $(MOZ_CO_FLAGS) |
---|
244 | endif |
---|
245 | ifdef NSPR_CO_TAG |
---|
246 | NSPR_CO_FLAGS := $(NSPR_CO_FLAGS) -r $(NSPR_CO_TAG) |
---|
247 | endif |
---|
248 | # Cannot pull static tags by date |
---|
249 | ifeq ($(NSPR_CO_TAG),NSPRPUB_CLIENT_TAG) |
---|
250 | CVSCO_NSPR = $(CVS) $(CVS_FLAGS) co $(NSPR_CO_FLAGS) $(NSPR_CO_MODULE) |
---|
251 | else |
---|
252 | CVSCO_NSPR = $(CVS) $(CVS_FLAGS) co $(NSPR_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(NSPR_CO_MODULE) |
---|
253 | endif |
---|
254 | |
---|
255 | #################################### |
---|
256 | # CVS defines for the C LDAP SDK |
---|
257 | # |
---|
258 | LDAPCSDK_CO_MODULE = mozilla/directory/c-sdk |
---|
259 | LDAPCSDK_CO_FLAGS := -P |
---|
260 | ifdef MOZ_CO_FLAGS |
---|
261 | LDAPCSDK_CO_FLAGS := $(MOZ_CO_FLAGS) |
---|
262 | endif |
---|
263 | ifdef LDAPCSDK_CO_TAG |
---|
264 | LDAPCSDK_CO_FLAGS := $(LDAPCSDK_CO_FLAGS) -r $(LDAPCSDK_CO_TAG) |
---|
265 | endif |
---|
266 | CVSCO_LDAPCSDK = $(CVS) $(CVS_FLAGS) co $(LDAPCSDK_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(LDAPCSDK_CO_MODULE) |
---|
267 | |
---|
268 | #################################### |
---|
269 | # CVS defines for the C LDAP SDK |
---|
270 | # |
---|
271 | ACCESSIBLE_CO_MODULE = mozilla/accessible |
---|
272 | ACCESSIBLE_CO_FLAGS := -P |
---|
273 | ifdef MOZ_CO_FLAGS |
---|
274 | ACCESSIBLE_CO_FLAGS := $(MOZ_CO_FLAGS) |
---|
275 | endif |
---|
276 | ifdef ACCESSIBLE_CO_TAG |
---|
277 | ACCESSIBLE_CO_FLAGS := $(ACCESSIBLE_CO_FLAGS) -r $(ACCESSIBLE_CO_TAG) |
---|
278 | endif |
---|
279 | CVSCO_ACCESSIBLE = $(CVS) $(CVS_FLAGS) co $(ACCESSIBLE_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(ACCESSIBLE_CO_MODULE) |
---|
280 | |
---|
281 | |
---|
282 | #################################### |
---|
283 | # CVS defines for new image library |
---|
284 | # |
---|
285 | IMGLIB2_CO_MODULE = mozilla/modules/libpr0n |
---|
286 | IMGLIB2_CO_FLAGS := -P |
---|
287 | ifdef MOZ_CO_FLAGS |
---|
288 | IMGLIB2_CO_FLAGS := $(MOZ_CO_FLAGS) |
---|
289 | endif |
---|
290 | ifdef IMGLIB2_CO_TAG |
---|
291 | IMGLIB2_CO_FLAGS := $(IMGLIB2_CO_FLAGS) -r $(IMGLIB2_CO_TAG) |
---|
292 | endif |
---|
293 | CVSCO_IMGLIB2 = $(CVS) $(CVS_FLAGS) co $(IMGLIB2_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(IMGLIB2_CO_MODULE) |
---|
294 | |
---|
295 | #################################### |
---|
296 | # CVS defines for ipc module |
---|
297 | # |
---|
298 | IPC_CO_MODULE = mozilla/ipc/ipcd |
---|
299 | IPC_CO_FLAGS := -P -A |
---|
300 | ifdef MOZ_CO_FLAGS |
---|
301 | IPC_CO_FLAGS := $(MOZ_CO_FLAGS) |
---|
302 | endif |
---|
303 | ifdef IPC_CO_TAG |
---|
304 | IPC_CO_FLAGS := $(IPC_CO_FLAGS) -r $(IPC_CO_TAG) |
---|
305 | endif |
---|
306 | CVSCO_IPC = $(CVS) $(CVS_FLAGS) co $(IPC_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(IPC_CO_MODULE) |
---|
307 | |
---|
308 | #################################### |
---|
309 | # CVS defines for Calendar |
---|
310 | # |
---|
311 | CVSCO_CALENDAR := $(CVSCO) $(CVS_CO_DATE_FLAGS) mozilla/calendar mozilla/other-licenses/libical |
---|
312 | |
---|
313 | #################################### |
---|
314 | # CVS defines for SeaMonkey |
---|
315 | # |
---|
316 | ifeq ($(MOZ_CO_MODULE),) |
---|
317 | MOZ_CO_MODULE := SeaMonkeyAll |
---|
318 | endif |
---|
319 | CVSCO_SEAMONKEY := $(CVSCO) $(CVS_CO_DATE_FLAGS) $(MOZ_CO_MODULE) |
---|
320 | |
---|
321 | #################################### |
---|
322 | # CVS defines for standalone modules |
---|
323 | # |
---|
324 | ifeq ($(BUILD_MODULES),all) |
---|
325 | CHECKOUT_STANDALONE := true |
---|
326 | CHECKOUT_STANDALONE_NOSUBDIRS := true |
---|
327 | else |
---|
328 | STANDALONE_CO_MODULE := $(filter-out $(NSPRPUB_DIR) security directory/c-sdk, $(BUILD_MODULE_CVS)) |
---|
329 | STANDALONE_CO_MODULE += allmakefiles.sh client.mk aclocal.m4 configure configure.in |
---|
330 | STANDALONE_CO_MODULE += Makefile.in |
---|
331 | STANDALONE_CO_MODULE := $(addprefix mozilla/, $(STANDALONE_CO_MODULE)) |
---|
332 | CHECKOUT_STANDALONE := cvs_co $(CVSCO) $(CVS_CO_DATE_FLAGS) $(STANDALONE_CO_MODULE) |
---|
333 | |
---|
334 | NOSUBDIRS_MODULE := $(addprefix mozilla/, $(BUILD_MODULE_CVS_NS)) |
---|
335 | ifneq ($(NOSUBDIRS_MODULE),) |
---|
336 | CHECKOUT_STANDALONE_NOSUBDIRS := cvs_co $(CVSCO) -l $(CVS_CO_DATE_FLAGS) $(NOSUBDIRS_MODULE) |
---|
337 | else |
---|
338 | CHECKOUT_STANDALONE_NOSUBDIRS := true |
---|
339 | endif |
---|
340 | |
---|
341 | CVSCO_SEAMONKEY := |
---|
342 | ifeq (,$(filter $(NSPRPUB_DIR), $(BUILD_MODULE_CVS))) |
---|
343 | CVSCO_NSPR := |
---|
344 | endif |
---|
345 | ifeq (,$(filter security security/manager, $(BUILD_MODULE_CVS))) |
---|
346 | CVSCO_PSM := |
---|
347 | CVSCO_NSS := |
---|
348 | endif |
---|
349 | ifeq (,$(filter directory/c-sdk, $(BUILD_MODULE_CVS))) |
---|
350 | CVSCO_LDAPCSDK := |
---|
351 | endif |
---|
352 | ifeq (,$(filter accessible, $(BUILD_MODULE_CVS))) |
---|
353 | CVSCO_ACCESSIBLE := |
---|
354 | endif |
---|
355 | ifeq (,$(filter modules/libpr0n, $(BUILD_MODULE_CVS))) |
---|
356 | CVSCO_IMGLIB2 := |
---|
357 | endif |
---|
358 | ifeq (,$(filter ipc, $(BUILD_MODULE_CVS))) |
---|
359 | CVSCO_IPC := |
---|
360 | endif |
---|
361 | ifeq (,$(filter calendar other-licenses/libical, $(BUILD_MODULE_CVS))) |
---|
362 | CVSCO_CALENDAR := |
---|
363 | endif |
---|
364 | endif |
---|
365 | |
---|
366 | #################################### |
---|
367 | # CVS defined for libart (pulled and built if MOZ_INTERNAL_LIBART_LGPL is set) |
---|
368 | # |
---|
369 | CVSCO_LIBART := $(CVSCO) $(CVS_CO_DATE_FLAGS) mozilla/other-licenses/libart_lgpl |
---|
370 | |
---|
371 | ifdef MOZ_INTERNAL_LIBART_LGPL |
---|
372 | FASTUPDATE_LIBART := fast_update $(CVSCO_LIBART) |
---|
373 | CHECKOUT_LIBART := cvs_co $(CVSCO_LIBART) |
---|
374 | else |
---|
375 | CHECKOUT_LIBART := true |
---|
376 | FASTUPDATE_LIBART := true |
---|
377 | endif |
---|
378 | |
---|
379 | #################################### |
---|
380 | # CVS defines for Phoenix (pulled and built if MOZ_PHOENIX is set) |
---|
381 | # |
---|
382 | BROWSER_CO_FLAGS := -P |
---|
383 | ifdef MOZ_CO_FLAGS |
---|
384 | BROWSER_CO_FLAGS := $(MOZ_CO_FLAGS) |
---|
385 | endif |
---|
386 | ifdef BROWSER_CO_TAG |
---|
387 | BROWSER_CO_FLAGS := $(BROWSER_CO_FLAGS) -r $(BROWSER_CO_TAG) |
---|
388 | endif |
---|
389 | |
---|
390 | BROWSER_CO_DIRS := mozilla/browser mozilla/other-licenses/branding/firefox mozilla/other-licenses/7zstub/firefox |
---|
391 | |
---|
392 | CVSCO_PHOENIX := $(CVS) $(CVS_FLAGS) co $(BROWSER_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(BROWSER_CO_DIRS) |
---|
393 | |
---|
394 | ifdef MOZ_PHOENIX |
---|
395 | FASTUPDATE_PHOENIX := fast_update $(CVSCO_PHOENIX) |
---|
396 | CHECKOUT_PHOENIX := cvs_co $(CVSCO_PHOENIX) |
---|
397 | MOZ_XUL_APP = 1 |
---|
398 | LOCALE_DIRS += mozilla/browser/locales |
---|
399 | else |
---|
400 | CHECKOUT_PHOENIX := true |
---|
401 | FASTUPDATE_PHOENIX := true |
---|
402 | endif |
---|
403 | |
---|
404 | #################################### |
---|
405 | # CVS defines for Thunderbird (pulled and built if MOZ_THUNDERBIRD is set) |
---|
406 | # |
---|
407 | |
---|
408 | MAIL_CO_FLAGS := -P |
---|
409 | ifdef MOZ_CO_FLAGS |
---|
410 | MAIL_CO_FLAGS := $(MOZ_CO_FLAGS) |
---|
411 | endif |
---|
412 | ifdef MAIL_CO_TAG |
---|
413 | MAIL_CO_FLAGS := $(MAIL_CO_FLAGS) -r $(MAIL_CO_TAG) |
---|
414 | endif |
---|
415 | |
---|
416 | MAIL_CO_DIRS := mozilla/mail mozilla/other-licenses/branding/thunderbird mozilla/other-licenses/7zstub/thunderbird |
---|
417 | |
---|
418 | CVSCO_THUNDERBIRD := $(CVS) $(CVS_FLAGS) co $(MAIL_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(MAIL_CO_DIRS) |
---|
419 | ifdef MOZ_THUNDERBIRD |
---|
420 | FASTUPDATE_THUNDERBIRD := fast_update $(CVSCO_THUNDERBIRD) |
---|
421 | CHECKOUT_THUNDERBIRD := cvs_co $(CVSCO_THUNDERBIRD) |
---|
422 | MOZ_XUL_APP = 1 |
---|
423 | LOCALE_DIRS += mozilla/mail/locales |
---|
424 | else |
---|
425 | FASTUPDATE_THUNDERBIRD := true |
---|
426 | CHECKOUT_THUNDERBIRD := true |
---|
427 | endif |
---|
428 | |
---|
429 | #################################### |
---|
430 | # CVS defines for Standalone Composer (pulled and built if MOZ_STANDALONE_COMPOSER is set) |
---|
431 | # |
---|
432 | |
---|
433 | STANDALONE_COMPOSER_CO_FLAGS := -P |
---|
434 | ifdef MOZ_CO_FLAGS |
---|
435 | STANDALONE_COMPOSER_CO_FLAGS := $(MOZ_CO_FLAGS) |
---|
436 | endif |
---|
437 | ifdef STANDALONE_COMPOSER_CO_TAG |
---|
438 | STANDALONE_COMPOSER_CO_FLAGS := $(STANDALONE_COMPOSER_CO_FLAGS) -r $(STANDALONE_COMPOSER_CO_TAG) |
---|
439 | endif |
---|
440 | |
---|
441 | CVSCO_STANDALONE_COMPOSER := $(CVS) $(CVS_FLAGS) co $(STANDALONE_COMPOSER_CO_FLAGS) $(CVS_CO_DATE_FLAGS) mozilla/composer |
---|
442 | ifdef MOZ_STANDALONE_COMPOSER |
---|
443 | FASTUPDATE_STANDALONE_COMPOSER:= fast_update $(CVSCO_STANDALONE_COMPOSER) |
---|
444 | CHECKOUT_STANDALONE_COMPOSER:= cvs_co $(CVSCO_STANDALONE_COMPOSER) |
---|
445 | MOZ_XUL_APP = 1 |
---|
446 | LOCALE_DIRS += mozilla/composer/locales |
---|
447 | else |
---|
448 | FASTUPDATE_STANDALONE_COMPOSER:= true |
---|
449 | CHECKOUT_STANDALONE_COMPOSER:= true |
---|
450 | endif |
---|
451 | |
---|
452 | #################################### |
---|
453 | # CVS defines for mozilla/toolkit |
---|
454 | # |
---|
455 | |
---|
456 | TOOLKIT_CO_FLAGS := -P |
---|
457 | ifdef MOZ_CO_FLAGS |
---|
458 | TOOLKIT_CO_FLAGS := $(MOZ_CO_FLAGS) |
---|
459 | endif |
---|
460 | ifdef TOOLKIT_CO_TAG |
---|
461 | TOOLKIT_CO_FLAGS := $(TOOLKIT_CO_FLAGS) -r $(TOOLKIT_CO_TAG) |
---|
462 | endif |
---|
463 | |
---|
464 | CVSCO_MOZTOOLKIT := $(CVS) $(CVS_FLAGS) co $(TOOLKIT_CO_FLAGS) $(CVS_CO_DATE_FLAGS) mozilla/toolkit mozilla/chrome |
---|
465 | FASTUPDATE_MOZTOOLKIT := fast_update $(CVSCO_MOZTOOLKIT) |
---|
466 | CHECKOUT_MOZTOOLKIT := cvs_co $(CVSCO_MOZTOOLKIT) |
---|
467 | LOCALE_DIRS += mozilla/toolkit/locales |
---|
468 | |
---|
469 | #################################### |
---|
470 | # CVS defines for codesighs (pulled and built if MOZ_MAPINFO is set) |
---|
471 | # |
---|
472 | CVSCO_CODESIGHS := $(CVSCO) $(CVS_CO_DATE_FLAGS) mozilla/tools/codesighs |
---|
473 | |
---|
474 | ifdef MOZ_MAPINFO |
---|
475 | FASTUPDATE_CODESIGHS := fast_update $(CVSCO_CODESIGHS) |
---|
476 | CHECKOUT_CODESIGHS := cvs_co $(CVSCO_CODESIGHS) |
---|
477 | else |
---|
478 | CHECKOUT_CODESIGHS := true |
---|
479 | FASTUPDATE_CODESIGHS := true |
---|
480 | endif |
---|
481 | |
---|
482 | ################################### |
---|
483 | # CVS defines for locales |
---|
484 | # |
---|
485 | LOCALES_CO_FLAGS := -P |
---|
486 | |
---|
487 | ifdef LOCALES_CO_TAG |
---|
488 | LOCALES_CO_FLAGS := $(LOCALES_CO_FLAGS) -r $(LOCALES_CO_TAG) |
---|
489 | endif |
---|
490 | |
---|
491 | ifndef MOZ_CO_LOCALES |
---|
492 | LOCK_LOCALES := true |
---|
493 | FASTUPDATE_LOCALES := true |
---|
494 | CHECKOUT_LOCALES := true |
---|
495 | UNLOCK_LOCALES := true |
---|
496 | else |
---|
497 | ifeq (all,$(MOZ_CO_LOCALES)) |
---|
498 | MOZCONFIG_MODULES += $(addsuffix /all-locales,$(LOCALE_DIRS)) |
---|
499 | |
---|
500 | LOCK_LOCALES := \ |
---|
501 | for dir in $(LOCALE_DIRS); do \ |
---|
502 | for locale in `cat $$dir/all-locales`; do \ |
---|
503 | mv $$dir/$$locale $$dir/$$locale-tmp || true; \ |
---|
504 | done; \ |
---|
505 | done |
---|
506 | |
---|
507 | FASTUPDATE_LOCALES := \ |
---|
508 | for dir in $(LOCALE_DIRS); do \ |
---|
509 | for locale in `cat $$dir/all-locales`; do \ |
---|
510 | fast_update $(CVS) $(CVS_FLAGS) -d $(LOCALES_CVSROOT) co $(CVS_CO_DATE_FLAGS) $$dir/$$locale; \ |
---|
511 | done; \ |
---|
512 | done |
---|
513 | |
---|
514 | CHECKOUT_LOCALES := \ |
---|
515 | for dir in $(LOCALE_DIRS); do \ |
---|
516 | for locale in `cat $$dir/all-locales`; do \ |
---|
517 | cvs_co $(CVS) $(CVS_FLAGS) -d $(LOCALES_CVSROOT) co $(LOCALES_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $$dir/$$locale; \ |
---|
518 | done; \ |
---|
519 | done |
---|
520 | |
---|
521 | UNLOCK_LOCALES := \ |
---|
522 | for dir in $(LOCALE_DIRS); do \ |
---|
523 | for locale in `cat $$dir/all-locales`; do \ |
---|
524 | mv $$dir/$$locale-tmp $$dir/$$locale || true; \ |
---|
525 | done; \ |
---|
526 | done |
---|
527 | else |
---|
528 | LOCALE_CO_DIRS = $(foreach locale,$(MOZ_CO_LOCALES),$(addsuffix /$(locale),$(LOCALE_DIRS))) |
---|
529 | |
---|
530 | CVSCO_LOCALES := $(CVS) $(CVS_FLAGS) -d $(LOCALES_CVSROOT) co $(LOCALES_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(LOCALE_CO_DIRS) |
---|
531 | |
---|
532 | LOCK_LOCALES := for dir in $(LOCALE_CO_DIRS); do mv $$dir $$dir-tmp || true; done |
---|
533 | FASTUPDATE_LOCALES := fast_update $(CVSCO_LOCALES) |
---|
534 | CHECKOUT_LOCALES := cvs_co $(CVSCO_LOCALES) |
---|
535 | UNLOCK_LOCALES := for dir in $(LOCALE_CO_DIRS); do mv $$dir-tmp $$dir || true; done |
---|
536 | endif |
---|
537 | endif #MOZ_CO_LOCALES |
---|
538 | |
---|
539 | ####################################################################### |
---|
540 | # Rules |
---|
541 | # |
---|
542 | |
---|
543 | # Print out any options loaded from mozconfig. |
---|
544 | all build checkout clean depend distclean export libs install realclean:: |
---|
545 | @if test -f .mozconfig.out; then \ |
---|
546 | cat .mozconfig.out; \ |
---|
547 | rm -f .mozconfig.out; \ |
---|
548 | else true; \ |
---|
549 | fi |
---|
550 | |
---|
551 | ifdef _IS_FIRST_CHECKOUT |
---|
552 | all:: checkout build |
---|
553 | else |
---|
554 | all:: checkout alldep |
---|
555 | endif |
---|
556 | |
---|
557 | # Windows equivalents |
---|
558 | pull_all: checkout |
---|
559 | build_all: build |
---|
560 | build_all_dep: alldep |
---|
561 | build_all_depend: alldep |
---|
562 | clobber clobber_all: clean |
---|
563 | pull_and_build_all: checkout alldep |
---|
564 | |
---|
565 | # Do everything from scratch |
---|
566 | everything: checkout clean build |
---|
567 | |
---|
568 | #################################### |
---|
569 | # CVS checkout |
---|
570 | # |
---|
571 | checkout:: |
---|
572 | # @: Backup the last checkout log. |
---|
573 | @if test -f $(CVSCO_LOGFILE) ; then \ |
---|
574 | mv $(CVSCO_LOGFILE) $(CVSCO_LOGFILE).old; \ |
---|
575 | else true; \ |
---|
576 | fi |
---|
577 | ifdef RUN_AUTOCONF_LOCALLY |
---|
578 | @echo "Removing local configures" ; \ |
---|
579 | cd $(ROOTDIR) && \ |
---|
580 | $(RM) -f mozilla/configure mozilla/nsprpub/configure \ |
---|
581 | mozilla/directory/c-sdk/configure |
---|
582 | endif |
---|
583 | @echo "checkout start: "`date` | tee $(CVSCO_LOGFILE) |
---|
584 | @echo '$(CVSCO) $(CVS_CO_DATE_FLAGS) mozilla/client.mk $(MOZCONFIG_MODULES)'; \ |
---|
585 | cd $(ROOTDIR) && \ |
---|
586 | $(CVSCO) $(CVS_CO_DATE_FLAGS) mozilla/client.mk $(MOZCONFIG_MODULES) |
---|
587 | @cd $(ROOTDIR) && $(MAKE) -f mozilla/client.mk real_checkout |
---|
588 | |
---|
589 | # Start the checkout. Split the output to the tty and a log file. |
---|
590 | |
---|
591 | real_checkout: |
---|
592 | @set -e; \ |
---|
593 | cvs_co() { set -e; echo "$$@" ; \ |
---|
594 | "$$@" 2>&1 | tee -a $(CVSCO_LOGFILE); }; \ |
---|
595 | $(LOCK_LOCALES); \ |
---|
596 | $(CHECKOUT_STANDALONE); \ |
---|
597 | $(CHECKOUT_STANDALONE_NOSUBDIRS); \ |
---|
598 | cvs_co $(CVSCO_NSPR); \ |
---|
599 | cvs_co $(CVSCO_NSS); \ |
---|
600 | cvs_co $(CVSCO_PSM); \ |
---|
601 | cvs_co $(CVSCO_LDAPCSDK); \ |
---|
602 | cvs_co $(CVSCO_ACCESSIBLE); \ |
---|
603 | cvs_co $(CVSCO_IMGLIB2); \ |
---|
604 | cvs_co $(CVSCO_IPC); \ |
---|
605 | cvs_co $(CVSCO_CALENDAR); \ |
---|
606 | $(CHECKOUT_LIBART); \ |
---|
607 | $(CHECKOUT_MOZTOOLKIT); \ |
---|
608 | $(CHECKOUT_PHOENIX); \ |
---|
609 | $(CHECKOUT_THUNDERBIRD); \ |
---|
610 | $(CHECKOUT_STANDALONE_COMPOSER); \ |
---|
611 | $(CHECKOUT_CODESIGHS); \ |
---|
612 | $(UNLOCK_LOCALES); \ |
---|
613 | $(CHECKOUT_LOCALES); \ |
---|
614 | cvs_co $(CVSCO_SEAMONKEY); |
---|
615 | @echo "checkout finish: "`date` | tee -a $(CVSCO_LOGFILE) |
---|
616 | # update the NSS checkout timestamp |
---|
617 | @if test `egrep -c '^(U|C) mozilla/security/(nss|coreconf)' $(CVSCO_LOGFILE) 2>/dev/null` != 0; then \ |
---|
618 | touch $(TOPSRCDIR)/security/manager/.nss.checkout; \ |
---|
619 | fi |
---|
620 | # @: Check the log for conflicts. ; |
---|
621 | @conflicts=`egrep "^C " $(CVSCO_LOGFILE)` ;\ |
---|
622 | if test "$$conflicts" ; then \ |
---|
623 | echo "$(MAKE): *** Conflicts during checkout." ;\ |
---|
624 | echo "$$conflicts" ;\ |
---|
625 | echo "$(MAKE): Refer to $(CVSCO_LOGFILE) for full log." ;\ |
---|
626 | false; \ |
---|
627 | else true; \ |
---|
628 | fi |
---|
629 | ifdef RUN_AUTOCONF_LOCALLY |
---|
630 | @echo Generating configures using $(AUTOCONF) ; \ |
---|
631 | cd $(TOPSRCDIR) && $(AUTOCONF) && \ |
---|
632 | cd $(TOPSRCDIR)/nsprpub && $(AUTOCONF) && \ |
---|
633 | cd $(TOPSRCDIR)/directory/c-sdk && $(AUTOCONF) |
---|
634 | endif |
---|
635 | |
---|
636 | fast-update: |
---|
637 | # @: Backup the last checkout log. |
---|
638 | @if test -f $(CVSCO_LOGFILE) ; then \ |
---|
639 | mv $(CVSCO_LOGFILE) $(CVSCO_LOGFILE).old; \ |
---|
640 | else true; \ |
---|
641 | fi |
---|
642 | ifdef RUN_AUTOCONF_LOCALLY |
---|
643 | @echo "Removing local configures" ; \ |
---|
644 | cd $(ROOTDIR) && \ |
---|
645 | $(RM) -f mozilla/configure mozilla/nsprpub/configure \ |
---|
646 | mozilla/directory/c-sdk/configure |
---|
647 | endif |
---|
648 | @echo "checkout start: "`date` | tee $(CVSCO_LOGFILE) |
---|
649 | @echo '$(CVSCO) mozilla/client.mk $(MOZCONFIG_MODULES)'; \ |
---|
650 | cd $(ROOTDIR) && \ |
---|
651 | $(CVSCO) mozilla/client.mk $(MOZCONFIG_MODULES) |
---|
652 | @cd $(TOPSRCDIR) && \ |
---|
653 | $(MAKE) -f client.mk real_fast-update |
---|
654 | |
---|
655 | # Start the update. Split the output to the tty and a log file. |
---|
656 | real_fast-update: |
---|
657 | @set -e; \ |
---|
658 | fast_update() { set -e; config/cvsco-fast-update.pl $$@ 2>&1 | tee -a $(CVSCO_LOGFILE); }; \ |
---|
659 | cvs_co() { set -e; echo "$$@" ; \ |
---|
660 | "$$@" 2>&1 | tee -a $(CVSCO_LOGFILE); }; \ |
---|
661 | fast_update $(CVSCO_NSPR); \ |
---|
662 | cd $(ROOTDIR); \ |
---|
663 | cvs_co $(CVSCO_NSS); \ |
---|
664 | $(LOCK_LOCALES); \ |
---|
665 | cd mozilla; \ |
---|
666 | fast_update $(CVSCO_PSM); \ |
---|
667 | fast_update $(CVSCO_LDAPCSDK); \ |
---|
668 | fast_update $(CVSCO_ACCESSIBLE); \ |
---|
669 | fast_update $(CVSCO_IMGLIB2); \ |
---|
670 | fast_update $(CVSCO_IPC); \ |
---|
671 | fast_update $(CVSCO_CALENDAR); \ |
---|
672 | $(FASTUPDATE_LIBART); \ |
---|
673 | $(FASTUPDATE_MOZTOOLKIT); \ |
---|
674 | $(FASTUPDATE_PHOENIX); \ |
---|
675 | $(FASTUPDATE_THUNDERBIRD); \ |
---|
676 | $(FASTUPDATE_STANDALONE_COMPOSER); \ |
---|
677 | $(FASTUPDATE_CODESIGHS); \ |
---|
678 | cd $(ROOTDIR); \ |
---|
679 | $(UNLOCK_LOCALES); \ |
---|
680 | cd mozilla; \ |
---|
681 | $(FASTUPDATE_LOCALES); \ |
---|
682 | fast_update $(CVSCO_SEAMONKEY); |
---|
683 | @echo "fast_update finish: "`date` | tee -a $(CVSCO_LOGFILE) |
---|
684 | # update the NSS checkout timestamp |
---|
685 | @if test `egrep -c '^(U|C) mozilla/security/(nss|coreconf)' $(CVSCO_LOGFILE) 2>/dev/null` != 0; then \ |
---|
686 | touch $(TOPSRCDIR)/security/manager/.nss.checkout; \ |
---|
687 | fi |
---|
688 | # @: Check the log for conflicts. ; |
---|
689 | @conflicts=`egrep "^C " $(CVSCO_LOGFILE)` ;\ |
---|
690 | if test "$$conflicts" ; then \ |
---|
691 | echo "$(MAKE): *** Conflicts during fast-update." ;\ |
---|
692 | echo "$$conflicts" ;\ |
---|
693 | echo "$(MAKE): Refer to $(CVSCO_LOGFILE) for full log." ;\ |
---|
694 | false; \ |
---|
695 | else true; \ |
---|
696 | fi |
---|
697 | ifdef RUN_AUTOCONF_LOCALLY |
---|
698 | @echo Generating configures using $(AUTOCONF) ; \ |
---|
699 | cd $(TOPSRCDIR) && $(AUTOCONF) && \ |
---|
700 | cd $(TOPSRCDIR)/nsprpub && $(AUTOCONF) && \ |
---|
701 | cd $(TOPSRCDIR)/directory/c-sdk && $(AUTOCONF) |
---|
702 | endif |
---|
703 | |
---|
704 | #################################### |
---|
705 | # Web configure |
---|
706 | |
---|
707 | WEBCONFIG_FILE := $(HOME)/.mozconfig |
---|
708 | |
---|
709 | MOZCONFIG2CONFIGURATOR := build/autoconf/mozconfig2configurator |
---|
710 | webconfig: |
---|
711 | @cd $(TOPSRCDIR); \ |
---|
712 | url=`$(MOZCONFIG2CONFIGURATOR) $(TOPSRCDIR)`; \ |
---|
713 | echo Running mozilla with the following url: ;\ |
---|
714 | echo ;\ |
---|
715 | echo $$url ;\ |
---|
716 | mozilla -remote "openURL($$url)" || \ |
---|
717 | netscape -remote "openURL($$url)" || \ |
---|
718 | mozilla $$url || \ |
---|
719 | netscape $$url ;\ |
---|
720 | echo ;\ |
---|
721 | echo 1. Fill out the form on the browser. ;\ |
---|
722 | echo 2. Save the results to $(WEBCONFIG_FILE) |
---|
723 | |
---|
724 | ##################################################### |
---|
725 | # First Checkout |
---|
726 | |
---|
727 | ifdef _IS_FIRST_CHECKOUT |
---|
728 | # First time, do build target in a new process to pick up new files. |
---|
729 | build:: |
---|
730 | $(MAKE) -f $(TOPSRCDIR)/client.mk build |
---|
731 | else |
---|
732 | |
---|
733 | ##################################################### |
---|
734 | # After First Checkout |
---|
735 | |
---|
736 | |
---|
737 | #################################### |
---|
738 | # Configure |
---|
739 | |
---|
740 | CONFIG_STATUS := $(wildcard $(OBJDIR)/config.status) |
---|
741 | CONFIG_CACHE := $(wildcard $(OBJDIR)/config.cache) |
---|
742 | |
---|
743 | ifdef RUN_AUTOCONF_LOCALLY |
---|
744 | EXTRA_CONFIG_DEPS := \ |
---|
745 | $(TOPSRCDIR)/aclocal.m4 \ |
---|
746 | $(wildcard $(TOPSRCDIR)/build/autoconf/*.m4) \ |
---|
747 | $(NULL) |
---|
748 | |
---|
749 | $(TOPSRCDIR)/configure: $(TOPSRCDIR)/configure.in $(EXTRA_CONFIG_DEPS) |
---|
750 | @echo Generating $@ using autoconf |
---|
751 | cd $(TOPSRCDIR); $(AUTOCONF) |
---|
752 | endif |
---|
753 | |
---|
754 | CONFIG_STATUS_DEPS_L10N := $(wildcard $(TOPSRCDIR)/l10n/makefiles.all) |
---|
755 | |
---|
756 | CONFIG_STATUS_DEPS := \ |
---|
757 | $(TOPSRCDIR)/configure \ |
---|
758 | $(TOPSRCDIR)/allmakefiles.sh \ |
---|
759 | $(TOPSRCDIR)/.mozconfig.mk \ |
---|
760 | $(wildcard $(TOPSRCDIR)/nsprpub/configure) \ |
---|
761 | $(wildcard $(TOPSRCDIR)/directory/c-sdk/configure) \ |
---|
762 | $(wildcard $(TOPSRCDIR)/mailnews/makefiles) \ |
---|
763 | $(CONFIG_STATUS_DEPS_L10N) \ |
---|
764 | $(wildcard $(TOPSRCDIR)/themes/makefiles) \ |
---|
765 | $(wildcard $(TOPSRCDIR)/config/milestone.txt) \ |
---|
766 | $(wildcard $(TOPSRCDIR)/config/chrome-versions.sh) \ |
---|
767 | $(NULL) |
---|
768 | |
---|
769 | # configure uses the program name to determine @srcdir@. Calling it without |
---|
770 | # $(TOPSRCDIR) will set @srcdir@ to "."; otherwise, it is set to the full |
---|
771 | # path of $(TOPSRCDIR). |
---|
772 | ifeq ($(TOPSRCDIR),$(OBJDIR)) |
---|
773 | CONFIGURE := ./configure |
---|
774 | else |
---|
775 | CONFIGURE := $(TOPSRCDIR)/configure |
---|
776 | endif |
---|
777 | |
---|
778 | ifdef MOZ_TOOLS |
---|
779 | CONFIGURE := $(TOPSRCDIR)/configure |
---|
780 | endif |
---|
781 | |
---|
782 | $(OBJDIR)/Makefile $(OBJDIR)/config.status: $(CONFIG_STATUS_DEPS) |
---|
783 | @if test ! -d $(OBJDIR); then $(MKDIR) $(OBJDIR); else true; fi |
---|
784 | @echo cd $(OBJDIR); |
---|
785 | @echo $(CONFIGURE) $(CONFIGURE_ARGS) |
---|
786 | @cd $(OBJDIR) && $(CONFIGURE_ENV_ARGS) $(CONFIGURE) $(CONFIGURE_ARGS) \ |
---|
787 | || ( echo "*** Fix above errors and then restart with\ |
---|
788 | \"$(MAKE) -f client.mk build\"" && exit 1 ) |
---|
789 | @touch $(OBJDIR)/Makefile |
---|
790 | |
---|
791 | ifdef CONFIG_STATUS |
---|
792 | $(OBJDIR)/config/autoconf.mk: $(TOPSRCDIR)/config/autoconf.mk.in |
---|
793 | cd $(OBJDIR); \ |
---|
794 | CONFIG_FILES=config/autoconf.mk ./config.status |
---|
795 | endif |
---|
796 | |
---|
797 | |
---|
798 | #################################### |
---|
799 | # Depend |
---|
800 | |
---|
801 | depend:: $(OBJDIR)/Makefile $(OBJDIR)/config.status |
---|
802 | $(MOZ_MAKE) export && $(MOZ_MAKE) depend |
---|
803 | |
---|
804 | #################################### |
---|
805 | # Build it |
---|
806 | |
---|
807 | configure:: $(OBJDIR)/Makefile $(OBJDIR)/config.status |
---|
808 | |
---|
809 | #################################### |
---|
810 | # Build it |
---|
811 | |
---|
812 | build:: $(OBJDIR)/Makefile $(OBJDIR)/config.status |
---|
813 | $(MOZ_MAKE) |
---|
814 | |
---|
815 | #################################### |
---|
816 | # Profile-feedback build (gcc only) |
---|
817 | # To use this, you should set the following variables in your mozconfig |
---|
818 | # mk_add_options PROFILE_GEN_SCRIPT=/path/to/profile-script |
---|
819 | # |
---|
820 | # The profile script should exercise the functionality to be included |
---|
821 | # in the profile feedback. |
---|
822 | |
---|
823 | profiledbuild:: $(OBJDIR)/Makefile $(OBJDIR)/config.status |
---|
824 | $(MOZ_MAKE) MOZ_PROFILE_GENERATE=1 |
---|
825 | OBJDIR=${OBJDIR} $(PROFILE_GEN_SCRIPT) |
---|
826 | $(MOZ_MAKE) clobber_all |
---|
827 | $(MOZ_MAKE) MOZ_PROFILE_USE=1 |
---|
828 | find $(OBJDIR) -name "*.da" -exec rm {} \; |
---|
829 | |
---|
830 | #################################### |
---|
831 | # Other targets |
---|
832 | |
---|
833 | # Pass these target onto the real build system |
---|
834 | install export libs clean realclean distclean alldep:: $(OBJDIR)/Makefile $(OBJDIR)/config.status |
---|
835 | $(MOZ_MAKE) $@ |
---|
836 | |
---|
837 | cleansrcdir: |
---|
838 | @cd $(TOPSRCDIR); \ |
---|
839 | if [ -f webshell/embed/gtk/Makefile ]; then \ |
---|
840 | $(MAKE) -C webshell/embed/gtk distclean; \ |
---|
841 | fi; \ |
---|
842 | if [ -f Makefile ]; then \ |
---|
843 | $(MAKE) distclean ; \ |
---|
844 | else \ |
---|
845 | echo "Removing object files from srcdir..."; \ |
---|
846 | rm -fr `find . -type d \( -name .deps -print -o -name CVS \ |
---|
847 | -o -exec test ! -d {}/CVS \; \) -prune \ |
---|
848 | -o \( -name '*.[ao]' -o -name '*.so' \) -type f -print`; \ |
---|
849 | build/autoconf/clean-config.sh; \ |
---|
850 | fi; |
---|
851 | |
---|
852 | # (! IS_FIRST_CHECKOUT) |
---|
853 | endif |
---|
854 | |
---|
855 | echo_objdir: |
---|
856 | @echo $(OBJDIR) |
---|
857 | |
---|
858 | .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 |
---|