DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Untracked file

Line Code
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 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514
#
# 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

ifeq ($(BUILD_MODULES),all)
#
# And now for something completely different...
# Divide the default build into tiers. 
# Tiers must be defined on module boundaries 
#
default: $(SUBMAKEFILES)
	$(RM) -rf $(DIST)/sdk
	$(MAKE) -C config export
	$(MAKE) nspr
	$(MAKE) ldap
	$(MAKE) tier_0
	$(MAKE) tier_1
	$(MAKE) tier_2
	$(MAKE) tier_9
ifdef MOZ_PSM
	$(MAKE) tier_40
endif
	$(MAKE) tier_50
ifdef MOZ_JSDEBUGGER
	$(MAKE) tier_93
endif
ifdef MOZ_EXTENSIONS
	$(MAKE) tier_94
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 = \
	$(tier_0_dirs) \
	$(tier_1_dirs) \
	$(tier_2_dirs) \
	$(tier_9_dirs) \
	$(tier_40_dirs) \
	$(tier_50_dirs) \
	$(NULL)

ifdef GC_LEAK_DETECTOR
DIRS += gc/boehm
endif

ifdef MOZ_JSDEBUGGER
DIRS += $(tier_93_dirs)
endif
ifdef MOZ_EXTENSIONS
DIRS += $(tier_94_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 \
	$(NULL)

#
# tier 1 -  3rd party individual libraries
#
tier_1_dirs	+= dbm

ifndef MOZ_NATIVE_JPEG
tier_1_dirs	+= jpeg
endif

ifndef MOZ_NATIVE_ZLIB
tier_1_dirs	+= modules/zlib
endif

# Installer needs standalone libjar, hence standalone zlib
ifdef MOZ_INSTALLER
tier_1_dirs	+= modules/zlib/standalone
endif

ifdef MOZ_INTERNAL_LIBART_LGPL
tier_1_dirs	+= other-licenses/libart_lgpl
endif

#
# tier 2 - base libraries
# 
tier_2_dirs	= \
		js \
		xpcom \
		modules/libreg \
		xpcom/obsolete \
		$(NULL)

ifdef NS_TRACE_MALLOC
tier_2_dirs	+= tools/trace-malloc/lib tools/trace-malloc
endif

#
# tier 9 - core components (necko,gecko)
#

tier_9_dirs += \
		js/src/xpconnect \
		intl \
		modules/libjar \
		$(NULL)

ifdef MOZ_OJI
tier_9_dirs	+= \
		js/src/liveconnect \
		modules/oji \
		$(NULL)
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_ENABLE_GTK2
tier_9_dirs     += widget/src/gtkxtbin
endif

ifdef MOZ_IPCD
tier_9_dirs += ipc/ipcd
endif

tier_9_dirs	+= \
		modules/libutil \
		netwerk \
		uriloader \
		modules/libpref \
		modules/libimg \
		caps \
		rdf \
		expat \
		htmlparser \
		gfx \
		modules/libpr0n \
		sun-java \
		modules/plugin \
		dom \
		view \
		widget \
		content \
		layout \
		db \
		xpfe/components/shistory \
		docshell \
		webshell \
		profile \
		embedding \
		editor \
		$(NULL)

ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
tier_9_dirs	+= xpfe/bootstrap/appleevents
endif

ifdef MOZ_THUNDERBIRD
ifdef MOZ_USE_OFFICIAL_BRANDING
tier_9_dirs  += other-licenses/branding/thunderbird
endif
endif

ifdef MOZ_PHOENIX
ifdef MOZ_USE_OFFICIAL_BRANDING
tier_9_dirs  += other-licenses/branding/firefox
endif
endif

tier_9_dirs	+= \
		xpfe/appshell \
		xpfe/browser/public \
		xpfe/components/sidebar/public \
		xpfe/components/xremote/public \
		$(NULL)

ifdef MOZ_XUL
ifdef MOZ_XUL_APP
tier_9_dirs	+= chrome
else
tier_9_dirs	+= rdf/chrome
endif
endif

ifdef ACCESSIBILITY
tier_9_dirs    += accessible
endif

ifdef MOZ_LDAP_XPCOM
tier_9_dirs	+= directory/xpcom
endif

ifndef MOZ_XUL
tier_9_dirs    += embedding/minimo/chromelite
endif

ifdef MOZ_ENABLE_GTK2
tier_9_dirs    += toolkit/components/gnome
endif

#
# tier 40 - security
#
ifdef MOZ_PSM
tier_40_dirs	+= security/manager
endif

# 
# tier 50 - xpfe & toolkit
#

# This must preceed xpfe
ifdef MOZ_JPROF
tier_50_dirs        += tools/jprof
endif

ifdef MOZ_XUL_APP
tier_50_dirs += toolkit/components/history/public
else
tier_50_dirs += xpfe/components/history/public
endif

tier_50_dirs	+= xpfe themes

ifdef MOZ_LEAKY
tier_50_dirs        += tools/leaky
endif

ifdef MOZ_MAPINFO
tier_50_dirs	+= tools/codesighs
endif

ifneq (,$(MOZ_L10N_LANG)$(MOZ_L10N_TOOLS))
tier_50_dirs	+= l10n
endif

ifdef MOZ_XUL_APP
tier_50_dirs	+= toolkit
endif

ifdef MOZ_PHOENIX
#xpfe/components/search depends on nsIBookmarksService.idl
#XXXBlake this shell path is a temp hack; toolkit shouldn't depend on browser
tier_50_dirs    += browser/components/bookmarks/public browser/components/shell/public
endif

# toolkit/xre/ depends on xpinstall, so it must be in tier 50
ifdef MOZ_XPINSTALL
tier_50_dirs     +=  xpinstall
endif

#
# tier 9x - application features
#

ifdef MOZ_JSDEBUGGER
tier_93_dirs	+= js/jsd
endif

ifdef MOZ_EXTENSIONS
tier_94_dirs	+= extensions
endif

ifdef MOZ_MAIL_NEWS
tier_97_dirs	+= mailnews
endif

ifdef MOZ_CALENDAR
tier_98_dirs	+= other-licenses/libical calendar
endif

#
# tier 99 - application binaries
#

ifdef MOZ_COMPONENTLIB
tier_99_dirs   += embedding/componentlib
else
ifneq (,$(MOZ_STATIC_COMPONENTS)$(MOZ_META_COMPONENTS))
tier_99_dirs   += modules/staticmod
endif
endif # MOZ_COMPONENTLIB

ifdef MOZ_PHOENIX
tier_99_dirs	+= browser xpfe/bootstrap/init.d
ifdef MOZ_USE_OFFICIAL_BRANDING
tier_99_dirs += other-licenses/branding/firefox/content
endif
endif

ifdef MOZ_THUNDERBIRD
tier_99_dirs	+= mail xpfe/bootstrap/init.d
ifdef MOZ_USE_OFFICIAL_BRANDING
tier_99_dirs += other-licenses/branding/thunderbird/content
endif
endif

ifdef MOZ_STANDALONE_COMPOSER
tier_99_dirs	+= composer
endif

ifdef MOZ_XUL_APP
ifdef MOZ_INSTALLER
tier_99_dirs     +=  toolkit/mozapps/installer
endif
else
ifneq (,$(MOZ_XPFE_COMPONENTS)$(MOZ_XUL))
tier_99_dirs	+= xpfe/bootstrap
endif
endif

ifneq (,$(MOZ_ENABLE_GTK)$(MOZ_ENABLE_GTK2))
tier_99_dirs	+= embedding/browser/gtk
endif

# viewer
ifneq (,$(ENABLE_TESTS))
tier_99_dirs += webshell/tests
endif

# winembed, mfcembed
ifeq ($(OS_ARCH),WINNT)
ifneq (,$(ENABLE_TESTS)$(MOZILLA_OFFICIAL))
tier_99_dirs += embedding/tests
endif
endif

# os2embed
ifeq ($(OS_ARCH),OS2)
ifneq (,$(ENABLE_TESTS)$(MOZILLA_OFFICIAL))
tier_99_dirs += embedding/tests
endif
endif

else

# Standalone build

DIRS		= $(BUILD_MODULE_DIRS)

# Hack to generate xpidl Makefile
ifneq ($(BUILD_MODULES),all)
ifneq (,$(findstring xpcom, $(BUILD_MODULE_DIRS)))
DIRS		:= xpcom/typelib $(DIRS)
SUBMAKEFILES	:= xpcom/typelib/Makefile
endif
endif

default: $(SUBMAKEFILES)
	$(MAKE) export
	$(MAKE) libs

endif # BUILD_MODULES == all

STATIC_MAKEFILES := nsprpub directory/c-sdk security/nss

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 mozilla-config.h \
   $(topsrcdir)/.mozconfig.mk $(topsrcdir)/.mozconfig.out 

# Build pseudo-external modules first when export is explicitly called
export::
	$(RM) -rf $(DIST)/sdk
	$(MAKE) -C config export
	$(MAKE) nspr
	$(MAKE) ldap
ifneq ($(BUILD_MODULES),all)
ifneq (,$(findstring xpcom, $(BUILD_MODULE_DIRS)))
	$(MAKE) -C xpcom/typelib
	$(MAKE) export-idl
endif
endif

install::
ifndef MOZ_NATIVE_NSPR
	$(MAKE) -C nsprpub real_install DESTDIR=$(DESTDIR) libdir=$(mozappdir) includedir=$(includedir)/nspr
	$(RM) -f $(addprefix $(DESTDIR)$(mozappdir)/$(LIB_PREFIX), $(addsuffix .$(LIB_SUFFIX), nspr4 plds4 plc4))
	$(RM) -f $(addprefix $(DESTDIR)$(bindir)/,nspr-config compile-et.pl prerr.properties)
endif
ifdef MOZ_LDAP_XPCOM
	$(MAKE) -C directory/c-sdk real_install DESTDIR=$(DESTDIR) libdir=$(mozappdir) includedir=$(includedir)/ldap
endif

include $(topsrcdir)/config/rules.mk

# Clean up after pseudo-external modules
clean clobber realclean clobber_all distclean::
ifndef MOZ_NATIVE_NSPR
	$(MAKE) -C nsprpub $@
endif
ifdef MOZ_LDAP_XPCOM
	$(MAKE) -C directory/c-sdk $@
endif

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
ifndef MOZ_NATIVE_NSPR
	$(MAKE) -C nsprpub
endif

ldap:
ifdef MOZ_LDAP_XPCOM
	$(MAKE) -C directory/c-sdk
endif

export::
	@$(PERL) $(MOZILLA_DIR)/config/purge-old-headers.pl $(DIST)/include

distclean::
	cat unallmakefiles | $(XARGS) rm -f
	rm -f unallmakefiles $(DIST_GARBAGE)

ifeq ($(OS_ARCH),WINNT)
rebase:
ifdef MOZILLA_OFFICIAL
	echo rebasing $(DIST)
	/bin/find $(DIST) -name "*.dll" > rebase.lst
	rebase -b 60000000 -R . -G rebase.lst
	rm rebase.lst
endif

splitsymbols:
ifdef MOZILLA_OFFICIAL
ifdef MOZ_DEBUG_SYMBOLS
	echo finding pdb files
	mkdir -p $(DIST)/$(BUILDID)
	-cp `/bin/find . -path "./dist" -prune -o -name "*.dll" | sed "s/\.dll$$/\.pdb/" | xargs` $(DIST)/$(BUILDID)
	-cp `/bin/find . -path "./dist" -prune -o -name "*.exe" | sed "s/\.exe$$/\.pdb/" | xargs` $(DIST)/$(BUILDID)
	-cp `/bin/find . -path "./dist" -prune -o -name "*.EXE" | sed "s/\.EXE$$/\.pdb/" | xargs` $(DIST)/$(BUILDID)
endif # MOZ_DEBUG_SYMBOLS
ifdef MOZ_PROFILE
	echo splitting symbols out of binaries
	/bin/find $(DIST) -name "*.dll" -exec splitsym {} \;
	/bin/find $(DIST) -name "*.exe" -exec splitsym {} \;
	/bin/find $(DIST) -name "*.EXE" -exec splitsym {} \;
	mkdir -p $(DIST)/$(BUILDID)
	/bin/find $(DIST) -name "*.dbg" -exec mv {} $(DIST)/$(BUILDID) \;
endif # MOZ_PROFILE
endif # MOZILLA_OFFICIAL

signnss:
ifdef MOZILLA_OFFICIAL
	echo signing NSS libs
	cd $(DIST)/bin; ./shlibsign.exe -v -i softokn3.dll
endif # MOZILLA_OFFICIAL

BUILDID = $(shell cat $(DEPTH)/config/build_number)
deliver: splitsymbols rebase signnss

endif # WINNT