forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile.in
314 lines (259 loc) · 5.64 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = .
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/build/unix/modules.mk
ifneq ($(BUILD_MODULES),all)
DIRS = $(BUILD_MODULE_DIRS)
EXPORT_DIRS = $(BUILD_MODULE_DEP_DIRS)
else
#
# And now for something completely different...
# Divide the default build into tiers.
# Tiers must be defined on module boundaries
#
default: $(SUBMAKEFILES)
$(MAKE) nspr
$(MAKE) tier_0
ifdef MOZ_LDAP_XPCOM
$(MAKE) -C directory/c-sdk/ldap export
$(MAKE) -C directory/c-sdk/ldap install
endif
$(MAKE) tier_1
$(MAKE) tier_9
ifdef MOZ_PSM
$(MAKE) tier_95
endif
ifdef MOZ_MAIL_NEWS
$(MAKE) tier_97
endif
ifdef MOZ_CALENDAR
$(MAKE) tier_98
endif
$(MAKE) tier_99
# Make sure that the existing rulesets work
DIRS = $(NSPRPUB_DIR) \
$(tier_0_dirs) \
$(tier_1_dirs) \
$(tier_9_dirs) \
$(NULL)
ifdef MOZ_LDAP_XPCOM
DIRS += directory/c-sdk/ldap
endif
ifdef MOZ_PSM
DIRS += $(tier_95_dirs)
endif
ifdef MOZ_MAIL_NEWS
DIRS += $(tier_97_dirs)
endif
ifdef MOZ_CALENDAR
DIRS += $(tier_98_dirs)
endif
DIRS += $(tier_99_dirs)
#
# tier 0 - base build config dirs
#
tier_0_dirs = \
config \
build \
include \
$(NULL)
#
# tier 1 - base libraries
#
tier_1_dirs = js
# MacOSX needs to build lib for MoreFiles before xpcom
ifeq ($(MOZ_WIDGET_TOOLKIT),mac)
tier_1_dirs += lib/mac/MoreFiles
endif
#
# tier 9 - core components (xpcom,necko,gecko)
#
# intl should not be in here - it's just temporary until
# xpconnect's dependency on intl is repaired - see bug 106130
tier_9_dirs += \
modules/libreg \
string \
xpcom \
intl \
$(NULL)
ifndef MOZ_NATIVE_ZLIB
tier_9_dirs += modules/zlib
endif
# Linux and Solaris installer needs standalone libjar, hence standalone zlib
ifneq (,$(filter Linux SunOS,$(OS_ARCH)))
tier_9_dirs += modules/zlib/standalone
endif
tier_9_dirs += \
modules/libjar \
$(NULL)
ifdef MOZ_JAVA_SUPPLEMENT
tier_9_dirs += \
java/util \
java/webclient \
$(NULL)
endif
ifndef MOZ_NATIVE_JPEG
tier_9_dirs += jpeg
endif
tier_9_dirs += dbm js/src/xpconnect
ifdef MOZ_OJI
tier_9_dirs += js/src/liveconnect
endif
ifdef MOZ_JSDEBUGGER
tier_9_dirs += js/jsd
endif
ifdef MOZ_ENABLE_XLIB
tier_9_dirs += gfx/src/xlibrgb widget/src/xlibxtbin
endif
ifdef MOZ_ENABLE_GTK
tier_9_dirs += widget/src/gtksuperwin widget/src/gtkxtbin
endif
ifdef MOZ_INTERNAL_LIBART_LGPL
tier_9_dirs += other-licenses/libart_lgpl
endif
tier_9_dirs += \
widget/timer \
modules/libutil \
netwerk \
modules/mpfilelocprovider \
uriloader \
modules/libpref \
modules/libimg \
modules/oji \
caps \
rdf \
expat \
htmlparser \
gfx \
gfx2 \
modules/libpr0n \
modules/plugin \
dom \
view \
widget \
content \
layout \
db \
docshell \
webshell \
embedding \
editor \
sun-java \
profile \
themes \
$(NULL)
ifdef ACCESSIBILITY
tier_9_dirs += accessible
endif
ifdef MOZ_LDAP_XPCOM
tier_9_dirs += directory/xpcom
endif
# This must preceed xpfe
ifdef MOZ_JPROF
tier_9_dirs += tools/jprof
endif
tier_9_dirs += xpfe xpinstall
ifdef MOZ_EXTENSIONS
tier_9_dirs += extensions
endif
ifdef MOZ_LEAKY
tier_9_dirs += tools/leaky
endif
ifdef ENABLE_TESTS
tier_9_dirs += xpcom/tests
endif
ifdef NS_TRACE_MALLOC
tier_9_dirs += tools/trace-malloc
endif
tier_9_dirs += l10n
#
# tier 9x - application features
#
ifdef MOZ_PSM
tier_95_dirs += security/manager
endif
ifdef MOZ_MAIL_NEWS
tier_97_dirs += mailnews
endif
ifdef MOZ_CALENDAR
tier_98_dirs += calendar
endif
#
# tier 99 - application binaries
#
ifneq (,$(MOZ_STATIC_COMPONENTS)$(MOZ_META_COMPONENTS))
tier_99_dirs += modules/staticmod
endif
tier_99_dirs += xpfe/bootstrap
endif # BUILD_MODULES == all
STATIC_MAKEFILES := $(NSPRPUB_DIR) directory/c-sdk/ldap
ifdef MOZ_PSM
STATIC_MAKEFILES += security/nss
endif
GARBAGE_DIRS += dist
DIST_GARBAGE = config.cache config.log config.status config-defs.h \
dependencies.beos config/autoconf.mk config/myrules.mk config/myconfig.mk \
unallmakefiles \
$(topsrcdir)/.mozconfig.mk $(topsrcdir)/.mozconfig.out
include $(topsrcdir)/config/rules.mk
tier_%:
@echo "$@: $($@_dirs)"
@$(EXIT_ON_ERROR) \
for d in $($@_dirs); do $(UPDATE_TITLE) \
$(MAKE) -C $$d export; \
done ; \
$(PERL) $(MOZILLA_DIR)/config/purge-old-headers.pl $(DIST)/include ;\
for d in $($@_dirs); do $(UPDATE_TITLE) \
$(MAKE) -C $$d libs; \
done
#
# Individual modules
#
boehm:
ifdef GC_LEAK_DETECTOR
$(MAKE) -C gc/boehm
endif
nspr: boehm
ifdef NSPRPUB_DIR
$(MAKE) -C $(NSPRPUB_DIR)
endif
# Ugly OS/2 gmake hack - create myconfig.mk and myrules.mk if they aren't there
ifeq ($(OS_ARCH),OS2)
export::
if test ! -f config/myrules.mk; then
touch config/myrules.mk
fi
if test ! -f config/myconfig.mk; then
touch config/myconfig.mk
fi
endif
# For modules.mk standalone build
export::
+$(LOOP_OVER_EXPORT_DIRS)
export::
@$(PERL) $(MOZILLA_DIR)/config/purge-old-headers.pl $(DIST)/include
distclean::
cat unallmakefiles | $(XARGS) rm -f
rm -f unallmakefiles $(DIST_GARBAGE)