1 # vim:set ts=8 sw=8 sts=8 noet:
3 # ***** BEGIN LICENSE BLOCK *****
4 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 # The contents of this file are subject to the Mozilla Public License Version
7 # 1.1 (the "License"); you may not use this file except in compliance with
8 # the License. You may obtain a copy of the License at
9 # http://www.mozilla.org/MPL/
11 # Software distributed under the License is distributed on an "AS IS" basis,
12 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 # for the specific language governing rights and limitations under the
16 # The Original Code is mozilla.org code.
18 # The Initial Developer of the Original Code is
19 # Netscape Communications Corporation.
20 # Portions created by the Initial Developer are Copyright (C) 1998
21 # the Initial Developer. All Rights Reserved.
24 # Chase Phillips <chase@mozilla.org>
25 # Benjamin Smedberg <benjamin@smedbergs.us>
26 # Jeff Walden <jwalden+code@mit.edu>
28 # Alternatively, the contents of this file may be used under the terms of
29 # either of the GNU General Public License Version 2 or later (the "GPL"),
30 # or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
31 # in which case the provisions of the GPL or the LGPL are applicable instead
32 # of those above. If you wish to allow use of your version of this file only
33 # under the terms of either the GPL or the LGPL, and not to allow others to
34 # use your version of this file under the terms of the MPL, indicate your
35 # decision by deleting the provisions above and replace them with the notice
36 # and other provisions required by the GPL or the LGPL. If you do not delete
37 # the provisions above, a recipient may use your version of this file under
38 # the terms of any one of the MPL, the GPL or the LGPL.
40 # ***** END LICENSE BLOCK *****
46 MOZILLA_DIR
= $(topsrcdir
)
49 ifndef INCLUDED_CONFIG_MK
50 include $(topsrcdir
)/config
/config.mk
53 ifndef INCLUDED_VERSION_MK
54 include $(topsrcdir
)/config
/version.mk
57 REPORT_BUILD
= @echo
$(notdir $<)
65 # Don't copy xulrunner files at install time, when using system xulrunner
70 # ELOG prints out failed command when building silently (gmake -s).
71 ifneq (,$(findstring -s
,$(MAKEFLAGS
)))
72 ELOG
:= $(EXEC
) sh
$(BUILD_TOOLS
)/print-failed-commands.sh
77 ifeq (,$(filter-out WINNT WINCE
,$(OS_ARCH
)))
79 _LIBNAME_RELATIVE_PATHS
=1
83 ifeq (,$(filter-out WINNT WINCE
,$(OS_ARCH
)))
85 _VPATH_SRCS
= $(if
$(filter /%,$<),$<,$(PWD
)/$<)
90 # Add $(DIST)/lib to VPATH so that -lfoo dependencies are followed
93 VPATH
+= $(LIBXUL_SDK
)/lib
96 # EXPAND_LIBNAME - $(call EXPAND_LIBNAME,foo)
97 # expands to foo.lib on platforms with import libs and -lfoo otherwise
99 # EXPAND_LIBNAME_PATH - $(call EXPAND_LIBNAME_PATH,foo,dir)
100 # expands to dir/foo.lib on platforms with import libs and
101 # -Ldir -lfoo otherwise
103 # EXPAND_MOZLIBNAME - $(call EXPAND_MOZLIBNAME,foo)
104 # expands to $(DIST)/lib/foo.lib on platforms with import libs and
107 ifdef _LIBNAME_RELATIVE_PATHS
108 EXPAND_LIBNAME
= $(foreach lib
,$(1),$(LIB_PREFIX
)$(lib
).
$(LIB_SUFFIX
))
109 EXPAND_LIBNAME_PATH
= $(foreach lib
,$(1),$(2)/$(LIB_PREFIX
)$(lib
).
$(LIB_SUFFIX
))
110 EXPAND_MOZLIBNAME
= $(foreach lib
,$(1),$(DIST
)/lib
/$(LIB_PREFIX
)$(lib
).
$(LIB_SUFFIX
))
112 EXPAND_LIBNAME
= $(addprefix -l
,$(1))
113 EXPAND_LIBNAME_PATH
= -L
$(2) $(addprefix -l
,$(1))
114 EXPAND_MOZLIBNAME
= $(addprefix -l
,$(1))
118 EXTRA_DSO_LIBS
:= $(call EXPAND_MOZLIBNAME
,$(EXTRA_DSO_LIBS
))
121 ################################################################################
122 # Testing frameworks support
123 ################################################################################
129 $(error Must
define MODULE when defining XPCSHELL_TESTS.
)
132 # Test file installation
135 for testdir in
$(XPCSHELL_TESTS
); do \
137 $(srcdir)/$$testdir/*.js \
138 $(DEPTH
)/_tests
/xpcshell-simple
/$(MODULE
)/$$testdir; \
141 # Path formats on Windows are hard. We require a topsrcdir formatted so that
142 # it may be passed to nsILocalFile.initWithPath (in other words, an absolute
143 # path of the form X:\path\to\topsrcdir), which we store in NATIVE_TOPSRCDIR.
144 # We require a forward-slashed path to topsrcdir so that it may be combined
145 # with a relative forward-slashed path for loading scripts, both dynamically
146 # and statically for head/test/tail JS files. Of course, on non-Windows none
147 # of this matters, and things will work correctly because everything's
148 # forward-slashed, everywhere, always.
150 NATIVE_TOPSRCDIR
:= `cygpath -wa $(topsrcdir)`
151 FWDSLASH_TOPSRCDIR
:= `cygpath -ma $(topsrcdir)`
153 FWDSLASH_TOPSRCDIR
:= $(topsrcdir
)
154 ifeq ($(HOST_OS_ARCH
),WINNT
)
155 NATIVE_TOPSRCDIR
:= $(subst /,\\,$(WIN_TOP_SRC
))
157 NATIVE_TOPSRCDIR
:= $(topsrcdir
)
159 endif # CYGWIN_WRAPPER
161 testxpcdir
= $(topsrcdir
)/testing
/xpcshell
166 for testdir in
$(XPCSHELL_TESTS
); do \
167 $(RUN_TEST_PROGRAM
) \
168 $(testxpcdir
)/test_all.sh \
169 $(DIST
)/bin
/xpcshell \
170 $(FWDSLASH_TOPSRCDIR
) \
171 $(NATIVE_TOPSRCDIR
) \
172 $(DEPTH
)/_tests
/xpcshell-simple
/$(MODULE
)/$$testdir; \
178 $(RUN_TEST_PROGRAM
) \
179 $(testxpcdir
)/test_one.sh \
180 $(DIST
)/bin
/xpcshell \
181 $(FWDSLASH_TOPSRCDIR
) \
182 $(NATIVE_TOPSRCDIR
) \
183 $(DEPTH
)/_tests
/xpcshell-simple
/$(MODULE
)/$$testdir \
189 $(RUN_TEST_PROGRAM
) \
190 $(testxpcdir
)/test_one.sh \
191 $(DIST
)/bin
/xpcshell \
192 $(FWDSLASH_TOPSRCDIR
) \
193 $(NATIVE_TOPSRCDIR
) \
194 $(DEPTH
)/_tests
/xpcshell-simple
/$(MODULE
)/$$testdir \
197 endif # XPCSHELL_TESTS
201 # Compile the tests to $(DIST)/bin. Make lots of niceties available by default
202 # through TestHarness.h, by modifying the list of includes and the libs against
204 CPPSRCS
+= $(CPP_UNIT_TESTS
)
205 SIMPLE_PROGRAMS
+= $(CPP_UNIT_TESTS
:.
cpp=$(BIN_SUFFIX
))
206 REQUIRES
+= testing xpcom
207 LIBS
+= $(XPCOM_GLUE_LDOPTS
) $(NSPR_LIBS
)
209 # ...and run them the usual way
212 for f in
$(subst .
cpp,,$(CPP_UNIT_TESTS
)); do \
213 XPCOM_DEBUG_BREAK
=stack-and-abort
$(RUN_TEST_PROGRAM
) $(DIST
)/bin
/$$f; \
216 endif # CPP_UNIT_TESTS
224 # If BUILD_STATIC_LIBS or FORCE_STATIC_LIB is set, build a static library.
225 # Otherwise, build a shared library.
229 ifdef STATIC_LIBRARY_NAME
230 ifneq (,$(filter OS2 WINNT WINCE
,$(OS_ARCH
)))
232 STATIC_LIBRARY_NAME
:= $(SHORT_LIBNAME
)
233 SHARED_LIBRARY_NAME
:= $(SHORT_LIBNAME
)
236 LIBRARY
:= $(LIB_PREFIX
)$(STATIC_LIBRARY_NAME
).
$(LIB_SUFFIX
)
237 endif # STATIC_LIBRARY_NAME
241 ifdef HOST_LIBRARY_NAME
242 HOST_LIBRARY
:= $(LIB_PREFIX
)$(HOST_LIBRARY_NAME
).
$(LIB_SUFFIX
)
247 ifneq (_1
,$(FORCE_SHARED_LIB
)_
$(BUILD_STATIC_LIBS
))
251 MKSHLIB
= $(MKCSHLIB
)
255 SHARED_LIBRARY
:= $(SHARED_LIBRARY_NAME
)
257 SHARED_LIBRARY
:= $(DLL_PREFIX
)$(SHARED_LIBRARY_NAME
)$(DLL_SUFFIX
)
260 ifeq ($(OS_ARCH
),OS2
)
261 DEF_FILE
:= $(SHARED_LIBRARY
:.dll
=.def
)
264 ifneq (,$(filter OS2 WINNT WINCE
,$(OS_ARCH
)))
265 IMPORT_LIBRARY
:= $(LIB_PREFIX
)$(SHARED_LIBRARY_NAME
).
$(IMPORT_LIB_SUFFIX
)
268 ifdef MOZ_ENABLE_LIBXUL
273 endif # FORCE_SHARED_LIB && !BUILD_STATIC_LIBS
276 ifeq (,$(BUILD_STATIC_LIBS
)$(FORCE_STATIC_LIB
))
280 ifeq (_1
,$(FORCE_SHARED_LIB
)_
$(BUILD_STATIC_LIBS
))
281 SHARED_LIBRARY
:= $(NULL
)
283 IMPORT_LIBRARY
:= $(NULL
)
286 ifdef FORCE_STATIC_LIB
287 ifndef FORCE_SHARED_LIB
288 SHARED_LIBRARY
:= $(NULL
)
290 IMPORT_LIBRARY
:= $(NULL
)
294 ifdef FORCE_SHARED_LIB
295 ifndef FORCE_STATIC_LIB
300 ifdef JAVA_LIBRARY_NAME
301 JAVA_LIBRARY
:= $(JAVA_LIBRARY_NAME
).jar
304 ifeq (,$(filter-out WINNT WINCE
,$(OS_ARCH
)))
308 # Unless we're building SIMPLE_PROGRAMS, all C++ files share a PDB file per
309 # directory. For parallel builds, this PDB file is shared and locked by
310 # MSPDBSRV.EXE, starting with MSVC8 SP1. If you're using MSVC 7.1 or MSVC8
311 # without SP1, don't do parallel builds.
313 # The final PDB for libraries and programs is created by the linker and uses
314 # a different name from the single PDB file created by the compiler. See
318 ifdef SIMPLE_PROGRAMS
319 COMPILE_PDBFILE
= $(basename $(@F
)).pdb
321 COMPILE_PDBFILE
= generated.pdb
324 LINK_PDBFILE
= $(basename $(@F
)).pdb
326 CODFILE
=$(basename $(@F
)).cod
330 ifdef SHARED_LIBRARY_NAME
331 MAPFILE
=$(SHARED_LIBRARY_NAME
).map
333 MAPFILE
=$(basename $(@F
)).map
334 endif # SHARED_LIBRARY_NAME
338 OS_LDFLAGS
+= -DEF
:$(DEFFILE
)
339 EXTRA_DEPS
+= $(DEFFILE
)
343 OS_LDFLAGS
+= -MAP
:$(MAPFILE
)
348 ifdef ENABLE_CXX_EXCEPTIONS
350 CXXFLAGS
+= -fexceptions
352 ifeq (,$(filter-out 1200 1300 1310,$(_MSC_VER
)))
358 endif # ENABLE_CXX_EXCEPTIONS
361 ifeq (,$(filter-out WINNT WINCE
,$(HOST_OS_ARCH
)))
362 HOST_PDBFILE
=$(basename $(@F
)).pdb
366 TARGETS
= $(LIBRARY
) $(SHARED_LIBRARY
) $(PROGRAM
) $(SIMPLE_PROGRAMS
) $(HOST_LIBRARY
) $(HOST_PROGRAM
) $(HOST_SIMPLE_PROGRAMS
) $(JAVA_LIBRARY
)
372 $(addsuffix .
$(OBJ_SUFFIX
), $(JMC_GEN
)) \
373 $(CSRCS
:.c
=.
$(OBJ_SUFFIX
)) \
374 $(patsubst %.
cc,%.
$(OBJ_SUFFIX
),$(CPPSRCS
:.
cpp=.
$(OBJ_SUFFIX
))) \
375 $(CMSRCS
:.m
=.
$(OBJ_SUFFIX
)) \
376 $(CMMSRCS
:.mm
=.
$(OBJ_SUFFIX
)) \
377 $(ASFILES
:.
$(ASM_SUFFIX
)=.
$(OBJ_SUFFIX
))
378 OBJS
= $(strip $(_OBJS
))
383 $(addprefix host_
,$(HOST_CSRCS
:.c
=.
$(OBJ_SUFFIX
))) \
384 $(addprefix host_
,$(patsubst %.
cc,%.
$(OBJ_SUFFIX
),$(HOST_CPPSRCS
:.
cpp=.
$(OBJ_SUFFIX
)))) \
385 $(addprefix host_
,$(HOST_CMSRCS
:.m
=.
$(OBJ_SUFFIX
))) \
386 $(addprefix host_
,$(HOST_CMMSRCS
:.mm
=.
$(OBJ_SUFFIX
)))
387 HOST_OBJS
= $(strip $(_HOST_OBJS
))
390 LIBOBJS
:= $(addprefix \", $(OBJS
))
391 LIBOBJS
:= $(addsuffix \", $(LIBOBJS
))
394 ifneq (,$(OBJS
)$(XPIDLSRCS
)$(SDK_XPIDLSRCS
)$(SIMPLE_PROGRAMS
))
395 MDDEPFILES
= $(addprefix $(MDDEPDIR
)/,$(OBJS
:.
$(OBJ_SUFFIX
)=.pp
))
397 MDDEPFILES
+= $(addprefix $(MDDEPDIR
)/,$(XPIDLSRCS
:.idl
=.xpt
)) \
398 $(addprefix $(MDDEPDIR
)/,$(SDK_XPIDLSRCS
:.idl
=.xpt
))
404 $(GARBAGE
) $(TARGETS
) $(OBJS
) $(PROGOBJS
) LOGS TAGS a.out \
405 $(filter-out $(ASFILES
),$(OBJS
:.
$(OBJ_SUFFIX
)=.s
)) $(OBJS
:.
$(OBJ_SUFFIX
)=.ii
) \
406 $(OBJS
:.
$(OBJ_SUFFIX
)=.i
) \
407 $(HOST_PROGOBJS
) $(HOST_OBJS
) $(IMPORT_LIBRARY
) $(DEF_FILE
)\
408 $(EXE_DEF_FILE
) so_locations _gen _stubs
$(wildcard *.res
) $(wildcard *.RES
) \
409 $(wildcard *.pdb
) $(CODFILE
) $(MAPFILE
) $(IMPORT_LIBRARY
) \
410 $(SHARED_LIBRARY
:$(DLL_SUFFIX
)=.exp
) $(wildcard *.ilk
) \
411 $(PROGRAM
:$(BIN_SUFFIX
)=.exp
) $(SIMPLE_PROGRAMS
:$(BIN_SUFFIX
)=.exp
) \
412 $(PROGRAM
:$(BIN_SUFFIX
)=.lib
) $(SIMPLE_PROGRAMS
:$(BIN_SUFFIX
)=.lib
) \
413 $(SIMPLE_PROGRAMS
:$(BIN_SUFFIX
)=.
$(OBJ_SUFFIX
)) \
414 $(wildcard gts_tmp_
*) $(LIBRARY
:%.a
=.
%.timestamp
)
416 $(GARBAGE_DIRS
) /no-such-file
419 GARBAGE
+= $(MOCSRCS
)
422 ifdef SIMPLE_PROGRAMS
423 GARBAGE
+= $(SIMPLE_PROGRAMS
:%=%.
$(OBJ_SUFFIX
))
426 ifdef HOST_SIMPLE_PROGRAMS
427 GARBAGE
+= $(HOST_SIMPLE_PROGRAMS
:%=%.
$(OBJ_SUFFIX
))
431 # the Solaris WorkShop template repository cache. it occasionally can get
432 # out of sync, so targets like clobber should kill it.
434 ifeq ($(OS_ARCH
),SunOS
)
436 GARBAGE_DIRS
+= SunWS_cache
440 ifeq ($(OS_ARCH
),OpenVMS
)
441 GARBAGE
+= $(wildcard *.
*_defines
)
443 VMS_SYMVEC_FILE
= $(SHARED_LIBRARY
:$(DLL_SUFFIX
)=_symvec.opt
)
445 VMS_SYMVEC_FILE_MODULE
= $(topsrcdir
)/build
/unix
/vms
/$(notdir $(SHARED_LIBRARY
:$(DLL_SUFFIX
)=_dbg_symvec.opt
))
447 VMS_SYMVEC_FILE_MODULE
= $(topsrcdir
)/build
/unix
/vms
/$(notdir $(SHARED_LIBRARY
:$(DLL_SUFFIX
)=_symvec.opt
))
449 VMS_SYMVEC_FILE_COMP
= $(topsrcdir
)/build
/unix
/vms
/component_symvec.opt
450 GARBAGE
+= $(VMS_SYMVEC_FILE
)
452 DSO_LDOPTS
:= $(filter-out -auto_symvec
,$(DSO_LDOPTS
)) $(VMS_SYMVEC_FILE
)
457 XPIDL_GEN_DIR
= _xpidlgen
459 ifdef MOZ_UPDATE_XTERM
460 # Its good not to have a newline at the end of the titlebar string because it
461 # makes the make -s output easier to read. Echo -n does not work on all
462 # platforms, but we can trick sed into doing it.
463 UPDATE_TITLE
= sed
-e
"s!Y!$@ in $(shell $(BUILD_TOOLS)/print-depth-path.sh)/$(dir)!" $(MOZILLA_DIR
)/config
/xterm.str
;
464 UPDATE_TITLE_export
= sed
-e
"s!Y!export in $(shell $(BUILD_TOOLS)/print-depth-path.sh)/$*!" $(MOZILLA_DIR
)/config
/xterm.str
;
465 UPDATE_TITLE_libs
= sed
-e
"s!Y!libs in $(shell $(BUILD_TOOLS)/print-depth-path.sh)/$*!" $(MOZILLA_DIR
)/config
/xterm.str
;
466 UPDATE_TITLE_tools
= sed
-e
"s!Y!tools in $(shell $(BUILD_TOOLS)/print-depth-path.sh)/$*!" $(MOZILLA_DIR
)/config
/xterm.str
;
469 ifneq (,$(strip $(DIRS
)))
472 $(foreach dir,$(DIRS
),$(UPDATE_TITLE
) $(MAKE
) -C
$(dir) $@
; )
475 # we only use this for the makefiles target and other stuff that doesn't matter
476 ifneq (,$(strip $(PARALLEL_DIRS
)))
477 LOOP_OVER_PARALLEL_DIRS
= \
479 $(foreach dir,$(PARALLEL_DIRS
),$(UPDATE_TITLE
) $(MAKE
) -C
$(dir) $@
; )
482 ifneq (,$(strip $(STATIC_DIRS
)))
483 LOOP_OVER_STATIC_DIRS
= \
485 $(foreach dir,$(STATIC_DIRS
),$(UPDATE_TITLE
) $(MAKE
) -C
$(dir) $@
; )
488 ifneq (,$(strip $(TOOL_DIRS
)))
489 LOOP_OVER_TOOL_DIRS
= \
491 $(foreach dir,$(TOOL_DIRS
),$(UPDATE_TITLE
) $(MAKE
) -C
$(dir) $@
; )
495 # create a bunch of fake targets for order-only processing
496 PARALLEL_DIRS_export
= $(addsuffix _export
,$(PARALLEL_DIRS
))
497 PARALLEL_DIRS_libs
= $(addsuffix _libs
,$(PARALLEL_DIRS
))
498 PARALLEL_DIRS_tools
= $(addsuffix _tools
,$(PARALLEL_DIRS
))
500 .PHONY
: $(PARALLEL_DIRS_export
) $(PARALLEL_DIRS_libs
) $(PARALLEL_DIRS_tools
)
504 # Now we can differentiate between objects used to build a library, and
505 # objects used to build an executable in the same directory.
512 HOST_PROGOBJS
= $(HOST_OBJS
)
515 # MAKE_DIRS: List of directories to build while looping over directories.
516 # A Makefile that needs $(MDDEPDIR) created but doesn't set any of these
517 # variables we know to check can just set NEED_MDDEPDIR explicitly.
518 ifneq (,$(OBJS
)$(XPIDLSRCS
)$(SDK_XPIDLSRCS
)$(SIMPLE_PROGRAMS
)$(NEED_MDDEPDIR
))
519 MAKE_DIRS
+= $(CURDIR
)/$(MDDEPDIR
)
520 GARBAGE_DIRS
+= $(MDDEPDIR
)
524 # Tags: emacs (etags), vi (ctags)
525 # TAG_PROGRAM := ctags -L -
527 TAG_PROGRAM
= xargs etags
-a
530 # Turn on C++ linking if we have any .cpp or .mm files
531 # (moved this from config.mk so that config.mk can be included
532 # before the CPPSRCS are defined)
534 ifneq ($(CPPSRCS
)$(CMMSRCS
),)
539 # Make sure to wrap static libs inside linker specific flags to turn on & off
540 # inclusion of all symbols inside the static libs
542 ifndef NO_LD_ARCHIVE_FLAGS
543 ifdef SHARED_LIBRARY_LIBS
544 EXTRA_DSO_LDOPTS
:= $(MKSHLIB_FORCE_ALL
) $(SHARED_LIBRARY_LIBS
) $(MKSHLIB_UNFORCE_ALL
) $(EXTRA_DSO_LDOPTS
)
549 # This will strip out symbols that the component should not be
550 # exporting from the .dynsym section.
553 EXTRA_DSO_LDOPTS
+= $(MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS
)
557 # Enforce the requirement that MODULE_NAME must be set
558 # for components in static builds
562 ifndef FORCE_SHARED_LIB
564 $(error MODULE_NAME is required for components which may be used in static builds
)
571 # MacOS X specific stuff
574 ifeq ($(OS_ARCH
),Darwin
)
577 EXTRA_DSO_LDOPTS
+= -bundle
579 EXTRA_DSO_LDOPTS
+= -dynamiclib
-install_name @executable_path
/$(SHARED_LIBRARY
) -compatibility_version
1 -current_version
1 -single_module
585 # On NetBSD a.out systems, use -Bsymbolic. This fixes what would otherwise be
586 # fatal symbol name clashes between components.
588 ifeq ($(OS_ARCH
),NetBSD
)
589 ifeq ($(DLL_SUFFIX
),.so
.1.0)
591 EXTRA_DSO_LDOPTS
+= -Wl
,-Bsymbolic
596 ifeq ($(OS_ARCH
),FreeBSD
)
598 EXTRA_DSO_LDOPTS
+= -Wl
,-Bsymbolic
602 ifeq ($(OS_ARCH
),NetBSD
)
603 ifneq (,$(filter arc cobalt hpcmips mipsco newsmips pmax sgimips
,$(OS_TEST
)))
604 ifeq ($(MODULE
),layout
)
605 OS_CFLAGS
+= -Wa
,-xgot
606 OS_CXXFLAGS
+= -Wa
,-xgot
611 ifeq ($(OS_ARCH
),Linux
)
612 ifneq (,$(filter mips mipsel
,$(OS_TEST
)))
613 ifeq ($(MODULE
),layout
)
614 OS_CFLAGS
+= -Wa
,-xgot
615 OS_CXXFLAGS
+= -Wa
,-xgot
621 # HP-UXBeOS specific section: for COMPONENTS only, add -Bsymbolic flag
622 # which uses internal symbols first
624 ifeq ($(OS_ARCH
),HP-UX
)
626 ifeq ($(GNU_CC
)$(GNU_CXX
),)
627 EXTRA_DSO_LDOPTS
+= -Wl
,-Bsymbolic
628 ifneq ($(HAS_EXTRAEXPORTS
),1)
629 MKSHLIB
+= -Wl
,+eNSGetModule
-Wl
,+eerrno
630 MKCSHLIB
+= +eNSGetModule
+eerrno
631 ifneq ($(OS_TEST
),ia64
)
632 MKSHLIB
+= -Wl
,+e_shlInit
633 MKCSHLIB
+= +e_shlInit
635 endif # !HAS_EXTRAEXPORTS
636 endif # non-gnu compilers
640 ifeq ($(OS_ARCH
),AIX
)
642 ifneq ($(HAS_EXTRAEXPORTS
),1)
643 MKSHLIB
+= -bE
:$(MOZILLA_DIR
)/build
/unix
/aix.exp
-bnoexpall
644 MKCSHLIB
+= -bE
:$(MOZILLA_DIR
)/build
/unix
/aix.exp
-bnoexpall
645 endif # HAS_EXTRAEXPORTS
650 # OSF1: add -B symbolic flag for components
652 ifeq ($(OS_ARCH
),OSF1
)
654 ifeq ($(GNU_CC
)$(GNU_CXX
),)
655 EXTRA_DSO_LDOPTS
+= -B symbolic
661 # Linux: add -Bsymbolic flag for components
663 ifeq ($(OS_ARCH
),Linux
)
665 EXTRA_DSO_LDOPTS
+= -Wl
,-Bsymbolic
672 ifeq ($(OS_ARCH
),WINNT
)
675 DSO_LDOPTS
+= -Wl
,--out-implib
-Wl
,$(IMPORT_LIBRARY
)
688 ifeq (_WINNT
,$(GNU_CC
)_
$(OS_ARCH
))
692 endif # WINNT && !GNU_CC
693 ifneq (,$(filter WINCE
,$(OS_ARCH
)))
697 ifeq ($(OS_TARGET
), WINCE
)
699 HOST_OUTOPTION
= -Fo
# eol
702 ifeq (,$(CROSS_COMPILE
))
703 HOST_OUTOPTION
= $(OUTOPTION
)
705 HOST_OUTOPTION
= -o
# eol
709 ################################################################################
711 # SUBMAKEFILES: List of Makefiles for next level down.
712 # This is used to update or create the Makefiles before invoking them.
713 SUBMAKEFILES
+= $(addsuffix /Makefile
, $(DIRS
) $(TOOL_DIRS
) $(PARALLEL_DIRS
))
715 # The root makefile doesn't want to do a plain export/libs, because
716 # of the tiers and because of libxul. Suppress the default rules in favor
717 # of something else. Makefiles which use this var *must* provide a sensible
718 # default rule before including rules.mk
719 ifndef SUPPRESS_DEFAULT_RULES
723 $(foreach tier
,$(TIERS
),$(MAKE
) tier_
$(tier
); ) true
728 ifneq (,$(strip $(STATIC_DIRS
)))
729 $(foreach dir,$(STATIC_DIRS
),$(MAKE
) -C
$(dir); )
743 endif # SUPPRESS_DEFAULT_RULES
745 ifeq ($(filter s
,$(MAKEFLAGS
)),)
753 MAKE_TIER_SUBMAKEFILES
= +$(if
$(tier_
$*_dirs
),$(MAKE
) $(addsuffix /Makefile
,$(tier_
$*_dirs
)))
757 @
$(MAKE_TIER_SUBMAKEFILES
)
759 $(foreach dir,$(tier_
$*_dirs
),$(MAKE
) -C
$(dir) export; ) true
763 @
$(MAKE_TIER_SUBMAKEFILES
)
765 $(foreach dir,$(tier_
$*_dirs
),$(MAKE
) -C
$(dir) libs
; ) true
769 @
$(MAKE_TIER_SUBMAKEFILES
)
771 $(foreach dir,$(tier_
$*_dirs
),$(MAKE
) -C
$(dir) tools
; ) true
773 $(foreach tier
,$(TIERS
),tier_
$(tier
))::
774 @
$(ECHO
) "$@: $($@_staticdirs) $($@_dirs)"
776 $(foreach dir,$($@_staticdirs
),$(MAKE
) -C
$(dir); ) true
780 # Do everything from scratch
785 # Add dummy depend target for tinderboxes
789 all_platforms
:: $(NFSPWD
)
791 if
test ! -d LOGS
; then
rm -rf LOGS
; mkdir LOGS
; else true
; fi
; \
792 for h in
$(PLATFORM_HOSTS
); do \
793 echo
"On $$h: $(MAKE) $(ALL_PLATFORMS) >& LOGS/$$h.log";\
794 rsh
$$h -n
"(chdir $$d; \
795 $(MAKE) $(ALL_PLATFORMS) >& LOGS/$$h.log; \
796 echo DONE) &" 2>&1 > LOGS
/$$h.pid
& \
801 cd
$(@D
); $(MAKE
) $(@F
)
804 # Target to only regenerate makefiles
805 makefiles
: $(SUBMAKEFILES
)
806 ifneq (,$(DIRS
)$(TOOL_DIRS
)$(PARALLEL_DIRS
))
807 +$(LOOP_OVER_PARALLEL_DIRS
)
809 +$(LOOP_OVER_TOOL_DIRS
)
813 export:: $(PARALLEL_DIRS_export
)
815 $(PARALLEL_DIRS_export
): %_export
: %/Makefile
816 +@
$(UPDATE_TITLE_export
) $(MAKE
) -C
$* export
819 export:: $(SUBMAKEFILES
) $(MAKE_DIRS
) $(if
$(EXPORTS
)$(XPIDLSRCS
)$(SDK_HEADERS
)$(SDK_XPIDLSRCS
),$(PUBLIC
)) $(if
$(SDK_HEADERS
)$(SDK_XPIDLSRCS
),$(SDK_PUBLIC
)) $(if
$(XPIDLSRCS
),$(IDL_DIR
)) $(if
$(SDK_XPIDLSRCS
),$(SDK_IDL_DIR
))
821 +$(LOOP_OVER_TOOL_DIRS
)
824 tools
:: $(PARALLEL_DIRS_tools
)
826 $(PARALLEL_DIRS_tools
): %_tools
: %/Makefile
827 +@
$(UPDATE_TITLE_tools
) $(MAKE
) -C
$* tools
830 tools
:: $(SUBMAKEFILES
) $(MAKE_DIRS
)
832 ifneq (,$(strip $(TOOL_DIRS
)))
834 $(foreach dir,$(TOOL_DIRS
),$(UPDATE_TITLE
) $(MAKE
) -C
$(dir) libs
; )
838 # Rule to create list of libraries for final link
844 ifdef BUILD_STATIC_LIBS
845 @
$(PERL
) -I
$(MOZILLA_DIR
)/config
$(MOZILLA_DIR
)/config
/build-list.pl
$(FINAL_LINK_COMPS
) $(STATIC_LIBRARY_NAME
)
847 @
$(PERL
) -I
$(MOZILLA_DIR
)/config
$(MOZILLA_DIR
)/config
/build-list.pl
$(FINAL_LINK_COMP_NAMES
) $(MODULE_NAME
)
849 endif # BUILD_STATIC_LIBS
851 $(PERL
) -I
$(MOZILLA_DIR
)/config
$(MOZILLA_DIR
)/config
/build-list.pl
$(FINAL_LINK_LIBS
) $(STATIC_LIBRARY_NAME
)
853 endif # EXPORT_LIBRARY
856 # Create dependencies on static (and shared EXTRA_DSO_LIBS) libraries
857 LIBS_DEPS
= $(filter %.
$(LIB_SUFFIX
), $(LIBS
))
858 HOST_LIBS_DEPS
= $(filter %.
$(LIB_SUFFIX
), $(HOST_LIBS
))
859 DSO_LDOPTS_DEPS
= $(EXTRA_DSO_LIBS
) $(filter %.
$(LIB_SUFFIX
), $(EXTRA_DSO_LDOPTS
))
861 # Dependancies which, if modified, should cause everything to rebuild
862 GLOBAL_DEPS
+= Makefile Makefile.in
$(DEPTH
)/config
/autoconf.mk
$(DEPTH
)/config
/config.mk
864 ##############################################
866 libs
:: $(PARALLEL_DIRS_libs
)
868 $(PARALLEL_DIRS_libs
): %_libs
: %/Makefile
869 +@
$(UPDATE_TITLE_libs
) $(MAKE
) -C
$* libs
872 libs
:: $(SUBMAKEFILES
) $(MAKE_DIRS
) $(HOST_LIBRARY
) $(LIBRARY
) $(SHARED_LIBRARY
) $(IMPORT_LIBRARY
) $(HOST_PROGRAM
) $(PROGRAM
) $(HOST_SIMPLE_PROGRAMS
) $(SIMPLE_PROGRAMS
) $(JAVA_LIBRARY
)
873 ifndef NO_DIST_INSTALL
875 ifdef EXPORT_LIBRARY
# Stage libs that will be linked into a static build
877 $(INSTALL
) $(IFLAGS1
) $(LIBRARY
) $(DEPTH
)/staticlib
/components
879 $(INSTALL
) $(IFLAGS1
) $(LIBRARY
) $(DEPTH
)/staticlib
881 endif # EXPORT_LIBRARY
884 $(error Shipping static component libs makes no sense.
)
886 $(INSTALL
) $(IFLAGS1
) $(LIBRARY
) $(DIST
)/lib
892 $(INSTALL
) $(IFLAGS2
) $(SHARED_LIBRARY
) $(FINAL_TARGET
)/components
893 $(ELF_DYNSTR_GC
) $(FINAL_TARGET
)/components
/$(SHARED_LIBRARY
)
894 ifdef BEOS_ADDON_WORKAROUND
895 ( cd
$(FINAL_TARGET
)/components
&& $(CC
) -nostart
-o
$(SHARED_LIBRARY
).stub
$(SHARED_LIBRARY
) )
897 else # ! IS_COMPONENT
898 ifneq (,$(filter OS2 WINNT WINCE
,$(OS_ARCH
)))
899 $(INSTALL
) $(IFLAGS2
) $(IMPORT_LIBRARY
) $(DIST
)/lib
901 $(INSTALL
) $(IFLAGS2
) $(SHARED_LIBRARY
) $(DIST
)/lib
903 $(INSTALL
) $(IFLAGS2
) $(SHARED_LIBRARY
) $(FINAL_TARGET
)
904 ifdef BEOS_ADDON_WORKAROUND
905 ( cd
$(FINAL_TARGET
) && $(CC
) -nostart
-o
$(SHARED_LIBRARY
).stub
$(SHARED_LIBRARY
) )
908 endif # SHARED_LIBRARY
910 $(INSTALL
) $(IFLAGS2
) $(PROGRAM
) $(FINAL_TARGET
)
912 ifdef SIMPLE_PROGRAMS
913 $(INSTALL
) $(IFLAGS2
) $(SIMPLE_PROGRAMS
) $(FINAL_TARGET
)
916 $(INSTALL
) $(IFLAGS2
) $(HOST_PROGRAM
) $(DIST
)/host
/bin
918 ifdef HOST_SIMPLE_PROGRAMS
919 $(INSTALL
) $(IFLAGS2
) $(HOST_SIMPLE_PROGRAMS
) $(DIST
)/host
/bin
922 $(INSTALL
) $(IFLAGS1
) $(HOST_LIBRARY
) $(DIST
)/host
/lib
926 $(INSTALL
) $(IFLAGS1
) $(JAVA_LIBRARY
) $(FINAL_TARGET
)/components
928 $(INSTALL
) $(IFLAGS1
) $(JAVA_LIBRARY
) $(FINAL_TARGET
)
931 endif # !NO_DIST_INSTALL
934 ##############################################
936 ifndef NO_PROFILE_GUIDED_OPTIMIZE
937 ifneq (,$(MOZ_PROFILE_GENERATE
)$(MOZ_PROFILE_USE
))
938 ifeq ($(OS_ARCH
)_
$(GNU_CC
)$(INTERNAL_TOOLS
), WINNT_
)
939 # Force re-linking when building with PGO, since
940 # the MSVC linker does all the work. We force re-link
941 # in both stages so you can do depend builds with PGO.
943 $(SHARED_LIBRARY
): FORCE
949 ifdef MOZ_PROFILE_USE
950 # In the second pass, we need to merge the pgc files into the pgd file.
951 # The compiler would do this for us automatically if they were in the right
952 # place, but they're in dist/bin.
953 ifneq (,$(SHARED_LIBRARY
)$(PROGRAM
))
956 $(PYTHON
) $(topsrcdir
)/build
/win32
/pgomerge.py \
957 $(PROGRAM
:$(BIN_SUFFIX
)=) $(DIST
)/bin
960 $(PYTHON
) $(topsrcdir
)/build
/win32
/pgomerge.py \
961 $(SHARED_LIBRARY_NAME
) $(DIST
)/bin
964 endif # MOZ_PROFILE_USE
966 endif # MOZ_PROFILE_GENERATE || MOZ_PROFILE_USE
967 endif # NO_PROFILE_GUIDED_OPTIMIZE
969 ##############################################
972 $(MAKE
) -C
$(topsrcdir
) -f client.mk checkout
974 run_viewer
: $(FINAL_TARGET
)/viewer
975 cd
$(FINAL_TARGET
); \
976 MOZILLA_FIVE_HOME
=`pwd` \
977 LD_LIBRARY_PATH
=".:$(LIBS_PATH):$$LD_LIBRARY_PATH" \
980 clean clobber realclean clobber_all
:: $(SUBMAKEFILES
)
982 -rm -rf
$(ALL_TRASH_DIRS
)
983 +-$(LOOP_OVER_PARALLEL_DIRS
)
985 +-$(LOOP_OVER_STATIC_DIRS
)
986 +-$(LOOP_OVER_TOOL_DIRS
)
988 distclean:: $(SUBMAKEFILES
)
989 +-$(LOOP_OVER_PARALLEL_DIRS
)
991 +-$(LOOP_OVER_STATIC_DIRS
)
992 +-$(LOOP_OVER_TOOL_DIRS
)
993 -rm -rf
$(ALL_TRASH_DIRS
)
994 -rm -f
$(ALL_TRASH
) \
995 Makefile .HSancillary \
996 $(wildcard *.
$(OBJ_SUFFIX
)) $(wildcard *.ho
) $(wildcard host_
*.o
*) \
997 $(wildcard *.
$(LIB_SUFFIX
)) $(wildcard *$(DLL_SUFFIX
)) \
998 $(wildcard *.
$(IMPORT_LIB_SUFFIX
))
999 ifeq ($(OS_ARCH
),OS2
)
1000 -rm -f
$(PROGRAM
:.exe
=.map
)
1005 find
$(topsrcdir
) -name
dist -prune
-o \
( -name
'*.[hc]' -o
-name
'*.cp' -o
-name
'*.cpp' -o
-name
'*.idl' \
) -print |
$(TAG_PROGRAM
)
1009 # creates OBJS, links with LIBS to create Foo
1011 $(PROGRAM
): $(PROGOBJS
) $(LIBS_DEPS
) $(EXTRA_DEPS
) $(EXE_DEF_FILE
) $(RESFILE
) $(GLOBAL_DEPS
)
1012 ifeq (WINCE
,$(OS_ARCH
))
1013 $(LD
) -NOLOGO
-OUT
:$@
$(WIN32_EXE_LDFLAGS
) $(LDFLAGS
) $(PROGOBJS
) $(RESFILE
) $(LIBS
) $(EXTRA_LIBS
) $(OS_LIBS
)
1015 ifeq (_WINNT
,$(GNU_CC
)_
$(OS_ARCH
))
1016 $(LD
) -NOLOGO
-OUT
:$@
-PDB
:$(LINK_PDBFILE
) $(WIN32_EXE_LDFLAGS
) $(LDFLAGS
) $(PROGOBJS
) $(RESFILE
) $(LIBS
) $(EXTRA_LIBS
) $(OS_LIBS
)
1017 ifdef MSMANIFEST_TOOL
1018 @if
test -f
$@.manifest
; then \
1019 if
test -f
"$(srcdir)/$@.manifest"; then \
1020 mt.exe
-NOLOGO
-MANIFEST
"$(win_srcdir)/$@.manifest" $@.manifest
-OUTPUTRESOURCE
:$@\
;1; \
1022 mt.exe
-NOLOGO
-MANIFEST
$@.manifest
-OUTPUTRESOURCE
:$@\
;1; \
1024 rm -f
$@.manifest
; \
1026 endif # MSVC with manifest tool
1028 ifeq ($(CPP_PROG_LINK
),1)
1029 $(CCC
) -o
$@
$(CXXFLAGS
) $(WRAP_MALLOC_CFLAGS
) $(PROGOBJS
) $(RESFILE
) $(WIN32_EXE_LDFLAGS
) $(SOLARIS_JEMALLOC_LDFLAGS
) $(LDFLAGS
) $(LIBS_DIR
) $(LIBS
) $(OS_LIBS
) $(EXTRA_LIBS
) $(BIN_FLAGS
) $(WRAP_MALLOC_LIB
) $(PROFILER_LIBS
) $(EXE_DEF_FILE
)
1030 else # ! CPP_PROG_LINK
1031 $(CC
) -o
$@
$(CFLAGS
) $(PROGOBJS
) $(RESFILE
) $(WIN32_EXE_LDFLAGS
) $(SOLARIS_JEMALLOC_LDFLAGS
) $(LDFLAGS
) $(LIBS_DIR
) $(LIBS
) $(OS_LIBS
) $(EXTRA_LIBS
) $(BIN_FLAGS
) $(EXE_DEF_FILE
)
1032 endif # CPP_PROG_LINK
1033 endif # WINNT && !GNU_CC
1039 ifdef MOZ_POST_PROGRAM_COMMAND
1040 $(MOZ_POST_PROGRAM_COMMAND
) $@
1042 ifeq ($(OS_ARCH
),BeOS
)
1043 ifdef BEOS_PROGRAM_RESOURCE
1044 xres
-o
$@
$(BEOS_PROGRAM_RESOURCE
)
1049 $(HOST_PROGRAM
): $(HOST_PROGOBJS
) $(HOST_LIBS_DEPS
) $(HOST_EXTRA_DEPS
) $(GLOBAL_DEPS
)
1050 ifeq (WINCE
,$(OS_ARCH
))
1051 $(HOST_LD
) -NOLOGO
-OUT
:$@
$(HOST_OBJS
) $(WIN32_EXE_LDFLAGS
) $(HOST_LIBS
) $(HOST_EXTRA_LIBS
)
1053 ifeq (_WINNT
,$(GNU_CC
)_
$(HOST_OS_ARCH
))
1054 $(HOST_LD
) -NOLOGO
-OUT
:$@
-PDB
:$(HOST_PDBFILE
) $(HOST_OBJS
) $(WIN32_EXE_LDFLAGS
) $(HOST_LIBS
) $(HOST_EXTRA_LIBS
)
1055 ifdef MSMANIFEST_TOOL
1056 @if
test -f
$@.manifest
; then \
1057 mt.exe
-NOLOGO
-MANIFEST
$@.manifest
-OUTPUTRESOURCE
:$@\
;1; \
1058 rm -f
$@.manifest
; \
1060 endif # MSVC with manifest tool
1062 ifeq ($(CPP_PROG_LINK
),1)
1063 $(HOST_CXX
) -o
$@
$(HOST_CXXFLAGS
) $(HOST_LDFLAGS
) $(HOST_PROGOBJS
) $(HOST_LIBS
) $(HOST_EXTRA_LIBS
)
1065 $(HOST_CC
) -o
$@
$(HOST_CFLAGS
) $(HOST_LDFLAGS
) $(HOST_PROGOBJS
) $(HOST_LIBS
) $(HOST_EXTRA_LIBS
)
1066 endif # CPP_PROG_LINK
1071 # This is an attempt to support generation of multiple binaries
1072 # in one directory, it assumes everything to compile Foo is in
1073 # Foo.o (from either Foo.c or Foo.cpp).
1075 # SIMPLE_PROGRAMS = Foo Bar
1076 # creates Foo.o Bar.o, links with LIBS to create Foo, Bar.
1078 $(SIMPLE_PROGRAMS
): %$(BIN_SUFFIX
): %.
$(OBJ_SUFFIX
) $(LIBS_DEPS
) $(EXTRA_DEPS
) $(GLOBAL_DEPS
)
1079 ifeq (WINCE
,$(OS_ARCH
))
1080 $(LD
) -nologo
-entry
:main
-out
:$@
$< $(WIN32_EXE_LDFLAGS
) $(LDFLAGS
) $(LIBS
) $(EXTRA_LIBS
) $(OS_LIBS
)
1082 ifeq (_WINNT
,$(GNU_CC
)_
$(OS_ARCH
))
1083 $(LD
) -nologo
-out
:$@
-pdb
:$(LINK_PDBFILE
) $< $(WIN32_EXE_LDFLAGS
) $(LDFLAGS
) $(LIBS
) $(EXTRA_LIBS
) $(OS_LIBS
)
1084 ifdef MSMANIFEST_TOOL
1085 @if
test -f
$@.manifest
; then \
1086 mt.exe
-NOLOGO
-MANIFEST
$@.manifest
-OUTPUTRESOURCE
:$@\
;1; \
1087 rm -f
$@.manifest
; \
1089 endif # MSVC with manifest tool
1091 ifeq ($(CPP_PROG_LINK
),1)
1092 $(CCC
) $(WRAP_MALLOC_CFLAGS
) $(CXXFLAGS
) -o
$@
$< $(WIN32_EXE_LDFLAGS
) $(SOLARIS_JEMALLOC_LDFLAGS
) $(LDFLAGS
) $(LIBS_DIR
) $(LIBS
) $(OS_LIBS
) $(EXTRA_LIBS
) $(WRAP_MALLOC_LIB
) $(PROFILER_LIBS
) $(BIN_FLAGS
)
1094 $(CC
) $(WRAP_MALLOC_CFLAGS
) $(CFLAGS
) $(OUTOPTION
)$@
$< $(WIN32_EXE_LDFLAGS
) $(SOLARIS_JEMALLOC_LDFLAGS
) $(LDFLAGS
) $(LIBS_DIR
) $(LIBS
) $(OS_LIBS
) $(EXTRA_LIBS
) $(WRAP_MALLOC_LIB
) $(PROFILER_LIBS
) $(BIN_FLAGS
)
1095 endif # CPP_PROG_LINK
1096 endif # WINNT && !GNU_CC
1102 ifdef MOZ_POST_PROGRAM_COMMAND
1103 $(MOZ_POST_PROGRAM_COMMAND
) $@
1106 $(HOST_SIMPLE_PROGRAMS
): host_
%$(HOST_BIN_SUFFIX
): host_
%.
$(OBJ_SUFFIX
) $(HOST_LIBS_DEPS
) $(HOST_EXTRA_DEPS
) $(GLOBAL_DEPS
)
1107 ifeq (WINCE
,$(OS_ARCH
))
1108 $(HOST_LD
) -NOLOGO
-OUT
:$@
$(WIN32_EXE_LDFLAGS
) $< $(HOST_LIBS
) $(HOST_EXTRA_LIBS
)
1110 ifeq (WINNT_
,$(HOST_OS_ARCH
)_
$(GNU_CC
))
1111 $(HOST_LD
) -NOLOGO
-OUT
:$@
-PDB
:$(HOST_PDBFILE
) $< $(WIN32_EXE_LDFLAGS
) $(HOST_LIBS
) $(HOST_EXTRA_LIBS
)
1113 ifneq (,$(HOST_CPPSRCS
)$(USE_HOST_CXX
))
1114 $(HOST_CXX
) $(HOST_OUTOPTION
)$@
$(HOST_CXXFLAGS
) $(INCLUDES
) $< $(HOST_LIBS
) $(HOST_EXTRA_LIBS
)
1116 $(HOST_CC
) $(HOST_OUTOPTION
)$@
$(HOST_CFLAGS
) $(INCLUDES
) $< $(HOST_LIBS
) $(HOST_EXTRA_LIBS
)
1122 # Purify target. Solaris/sparc only to start.
1123 # Purify does not recognize "egcs" or "c++" so we go with
1124 # "gcc" and "g++" for now.
1127 ifeq ($(CPP_PROG_LINK
),1)
1128 $(PURIFY
) $(CCC
) -o
$^.pure
$(CXXFLAGS
) $(PROGOBJS
) $(LDFLAGS
) $(LIBS_DIR
) $(LIBS
) $(OS_LIBS
) $(EXTRA_LIBS
)
1130 $(PURIFY
) $(CC
) -o
$^.pure
$(CFLAGS
) $(PROGOBJS
) $(LDFLAGS
) $(LIBS_DIR
) $(LIBS
) $(OS_LIBS
) $(EXTRA_LIBS
)
1132 ifndef NO_DIST_INSTALL
1133 $(INSTALL
) $(IFLAGS2
) $^.pure
$(FINAL_TARGET
)
1136 quantify
: $(PROGRAM
)
1137 ifeq ($(CPP_PROG_LINK
),1)
1138 $(QUANTIFY
) $(CCC
) -o
$^.quantify
$(CXXFLAGS
) $(PROGOBJS
) $(LDFLAGS
) $(LIBS_DIR
) $(LIBS
) $(OS_LIBS
) $(EXTRA_LIBS
)
1140 $(QUANTIFY
) $(CC
) -o
$^.quantify
$(CFLAGS
) $(PROGOBJS
) $(LDFLAGS
) $(LIBS_DIR
) $(LIBS
) $(OS_LIBS
) $(EXTRA_LIBS
)
1142 ifndef NO_DIST_INSTALL
1143 $(INSTALL
) $(IFLAGS2
) $^.quantify
$(FINAL_TARGET
)
1147 # This allows us to create static versions of the shared libraries
1148 # that are built using other static libraries. Confused...?
1150 ifdef SHARED_LIBRARY_LIBS
1151 ifeq (,$(GNU_LD
)$(filter-out OS2 WINNT WINCE
, $(OS_ARCH
)))
1152 ifneq (,$(BUILD_STATIC_LIBS
)$(FORCE_STATIC_LIB
))
1153 LOBJS
+= $(SHARED_LIBRARY_LIBS
)
1156 ifneq (,$(filter OSF1 BSD_OS FreeBSD NetBSD OpenBSD SunOS Darwin
,$(OS_ARCH
)))
1157 CLEANUP1
:= | egrep
-v
'(________64ELEL_|__.SYMDEF)'
1158 CLEANUP2
:= rm -f ________64ELEL_ __.SYMDEF
1162 SUB_LOBJS
= $(shell for lib in
$(SHARED_LIBRARY_LIBS
); do
$(AR_LIST
) $${lib} $(CLEANUP1
); done
;)
1165 ifdef MOZILLA_PROBE_LIBS
1166 PROBE_LOBJS
= $(shell for lib in
$(MOZILLA_PROBE_LIBS
); do
$(AR_LIST
) $${lib} $(CLEANUP1
); done
;)
1168 ifdef DTRACE_PROBE_OBJ
1169 EXTRA_DEPS
+= $(DTRACE_PROBE_OBJ
)
1172 $(LIBRARY
): $(OBJS
) $(LOBJS
) $(SHARED_LIBRARY_LIBS
) $(EXTRA_DEPS
) $(GLOBAL_DEPS
)
1174 ifneq (,$(GNU_LD
)$(filter-out OS2 WINNT WINCE
, $(OS_ARCH
)))
1175 ifdef SHARED_LIBRARY_LIBS
1177 @for lib in
$(SHARED_LIBRARY_LIBS
); do
$(AR_EXTRACT
) $${lib}; $(CLEANUP2
); done
1180 $(AR
) $(AR_FLAGS
) $(OBJS
) $(LOBJS
) $(SUB_LOBJS
)
1182 @
rm -f foodummyfilefoo
$(SUB_LOBJS
)
1184 ifeq (,$(filter-out WINNT WINCE
, $(OS_ARCH
)))
1185 $(IMPORT_LIBRARY
): $(SHARED_LIBRARY
)
1188 ifeq ($(OS_ARCH
),OS2
)
1189 $(DEF_FILE
): $(OBJS
) $(SHARED_LIBRARY_LIBS
)
1191 echo LIBRARY
$(SHARED_LIBRARY_NAME
) INITINSTANCE TERMINSTANCE
> $@
1193 echo CODE LOADONCALL MOVEABLE DISCARDABLE
>> $@
1194 echo DATA PRELOAD MOVEABLE MULTIPLE NONSHARED
>> $@
1196 ifeq ($(IS_COMPONENT
),1)
1197 ifeq ($(HAS_EXTRAEXPORTS
),1)
1198 ifndef MOZ_OS2_USE_DECLSPEC
1199 $(FILTER
) $(OBJS
) $(SHARED_LIBRARY_LIBS
) >> $@
1202 echo _NSGetModule
>> $@
1205 ifndef MOZ_OS2_USE_DECLSPEC
1206 $(FILTER
) $(OBJS
) $(SHARED_LIBRARY_LIBS
) >> $@
1211 ifdef MOZ_OS2_USE_DECLSPEC
1212 $(IMPORT_LIBRARY
): $(SHARED_LIBRARY
)
1214 $(IMPORT_LIBRARY
): $(DEF_FILE
)
1221 $(HOST_LIBRARY
): $(HOST_OBJS
) Makefile
1223 $(HOST_AR
) $(HOST_AR_FLAGS
) $(HOST_OBJS
)
1226 ifdef NO_LD_ARCHIVE_FLAGS
1227 SUB_SHLOBJS
= $(SUB_LOBJS
)
1232 ifdef DTRACE_PROBE_OBJ
1233 ifndef DTRACE_LIB_DEPENDENT
1234 $(DTRACE_PROBE_OBJ
): $(OBJS
)
1235 dtrace
-G
-C
-32 -s
$(MOZILLA_DTRACE_SRC
) -o
$(DTRACE_PROBE_OBJ
) $(OBJS
)
1241 # On Darwin (Mac OS X), dwarf2 debugging uses debug info left in .o files,
1242 # so instead of deleting .o files after repacking them into a dylib, we make
1243 # symlinks back to the originals. The symlinks are a no-op for stabs debugging,
1244 # so no need to conditionalize on OS version or debugging format.
1246 $(SHARED_LIBRARY
): $(OBJS
) $(LOBJS
) $(DEF_FILE
) $(RESFILE
) $(SHARED_LIBRARY_LIBS
) $(EXTRA_DEPS
) $(DSO_LDOPTS_DEPS
) $(GLOBAL_DEPS
)
1247 ifndef INCREMENTAL_LINKER
1250 ifeq ($(OS_ARCH
),OpenVMS
)
1251 @if
test ! -f
$(VMS_SYMVEC_FILE
); then \
1252 if
test -f
$(VMS_SYMVEC_FILE_MODULE
); then \
1253 echo Creating specific component options file
$(VMS_SYMVEC_FILE
); \
1254 cp
$(VMS_SYMVEC_FILE_MODULE
) $(VMS_SYMVEC_FILE
); \
1258 @if
test ! -f
$(VMS_SYMVEC_FILE
); then \
1259 echo Creating generic component options file
$(VMS_SYMVEC_FILE
); \
1260 cp
$(VMS_SYMVEC_FILE_COMP
) $(VMS_SYMVEC_FILE
); \
1264 ifdef NO_LD_ARCHIVE_FLAGS
1265 ifdef SHARED_LIBRARY_LIBS
1266 @
rm -f
$(SUB_SHLOBJS
)
1267 @for lib in
$(SHARED_LIBRARY_LIBS
); do
$(AR_EXTRACT
) $${lib}; $(CLEANUP2
); done
1268 ifeq ($(OS_ARCH
),Darwin
)
1269 @echo Making symlinks to the original object files in the archive libraries
$(SHARED_LIBRARY_LIBS
)
1270 @for lib in
$(SHARED_LIBRARY_LIBS
); do \
1271 libdir=`echo $$lib|sed -e 's,/[^/]*\.a,,'`; \
1272 ofiles
=`$(AR_LIST) $${lib}`; \
1273 for ofile in
$$ofiles; do \
1274 if
[ -f
$$libdir/$$ofile ]; then \
1276 ln
-s
$$libdir/$$ofile $$ofile; \
1281 endif # SHARED_LIBRARY_LIBS
1282 endif # NO_LD_ARCHIVE_FLAGS
1283 ifdef DTRACE_LIB_DEPENDENT
1284 @
rm -f
$(PROBE_LOBJS
)
1285 @for lib in
$(MOZILLA_PROBE_LIBS
); do
$(AR_EXTRACT
) $${lib}; $(CLEANUP2
); done
1287 dtrace
-G
-C
-32 -s
$(MOZILLA_DTRACE_SRC
) -o
$(DTRACE_PROBE_OBJ
) $(PROBE_LOBJS
)
1289 @for lib in
$(MOZILLA_PROBE_LIBS
); do \
1290 ofiles
=`$(AR_LIST) $${lib}`; \
1291 $(AR_DELETE
) $${lib} $$ofiles; \
1293 $(MKSHLIB
) $(SHLIB_LDSTARTFILE
) $(OBJS
) $(LOBJS
) $(SUB_SHLOBJS
) $(DTRACE_PROBE_OBJ
) $(PROBE_LOBJS
) $(RESFILE
) $(LDFLAGS
) $(EXTRA_DSO_LDOPTS
) $(OS_LIBS
) $(EXTRA_LIBS
) $(DEF_FILE
) $(SHLIB_LDENDFILE
)
1294 @
rm -f
$(PROBE_LOBJS
)
1295 @
rm -f
$(DTRACE_PROBE_OBJ
)
1296 @for lib in
$(MOZILLA_PROBE_LIBS
); do \
1297 if
[ -L
$${lib} ]; then
rm -f
`readlink $${lib}`; fi
; \
1299 @
rm -f
$(MOZILLA_PROBE_LIBS
)
1301 else # ! DTRACE_LIB_DEPENDENT
1302 $(MKSHLIB
) $(SHLIB_LDSTARTFILE
) $(OBJS
) $(DTRACE_PROBE_OBJ
) $(LOBJS
) $(SUB_SHLOBJS
) $(RESFILE
) $(LDFLAGS
) $(EXTRA_DSO_LDOPTS
) $(OS_LIBS
) $(EXTRA_LIBS
) $(DEF_FILE
) $(SHLIB_LDENDFILE
)
1303 endif # DTRACE_LIB_DEPENDENT
1305 ifeq (_WINNT
,$(GNU_CC
)_
$(OS_ARCH
))
1306 ifdef MSMANIFEST_TOOL
1307 ifdef EMBED_MANIFEST_AT
1308 @if
test -f
$@.manifest
; then \
1309 mt.exe
-NOLOGO
-MANIFEST
$@.manifest
-OUTPUTRESOURCE
:$@\
;$(EMBED_MANIFEST_AT
); \
1310 rm -f
$@.manifest
; \
1312 endif # EMBED_MANIFEST_AT
1313 endif # MSVC with manifest tool
1314 endif # WINNT && !GCC
1315 ifeq ($(OS_ARCH
),Darwin
)
1317 @
rm -f
$(SUB_SHLOBJS
)
1319 @
rm -f foodummyfilefoo
$(DELETE_AFTER_LINK
)
1324 ifdef MOZ_POST_DSO_LIB_COMMAND
1325 $(MOZ_POST_DSO_LIB_COMMAND
) $@
1329 ifdef COMPILER_DEPEND
1330 ifeq (__SunOS
,$(GNU_CC
)_
$(GNU_CXX
)_
$(OS_ARCH
))
1331 _MDDEPFILE
= $(MDDEPDIR
)/$(@F
).pp
1333 define MAKE_DEPS_AUTO_CC
1334 if
test -d
$(@D
); then \
1335 echo
"Building deps for $< using Sun Studio cc"; \
1336 $(CC
) $(COMPILE_CFLAGS
) -xM
$< >$(_MDDEPFILE
) ; \
1339 define MAKE_DEPS_AUTO_CXX
1340 if
test -d
$(@D
); then \
1341 echo
"Building deps for $< using Sun Studio CC"; \
1342 $(CXX
) $(COMPILE_CXXFLAGS
) -xM
$< >$(_MDDEPFILE
) ; \
1345 endif # Sun Studio on Solaris
1346 else # COMPILER_DEPEND
1348 # Generate dependencies on the fly
1350 _MDDEPFILE
= $(MDDEPDIR
)/$(@F
).pp
1352 define MAKE_DEPS_AUTO
1353 if
test -d
$(@D
); then \
1354 echo
"Building deps for $<"; \
1355 $(MKDEPEND
) -o
'.$(OBJ_SUFFIX)' -f-
$(DEFINES
) $(ACDEFINES
) $(INCLUDES
) $< 2>/dev
/null | sed
-e
"s|^[^ ]*/||" > $(_MDDEPFILE
) ; \
1359 MAKE_DEPS_AUTO_CC
= $(MAKE_DEPS_AUTO
)
1360 MAKE_DEPS_AUTO_CXX
= $(MAKE_DEPS_AUTO
)
1362 endif # COMPILER_DEPEND
1364 endif # MOZ_AUTO_DEPS
1367 ifeq ($(OS_ARCH
),SunOS
)
1368 SOLARIS_JEMALLOC_LDFLAGS
= $(call EXPAND_LIBNAME_PATH
,jemalloc
,$(DIST
)/lib
)
1372 # Rules for building native targets must come first because of the host_ prefix
1373 host_
%.
$(OBJ_SUFFIX
): %.c
$(GLOBAL_DEPS
)
1375 $(ELOG
) $(HOST_CC
) $(HOST_OUTOPTION
)$@
-c
$(HOST_CFLAGS
) $(INCLUDES
) $(NSPR_CFLAGS
) $(_VPATH_SRCS
)
1377 host_
%.
$(OBJ_SUFFIX
): %.
cpp $(GLOBAL_DEPS
)
1379 $(ELOG
) $(HOST_CXX
) $(HOST_OUTOPTION
)$@
-c
$(HOST_CXXFLAGS
) $(INCLUDES
) $(NSPR_CFLAGS
) $(_VPATH_SRCS
)
1381 host_
%.
$(OBJ_SUFFIX
): %.
cc $(GLOBAL_DEPS
)
1383 $(ELOG
) $(HOST_CXX
) $(HOST_OUTOPTION
)$@
-c
$(HOST_CXXFLAGS
) $(INCLUDES
) $(NSPR_CFLAGS
) $(_VPATH_SRCS
)
1385 host_
%.
$(OBJ_SUFFIX
): %.m
$(GLOBAL_DEPS
)
1387 $(ELOG
) $(HOST_CC
) $(HOST_OUTOPTION
)$@
-c
$(HOST_CFLAGS
) $(HOST_CMFLAGS
) $(INCLUDES
) $(NSPR_CFLAGS
) $(_VPATH_SRCS
)
1389 host_
%.
$(OBJ_SUFFIX
): %.mm
$(GLOBAL_DEPS
)
1391 $(ELOG
) $(HOST_CXX
) $(HOST_OUTOPTION
)$@
-c
$(HOST_CXXFLAGS
) $(HOST_CMMFLAGS
) $(INCLUDES
) $(NSPR_CFLAGS
) $(_VPATH_SRCS
)
1393 %: %.c
$(GLOBAL_DEPS
)
1395 @
$(MAKE_DEPS_AUTO_CC
)
1396 $(ELOG
) $(CC
) $(CFLAGS
) $(LDFLAGS
) $(OUTOPTION
)$@
$(_VPATH_SRCS
)
1398 %.
$(OBJ_SUFFIX
): %.c
$(GLOBAL_DEPS
)
1400 @
$(MAKE_DEPS_AUTO_CC
)
1401 $(ELOG
) $(CC
) $(OUTOPTION
)$@
-c
$(COMPILE_CFLAGS
) $(_VPATH_SRCS
)
1403 moc_
%.
cpp: %.h
$(GLOBAL_DEPS
)
1404 $(MOC
) $< $(OUTOPTION
)$@
1407 # The AS_DASH_C_FLAG is needed cause not all assemblers (Solaris) accept
1409 %.
$(OBJ_SUFFIX
): %.
$(ASM_SUFFIX
) $(GLOBAL_DEPS
)
1410 $(AS
) -o
$@
$(ASFLAGS
) $(AS_DASH_C_FLAG
) $(_VPATH_SRCS
)
1413 %.
$(OBJ_SUFFIX
): %.S
$(GLOBAL_DEPS
)
1414 $(AS
) -o
$@
$(ASFLAGS
) -c
$<
1416 %: %.
cpp $(GLOBAL_DEPS
)
1417 @
$(MAKE_DEPS_AUTO_CXX
)
1418 $(CCC
) $(OUTOPTION
)$@
$(CXXFLAGS
) $(_VPATH_SRCS
) $(LDFLAGS
)
1421 # Please keep the next two rules in sync.
1423 %.
$(OBJ_SUFFIX
): %.
cc $(GLOBAL_DEPS
)
1425 @
$(MAKE_DEPS_AUTO_CXX
)
1426 $(ELOG
) $(CCC
) $(OUTOPTION
)$@
-c
$(COMPILE_CXXFLAGS
) $(_VPATH_SRCS
)
1428 %.
$(OBJ_SUFFIX
): %.
cpp $(GLOBAL_DEPS
)
1430 @
$(MAKE_DEPS_AUTO_CXX
)
1431 ifdef STRICT_CPLUSPLUS_SUFFIX
1432 echo
"#line 1 \"$*.cpp\"" | cat
- $*.
cpp > t_
$*.
cc
1433 $(ELOG
) $(CCC
) -o
$@
-c
$(COMPILE_CXXFLAGS
) t_
$*.
cc
1436 $(ELOG
) $(CCC
) $(OUTOPTION
)$@
-c
$(COMPILE_CXXFLAGS
) $(_VPATH_SRCS
)
1437 endif #STRICT_CPLUSPLUS_SUFFIX
1439 $(OBJ_PREFIX
)%.
$(OBJ_SUFFIX
): %.mm
$(GLOBAL_DEPS
)
1441 @
$(MAKE_DEPS_AUTO_CXX
)
1442 $(ELOG
) $(CCC
) -o
$@
-c
$(COMPILE_CXXFLAGS
) $(COMPILE_CMMFLAGS
) $(_VPATH_SRCS
)
1444 $(OBJ_PREFIX
)%.
$(OBJ_SUFFIX
): %.m
$(GLOBAL_DEPS
)
1446 @
$(MAKE_DEPS_AUTO_CC
)
1447 $(ELOG
) $(CC
) -o
$@
-c
$(COMPILE_CFLAGS
) $(COMPILE_CMFLAGS
) $(_VPATH_SRCS
)
1450 $(CCC
) -S
$(COMPILE_CXXFLAGS
) $(_VPATH_SRCS
)
1453 $(CCC
) -S
$(COMPILE_CXXFLAGS
) $(_VPATH_SRCS
)
1456 $(CC
) -S
$(COMPILE_CFLAGS
) $(_VPATH_SRCS
)
1459 $(CCC
) -C
-E
$(COMPILE_CXXFLAGS
) $(_VPATH_SRCS
) > $*.i
1462 $(CCC
) -C
-E
$(COMPILE_CXXFLAGS
) $(_VPATH_SRCS
) > $*.i
1465 $(CC
) -C
-E
$(COMPILE_CFLAGS
) $(_VPATH_SRCS
) > $*.i
1468 $(CCC
) -C
-E
$(COMPILE_CXXFLAGS
) $(COMPILE_CMMFLAGS
) $(_VPATH_SRCS
) > $*.i
1471 @echo Creating Resource file
: $@
1472 ifeq ($(OS_ARCH
),OS2
)
1473 $(RC
) $(RCFLAGS
:-D
%=-d
%) -i
$(subst /,\
,$(srcdir)) -r
$< $@
1476 $(RC
) $(RCFLAGS
) $(filter-out -U
%,$(DEFINES
)) $(INCLUDES
:-I
%=--include-dir
%) $(OUTOPTION
)$@
$(_VPATH_SRCS
)
1478 $(RC
) $(RCFLAGS
) -r
$(DEFINES
) $(INCLUDES
) $(OUTOPTION
)$@
$(_VPATH_SRCS
)
1482 # need 3 separate lines for OS/2
1489 rm -f
$@
; cp
$< $@
; chmod
+x
$@
1491 # Cancel these implicit rules
1501 ###############################################################################
1503 ###############################################################################
1504 ifneq (,$(filter OS2 WINNT WINCE
,$(OS_ARCH
)))
1511 SPACE
:= $(EMPTY
) $(EMPTY
)
1513 # Cygwin and MSYS have their own special path form, but javac expects the source
1514 # and class paths to be in the DOS form (i.e. e:/builds/...). This function
1515 # does the appropriate conversion on Windows, but is a noop on other systems.
1516 ifeq (,$(filter-out WINNT WINCE
, $(HOST_OS_ARCH
)))
1517 ifdef CYGWIN_WRAPPER
1518 normalizepath
= $(foreach p
,$(1),$(shell cygpath
-m
$(p
)))
1521 # We use 'pwd -W' to get DOS form of the path. However, since the given path
1522 # could be a file or a non-existent path, we cannot call 'pwd -W' directly
1523 # on the path. Instead, we extract the root path (i.e. "c:/"), call 'pwd -W'
1524 # on it, then merge with the rest of the path.
1525 root-path
= $(shell echo
$(1) | sed
-e
"s|\(/[^/]*\)/\?\(.*\)|\1|")
1526 non-root-path
= $(shell echo
$(1) | sed
-e
"s|\(/[^/]*\)/\?\(.*\)|\2|")
1527 normalizepath
= $(foreach p
,$(1),$(if
$(filter /%,$(1)),$(shell cd
$(call root-path
,$(1)) && pwd
-W
)$(call non-root-path
,$(1)),$(1)))
1530 normalizepath
= $(1)
1533 _srcdir
= $(call normalizepath
,$(srcdir))
1534 ifdef JAVA_SOURCEPATH
1535 SP
= $(subst $(SPACE
),$(SEP
),$(call normalizepath
,$(strip $(JAVA_SOURCEPATH
))))
1536 _JAVA_SOURCEPATH
= ".$(SEP)$(_srcdir)$(SEP)$(SP)"
1538 _JAVA_SOURCEPATH
= ".$(SEP)$(_srcdir)"
1541 ifdef JAVA_CLASSPATH
1542 CP
= $(subst $(SPACE
),$(SEP
),$(call normalizepath
,$(strip $(JAVA_CLASSPATH
))))
1543 _JAVA_CLASSPATH
= ".$(SEP)$(CP)"
1552 $(_JAVA_DIR
)/%.class
: %.java
$(GLOBAL_DEPS
) $(_JAVA_DIR
)
1553 $(CYGWIN_WRAPPER
) $(JAVAC
) $(JAVAC_FLAGS
) -classpath
$(_JAVA_CLASSPATH
) \
1554 -sourcepath
$(_JAVA_SOURCEPATH
) -d
$(_JAVA_DIR
) $(_VPATH_SRCS
)
1556 $(JAVA_LIBRARY
): $(addprefix $(_JAVA_DIR
)/,$(JAVA_SRCS
:.java
=.class
)) $(GLOBAL_DEPS
)
1557 $(JAR
) cf
$@
-C
$(_JAVA_DIR
) .
1559 GARBAGE_DIRS
+= $(_JAVA_DIR
)
1561 ###############################################################################
1563 ###############################################################################
1565 # In GNU make 3.80, makefiles must use the /cygdrive syntax, even if we're
1566 # processing them with AS perl. See bug 232003
1568 CYGWIN_TOPSRCDIR
= -nowrap
-p
$(topsrcdir
) -wrap
1571 # Note: Passing depth to make-makefile is optional.
1572 # It saves the script some work, though.
1573 Makefile
: Makefile.in
1574 @
$(PERL
) $(AUTOCONF_TOOLS
)/make-makefile
-t
$(topsrcdir
) -d
$(DEPTH
) $(CYGWIN_TOPSRCDIR
)
1577 # VPATH does not work on some machines in this case, so add $(srcdir)
1578 $(SUBMAKEFILES
): % : $(srcdir)/%.in
1579 $(PERL
) $(AUTOCONF_TOOLS
)/make-makefile
-t
$(topsrcdir
) -d
$(DEPTH
) $(CYGWIN_TOPSRCDIR
) $@
1582 ifdef AUTOUPDATE_CONFIGURE
1583 $(topsrcdir
)/configure
: $(topsrcdir
)/configure.in
1584 (cd
$(topsrcdir
) && $(AUTOCONF
)) && (cd
$(DEPTH
) && .
/config.status
--recheck
)
1587 ###############################################################################
1588 # Bunch of things that extend the 'export' rule (in order):
1589 ###############################################################################
1591 ################################################################################
1592 # Copy each element of EXPORTS to $(PUBLIC)
1594 ifneq ($(EXPORTS
)$(XPIDLSRCS
)$(SDK_HEADERS
)$(SDK_XPIDLSRCS
),)
1595 $(SDK_PUBLIC
) $(PUBLIC
):
1600 ifneq ($(XPIDLSRCS
)$(SDK_XPIDLSRCS
),)
1606 ifneq ($(XPI_NAME
),)
1610 export:: $(FINAL_TARGET
)
1613 ifndef NO_DIST_INSTALL
1615 export:: $(EXPORTS
) $(PUBLIC
)
1616 $(INSTALL
) $(IFLAGS1
) $^
1619 ifneq ($(SDK_HEADERS
),)
1620 export:: $(SDK_HEADERS
) $(SDK_PUBLIC
)
1621 $(INSTALL
) $(IFLAGS1
) $^
1623 export:: $(SDK_HEADERS
) $(PUBLIC
)
1624 $(INSTALL
) $(IFLAGS1
) $^
1626 endif # NO_DIST_INSTALL
1628 ################################################################################
1629 # Copy each element of PREF_JS_EXPORTS
1634 ifneq (,$(XPI_NAME
)$(LIBXUL_SDK
))
1635 PREF_DIR
= defaults
/preferences
1637 PREF_DIR
= defaults
/pref
1641 ifneq ($(PREF_JS_EXPORTS
),)
1642 # on win32, pref files need CRLF line endings... see bug 206029
1643 ifeq (WINNT
,$(OS_ARCH
))
1644 PREF_PPFLAGS
= --line-endings
=crlf
1647 ifndef NO_DIST_INSTALL
1648 $(FINAL_TARGET
)/$(PREF_DIR
):
1651 libs
:: $(FINAL_TARGET
)/$(PREF_DIR
) $(PREF_JS_EXPORTS
)
1653 for i in
$(PREF_JS_EXPORTS
); do \
1654 dest
=$(FINAL_TARGET
)/$(PREF_DIR
)/`basename $$i`; \
1656 $(PYTHON
) $(topsrcdir
)/config
/Preprocessor.py
$(PREF_PPFLAGS
) $(DEFINES
) $(ACDEFINES
) $(XULPPFLAGS
) $$i > $$dest; \
1661 ################################################################################
1662 # Copy each element of AUTOCFG_JS_EXPORTS to $(FINAL_TARGET)/defaults/autoconfig
1664 ifneq ($(AUTOCFG_JS_EXPORTS
),)
1665 $(FINAL_TARGET
)/defaults
/autoconfig
::
1668 ifndef NO_DIST_INSTALL
1669 export:: $(AUTOCFG_JS_EXPORTS
) $(FINAL_TARGET
)/defaults
/autoconfig
1670 $(INSTALL
) $(IFLAGS1
) $^
1674 ################################################################################
1675 # Export the elements of $(XPIDLSRCS) & $(SDK_XPIDLSRCS),
1676 # generating .h and .xpt files and moving them to the appropriate places.
1678 ifneq ($(XPIDLSRCS
)$(SDK_XPIDLSRCS
),)
1680 export:: $(patsubst %.idl
,$(XPIDL_GEN_DIR
)/%.h
, $(XPIDLSRCS
))
1683 XPIDL_MODULE
= $(MODULE
)
1686 ifeq ($(XPIDL_MODULE
),) # we need $(XPIDL_MODULE) to make $(XPIDL_MODULE).xpt
1689 @echo
"*** Error processing XPIDLSRCS:"
1690 @echo
"Please define MODULE or XPIDL_MODULE when defining XPIDLSRCS,"
1691 @echo
"so we have a module name to use when creating MODULE.xpt."
1692 @echo
; sleep
2; false
1695 $(SDK_IDL_DIR
) $(IDL_DIR
)::
1698 # generate .h files from into $(XPIDL_GEN_DIR), then export to $(PUBLIC);
1699 # warn against overriding existing .h file.
1700 $(XPIDL_GEN_DIR
)/.done
:
1701 @if
test ! -d
$(XPIDL_GEN_DIR
); then echo Creating
$(XPIDL_GEN_DIR
)/.done
; rm -rf
$(XPIDL_GEN_DIR
); mkdir
$(XPIDL_GEN_DIR
); fi
1704 # don't depend on $(XPIDL_GEN_DIR), because the modification date changes
1705 # with any addition to the directory, regenerating all .h files -> everything.
1707 $(XPIDL_GEN_DIR
)/%.h
: %.idl
$(XPIDL_COMPILE
) $(XPIDL_GEN_DIR
)/.done
1709 $(ELOG
) $(XPIDL_COMPILE
) -m header
-w
$(XPIDL_FLAGS
) -o
$(XPIDL_GEN_DIR
)/$* $(_VPATH_SRCS
)
1710 @if
test -n
"$(findstring $*.h, $(EXPORTS) $(SDK_HEADERS))"; \
1711 then echo
"*** WARNING: file $*.h generated from $*.idl overrides $(srcdir)/$*.h"; else true
; fi
1714 # generate intermediate .xpt files into $(XPIDL_GEN_DIR), then link
1715 # into $(XPIDL_MODULE).xpt and export it to $(FINAL_TARGET)/components.
1716 $(XPIDL_GEN_DIR
)/%.xpt
: %.idl
$(XPIDL_COMPILE
) $(XPIDL_GEN_DIR
)/.done
1718 $(ELOG
) $(XPIDL_COMPILE
) -m typelib
-w
$(XPIDL_FLAGS
) -e
$@
-d
$(MDDEPDIR
)/$*.pp
$(_VPATH_SRCS
)
1720 # no need to link together if XPIDLSRCS contains only XPIDL_MODULE
1721 ifneq ($(XPIDL_MODULE
).idl
,$(strip $(XPIDLSRCS
)))
1722 $(XPIDL_GEN_DIR
)/$(XPIDL_MODULE
).xpt
: $(patsubst %.idl
,$(XPIDL_GEN_DIR
)/%.xpt
,$(XPIDLSRCS
) $(SDK_XPIDLSRCS
)) $(GLOBAL_DEPS
) $(XPIDL_LINK
)
1723 $(XPIDL_LINK
) $(XPIDL_GEN_DIR
)/$(XPIDL_MODULE
).xpt
$(patsubst %.idl
,$(XPIDL_GEN_DIR
)/%.xpt
,$(XPIDLSRCS
) $(SDK_XPIDLSRCS
))
1724 endif # XPIDL_MODULE.xpt != XPIDLSRCS
1726 libs
:: $(XPIDL_GEN_DIR
)/$(XPIDL_MODULE
).xpt
1727 ifndef NO_DIST_INSTALL
1728 $(INSTALL
) $(IFLAGS1
) $(XPIDL_GEN_DIR
)/$(XPIDL_MODULE
).xpt
$(FINAL_TARGET
)/components
1733 GARBAGE_DIRS
+= $(XPIDL_GEN_DIR
)
1735 endif # XPIDLSRCS || SDK_XPIDLSRCS
1737 ifneq ($(XPIDLSRCS
),)
1738 # export .idl files to $(IDL_DIR)
1739 ifndef NO_DIST_INSTALL
1740 export:: $(XPIDLSRCS
) $(IDL_DIR
)
1741 $(INSTALL
) $(IFLAGS1
) $^
1743 export:: $(patsubst %.idl
,$(XPIDL_GEN_DIR
)/%.h
, $(XPIDLSRCS
)) $(PUBLIC
)
1744 $(INSTALL
) $(IFLAGS1
) $^
1745 endif # NO_DIST_INSTALL
1752 # General rules for exporting idl files.
1754 # WORK-AROUND ONLY, for mozilla/tools/module-deps/bootstrap.pl build.
1755 # Bug to fix idl dependency problems w/o this extra build pass is
1756 # http://bugzilla.mozilla.org/show_bug.cgi?id=145777
1761 export-idl
:: $(SUBMAKEFILES
) $(MAKE_DIRS
)
1763 ifneq ($(XPIDLSRCS
)$(SDK_XPIDLSRCS
),)
1764 ifndef NO_DIST_INSTALL
1765 export-idl
:: $(XPIDLSRCS
) $(SDK_XPIDLSRCS
) $(IDL_DIR
)
1766 $(INSTALL
) $(IFLAGS1
) $^
1769 +$(LOOP_OVER_PARALLEL_DIRS
)
1771 +$(LOOP_OVER_TOOL_DIRS
)
1776 ifneq ($(SDK_XPIDLSRCS
),)
1777 # export .idl files to $(IDL_DIR) & $(SDK_IDL_DIR)
1778 ifndef NO_DIST_INSTALL
1779 export:: $(SDK_XPIDLSRCS
) $(IDL_DIR
)
1780 $(INSTALL
) $(IFLAGS1
) $^
1782 export:: $(SDK_XPIDLSRCS
) $(SDK_IDL_DIR
)
1783 $(INSTALL
) $(IFLAGS1
) $^
1785 export:: $(patsubst %.idl
,$(XPIDL_GEN_DIR
)/%.h
, $(SDK_XPIDLSRCS
)) $(PUBLIC
)
1786 $(INSTALL
) $(IFLAGS1
) $^
1788 export:: $(patsubst %.idl
,$(XPIDL_GEN_DIR
)/%.h
, $(SDK_XPIDLSRCS
)) $(SDK_PUBLIC
)
1789 $(INSTALL
) $(IFLAGS1
) $^
1792 endif # SDK_XPIDLSRCS
1797 ifneq ($(XPIDLSRCS
)$(SDK_XPIDLSRCS
),)
1799 JAVA_XPIDLSRCS
= $(XPIDLSRCS
) $(SDK_XPIDLSRCS
)
1801 # A single IDL file can contain multiple interfaces, which result in multiple
1802 # Java interface files. So use hidden dependency files.
1803 JAVADEPFILES
= $(addprefix $(JAVA_GEN_DIR
)/.
,$(JAVA_XPIDLSRCS
:.idl
=.java.pp
))
1807 GARBAGE_DIRS
+= $(JAVA_GEN_DIR
)
1809 # generate .java files into _javagen/[package name dirs]
1810 _JAVA_GEN_DIR
= $(JAVA_GEN_DIR
)/$(JAVA_IFACES_PKG_NAME
)
1814 $(JAVA_GEN_DIR
)/.
%.java.pp
: %.idl
$(XPIDL_COMPILE
) $(_JAVA_GEN_DIR
)
1816 $(ELOG
) $(XPIDL_COMPILE
) -m java
-w
-I
$(srcdir) -I
$(IDL_DIR
) -o
$(_JAVA_GEN_DIR
)/$* $(_VPATH_SRCS
)
1819 # "Install" generated Java interfaces. We segregate them based on the XPI_NAME.
1820 # If XPI_NAME is not set, install into the "default" directory.
1821 ifneq ($(XPI_NAME
),)
1822 JAVA_INSTALL_DIR
= $(JAVA_DIST_DIR
)/$(XPI_NAME
)
1824 JAVA_INSTALL_DIR
= $(JAVA_DIST_DIR
)/default
1827 $(JAVA_INSTALL_DIR
):
1830 export:: $(JAVA_DIST_DIR
) $(JAVADEPFILES
) $(JAVA_INSTALL_DIR
)
1831 (cd
$(JAVA_GEN_DIR
) && tar $(TAR_CREATE_FLAGS
) - .
) |
(cd
$(JAVA_INSTALL_DIR
) && tar -xf
-)
1833 endif # XPIDLSRCS || SDK_XPIDLSRCS
1834 endif # MOZ_JAVAXPCOM
1836 ################################################################################
1837 # Copy each element of EXTRA_COMPONENTS to $(FINAL_TARGET)/components
1838 ifdef EXTRA_COMPONENTS
1839 libs
:: $(EXTRA_COMPONENTS
)
1840 ifndef NO_DIST_INSTALL
1841 $(INSTALL
) $(IFLAGS1
) $^
$(FINAL_TARGET
)/components
1846 ifdef EXTRA_PP_COMPONENTS
1847 libs
:: $(EXTRA_PP_COMPONENTS
)
1848 ifndef NO_DIST_INSTALL
1850 $(NSINSTALL
) -D
$(FINAL_TARGET
)/components
; \
1852 dest
=$(FINAL_TARGET
)/components
/`basename $$i`; \
1854 $(PYTHON
) $(topsrcdir
)/config
/Preprocessor.py
$(DEFINES
) $(ACDEFINES
) $(XULPPFLAGS
) $$i > $$dest; \
1860 ################################################################################
1861 # Copy each element of EXTRA_JS_MODULES to $(FINAL_TARGET)/modules
1862 ifdef EXTRA_JS_MODULES
1863 libs
:: $(EXTRA_JS_MODULES
)
1864 ifndef NO_DIST_INSTALL
1865 $(INSTALL
) $(IFLAGS1
) $^
$(FINAL_TARGET
)/modules
1870 ifdef EXTRA_PP_JS_MODULES
1871 libs
:: $(EXTRA_PP_JS_MODULES
)
1872 ifndef NO_DIST_INSTALL
1874 $(NSINSTALL
) -D
$(FINAL_TARGET
)/modules
; \
1876 dest
=$(FINAL_TARGET
)/modules
/`basename $$i`; \
1878 $(PYTHON
) $(topsrcdir
)/config
/Preprocessor.py
$(DEFINES
) $(ACDEFINES
) $(XULPPFLAGS
) $$i > $$dest; \
1884 ################################################################################
1887 ifneq (,$(SDK_LIBRARY
))
1891 ifndef NO_DIST_INSTALL
1892 libs
:: $(SDK_LIBRARY
) $(SDK_LIB_DIR
)
1893 $(INSTALL
) $(IFLAGS2
) $^
1898 ifneq (,$(SDK_BINARY
))
1902 ifndef NO_DIST_INSTALL
1903 libs
:: $(SDK_BINARY
) $(SDK_BIN_DIR
)
1904 $(INSTALL
) $(IFLAGS2
) $^
1909 ################################################################################
1912 JAR_MANIFEST
:= $(srcdir)/jar.mn
1916 +$(LOOP_OVER_PARALLEL_DIRS
)
1918 +$(LOOP_OVER_TOOL_DIRS
)
1920 $(FINAL_TARGET
)/chrome
:
1923 ifneq (,$(wildcard $(JAR_MANIFEST
)))
1924 ifndef NO_DIST_INSTALL
1925 libs realchrome
:: $(CHROME_DEPS
) $(FINAL_TARGET
)/chrome
1926 $(PYTHON
) $(MOZILLA_DIR
)/config
/JarMaker.py \
1927 $(QUIET
) -j
$(FINAL_TARGET
)/chrome \
1928 $(MAKE_JARS_FLAGS
) $(XULPPFLAGS
) $(DEFINES
) $(ACDEFINES
) \
1933 ifneq ($(DIST_FILES
),)
1937 libs
:: $(DIST_FILES
) $(DIST
)/bin
1939 for f in
$(DIST_FILES
); do \
1940 dest
=$(FINAL_TARGET
)/`basename $$f`; \
1942 $(PYTHON
) $(MOZILLA_DIR
)/config
/Preprocessor.py \
1943 $(XULAPP_DEFINES
) $(DEFINES
) $(ACDEFINES
) $(XULPPFLAGS
) \
1944 $(srcdir)/$$f > $$dest; \
1948 ifneq ($(DIST_CHROME_FILES
),)
1949 libs
:: $(DIST_CHROME_FILES
)
1951 for f in
$(DIST_CHROME_FILES
); do \
1952 dest
=$(FINAL_TARGET
)/chrome
/`basename $$f`; \
1954 $(PYTHON
) $(MOZILLA_DIR
)/config
/Preprocessor.py \
1955 $(XULAPP_DEFINES
) $(DEFINES
) $(ACDEFINES
) $(XULPPFLAGS
) \
1956 $(srcdir)/$$f > $$dest; \
1960 ifneq ($(XPI_PKGNAME
),)
1964 @echo
"Stripping $(XPI_PKGNAME) package directory..."
1965 @echo
$(FINAL_TARGET
)
1966 @cd
$(FINAL_TARGET
) && find .
! -type d \
1976 ! -name
"*.properties" \
1987 $(PLATFORM_EXCLUDE_LIST
) \
1988 -exec
$(STRIP
) $(STRIP_FLAGS
) {} >/dev
/null
2>&1 \
;
1991 @echo
"Packaging $(XPI_PKGNAME).xpi..."
1992 cd
$(FINAL_TARGET
) && $(ZIP
) -qr ..
/$(XPI_PKGNAME
).xpi
*
1995 ifdef INSTALL_EXTENSION_ID
1997 $(error XPI_NAME must be set for INSTALL_EXTENSION_ID
)
2001 $(RM
) -rf
"$(DIST)/bin/extensions/$(INSTALL_EXTENSION_ID)"
2002 $(NSINSTALL
) -D
"$(DIST)/bin/extensions/$(INSTALL_EXTENSION_ID)"
2003 cd
$(FINAL_TARGET
) && tar $(TAR_CREATE_FLAGS
) - . |
(cd
"../../bin/extensions/$(INSTALL_EXTENSION_ID)" && tar -xf
-)
2007 ifneq (,$(filter flat symlink
,$(MOZ_CHROME_FILE_FORMAT
)))
2008 _JAR_REGCHROME_DISABLE_JAR
=1
2010 _JAR_REGCHROME_DISABLE_JAR
=0
2013 REGCHROME
= $(PERL
) -I
$(MOZILLA_DIR
)/config
$(MOZILLA_DIR
)/config
/add-chrome.pl \
2014 $(if
$(filter gtk2
,$(MOZ_WIDGET_TOOLKIT
)),-x
) \
2015 $(if
$(CROSS_COMPILE
),-o
$(OS_ARCH
)) $(FINAL_TARGET
)/chrome
/installed-chrome.txt \
2016 $(_JAR_REGCHROME_DISABLE_JAR
)
2018 REGCHROME_INSTALL
= $(PERL
) -I
$(MOZILLA_DIR
)/config
$(MOZILLA_DIR
)/config
/add-chrome.pl \
2019 $(if
$(filter gtk2
,$(MOZ_WIDGET_TOOLKIT
)),-x
) \
2020 $(if
$(CROSS_COMPILE
),-o
$(OS_ARCH
)) $(DESTDIR
)$(mozappdir
)/chrome
/installed-chrome.txt \
2021 $(_JAR_REGCHROME_DISABLE_JAR
)
2024 #############################################################################
2026 #############################################################################
2027 ifdef COMPILER_DEPEND
2029 @echo
"$(MAKE): No need to run depend target.\
2030 Using compiler-based depend." 1>&2
2031 ifeq ($(GNU_CC
)$(GNU_CXX
),)
2033 @echo
"`echo '$(MAKE):'|sed 's/./ /g'`"\
2034 '(Compiler-based depend was turned on by "--enable-md".)' 1>&2
2037 @space
="`echo '$(MAKE): '|sed 's/./ /g'`";\
2038 echo
"$$space"'Since you are using a GNU compiler,\
2039 it is on by default.' 1>&2; \
2040 echo
"$$space"'To turn it off, pass --disable-md to configure.' 1>&2
2043 else # ! COMPILER_DEPEND
2045 ifndef MOZ_AUTO_DEPS
2047 define MAKE_DEPS_NOAUTO
2048 $(MKDEPEND
) -w1024
-o
'.$(OBJ_SUFFIX)' -f-
$(DEFINES
) $(ACDEFINES
) $(INCLUDES
) $< 2>/dev
/null | sed
-e
"s|^[^ ]*/||" > $@
2051 $(MDDEPDIR
)/%.pp
: %.c
2053 @
$(MAKE_DEPS_NOAUTO
)
2055 $(MDDEPDIR
)/%.pp
: %.
cpp
2057 @
$(MAKE_DEPS_NOAUTO
)
2059 $(MDDEPDIR
)/%.pp
: %.s
2061 @
$(MAKE_DEPS_NOAUTO
)
2063 ifneq (,$(OBJS
)$(XPIDLSRCS
)$(SDK_XPIDLSRCS
)$(SIMPLE_PROGRAMS
))
2064 depend
:: $(SUBMAKEFILES
) $(MAKE_DIRS
) $(MDDEPFILES
)
2066 depend
:: $(SUBMAKEFILES
)
2068 +$(LOOP_OVER_PARALLEL_DIRS
)
2070 +$(LOOP_OVER_TOOL_DIRS
)
2072 dependclean
:: $(SUBMAKEFILES
)
2074 +$(LOOP_OVER_PARALLEL_DIRS
)
2076 +$(LOOP_OVER_TOOL_DIRS
)
2078 endif # MOZ_AUTO_DEPS
2080 endif # COMPILER_DEPEND
2083 #############################################################################
2084 # MDDEPDIR is the subdirectory where all the dependency files are placed.
2085 # This uses a make rule (instead of a macro) to support parallel
2086 # builds (-jN). If this were done in the LOOP_OVER_DIRS macro, two
2087 # processes could simultaneously try to create the same directory.
2089 # We use $(CURDIR) in the rule's target to ensure that we don't find
2090 # a dependency directory in the source tree via VPATH (perhaps from
2091 # a previous build in the source tree) and thus neglect to create a
2092 # dependency directory in the object directory, where we really need
2095 $(CURDIR
)/$(MDDEPDIR
):
2096 @if
test ! -d
$@
; then echo Creating
$@
; rm -rf
$@
; mkdir
$@
; else true
; fi
2098 ifneq (,$(filter-out all chrome default
export realchrome tools
clean clobber clobber_all
distclean realclean,$(MAKECMDGOALS
)))
2099 ifneq (,$(OBJS
)$(XPIDLSRCS
)$(SDK_XPIDLSRCS
)$(SIMPLE_PROGRAMS
))
2100 MDDEPEND_FILES
:= $(strip $(wildcard $(MDDEPDIR
)/*.pp
))
2102 ifneq (,$(MDDEPEND_FILES
))
2104 # The script mddepend.pl checks the dependencies and writes to stdout
2105 # one rule to force out-of-date objects. For example,
2106 # foo.o boo.o: FORCE
2107 # The script has an advantage over including the *.pp files directly
2108 # because it handles the case when header files are removed from the build.
2109 # 'make' would complain that there is no way to build missing headers.
2110 ifeq (,$(MAKE_RESTARTS
))
2111 $(MDDEPDIR
)/.
all.pp
: FORCE
2112 @
$(PERL
) $(BUILD_TOOLS
)/mddepend.pl
$@
$(MDDEPEND_FILES
)
2114 -include $(MDDEPDIR
)/.
all.pp
2116 include $(MDDEPEND_FILES
)
2122 #############################################################################
2124 -include $(topsrcdir
)/$(MOZ_BUILD_APP
)/app-rules.mk
2125 -include $(MY_RULES
)
2128 # This speeds up gmake's processing if these files don't exist.
2130 $(MY_CONFIG
) $(MY_RULES
):
2134 # Generate Emacs tags in a file named TAGS if ETAGS was set in $(MY_CONFIG)
2138 ifneq ($(CSRCS
)$(CPPSRCS
)$(HEADERS
),)
2140 TAGS
:: $(CSRCS
) $(CPPSRCS
) $(HEADERS
)
2141 $(ETAGS
) $(CSRCS
) $(CPPSRCS
) $(HEADERS
)
2145 ################################################################################
2146 # Special gmake rules.
2147 ################################################################################
2151 # Disallow parallel builds with MSVC < 8
2153 ifneq (,$(filter 1200 1300 1310,$(_MSC_VER
)))
2158 # Re-define the list of default suffixes, so gmake won't have to churn through
2159 # hundreds of built-in suffix rules for stuff we don't need.
2164 # Fake targets. Always run these rules, even if a file/directory with that
2165 # name already exists.
2167 .PHONY
: all all_platforms alltags boot checkout chrome realchrome
clean clobber clobber_all
export install libs makefiles
realclean run_viewer run_apprunner tools
$(DIRS
) $(TOOL_DIRS
) FORCE
check check-interactive check-one
2169 # Used as a dependency to force targets to rebuild
2172 # Delete target if error occurs when building target
2175 # Properly set LIBPATTERNS for the platform
2176 .LIBPATTERNS
= $(if
$(IMPORT_LIB_SUFFIX
),$(LIB_PREFIX
)%.
$(IMPORT_LIB_SUFFIX
)) $(LIB_PREFIX
)%.
$(LIB_SUFFIX
) $(DLL_PREFIX
)%$(DLL_SUFFIX
)
2180 TAGS
: $(SUBMAKEFILES
) $(CSRCS
) $(CPPSRCS
) $(wildcard *.h
)
2181 -etags
$(CSRCS
) $(CPPSRCS
) $(wildcard *.h
)
2182 +$(LOOP_OVER_PARALLEL_DIRS
)
2192 @
$(foreach tier
,$(TIERS
),echo
'$(tier):'; echo
' dirs: $(tier_$(tier)_dirs)'; echo
' staticdirs: $(tier_$(tier)_staticdirs)'; )
2203 echo-requires-recursive
::
2204 ifdef _REPORT_ALL_DIRS
2205 @echo
$(subst $(topsrcdir
)/,,$(srcdir)): $(MODULE
): $(REQUIRES
)
2207 @
$(if
$(REQUIRES
),echo
$(subst $(topsrcdir
)/,,$(srcdir)): $(MODULE
): $(REQUIRES
))
2209 +$(LOOP_OVER_PARALLEL_DIRS
)
2213 @
$(topsrcdir
)/build
/unix
/print-depth-path.sh
2216 @
$(topsrcdir
)/build
/package
/rpm
/print-module-name.sh
2218 echo-module-filelist
:
2219 @
$(topsrcdir
)/build
/package
/rpm
/print-module-filelist.sh
2222 ifneq (,$(filter $(PROGRAM
) $(HOST_PROGRAM
) $(SIMPLE_PROGRAMS
) $(HOST_LIBRARY
) $(LIBRARY
) $(SHARED_LIBRARY
),$(TARGETS
)))
2223 @echo
--------------------------------------------------------------------------------
2224 @echo
"PROGRAM = $(PROGRAM)"
2225 @echo
"SIMPLE_PROGRAMS = $(SIMPLE_PROGRAMS)"
2226 @echo
"LIBRARY = $(LIBRARY)"
2227 @echo
"SHARED_LIBRARY = $(SHARED_LIBRARY)"
2228 @echo
"SHARED_LIBRARY_LIBS = $(SHARED_LIBRARY_LIBS)"
2229 @echo
"LIBS = $(LIBS)"
2230 @echo
"DEF_FILE = $(DEF_FILE)"
2231 @echo
"IMPORT_LIBRARY = $(IMPORT_LIBRARY)"
2232 @echo
"STATIC_LIBS = $(STATIC_LIBS)"
2233 @echo
"SHARED_LIBS = $(SHARED_LIBS)"
2234 @echo
"EXTRA_DSO_LIBS = $(EXTRA_DSO_LIBS)"
2235 @echo
"EXTRA_DSO_LDOPTS = $(EXTRA_DSO_LDOPTS)"
2236 @echo
"DEPENDENT_LIBS = $(DEPENDENT_LIBS)"
2237 @echo
--------------------------------------------------------------------------------
2239 +$(LOOP_OVER_PARALLEL_DIRS
)
2243 @echo
"MOZ_BUILD_ROOT = $(MOZ_BUILD_ROOT)"
2244 @echo
"MOZ_WIDGET_TOOLKIT = $(MOZ_WIDGET_TOOLKIT)"
2246 @echo
"CXX = $(CXX)"
2247 @echo
"CCC = $(CCC)"
2248 @echo
"CPP = $(CPP)"
2251 @echo
"IMPLIB = $(IMPLIB)"
2252 @echo
"FILTER = $(FILTER)"
2253 @echo
"MKSHLIB = $(MKSHLIB)"
2254 @echo
"MKCSHLIB = $(MKCSHLIB)"
2256 @echo
"CFLAGS = $(CFLAGS)"
2257 @echo
"OS_CFLAGS = $(OS_CFLAGS)"
2258 @echo
"COMPILE_CFLAGS = $(COMPILE_CFLAGS)"
2259 @echo
"CXXFLAGS = $(CXXFLAGS)"
2260 @echo
"OS_CXXFLAGS = $(OS_CXXFLAGS)"
2261 @echo
"COMPILE_CXXFLAGS = $(COMPILE_CXXFLAGS)"
2262 @echo
"COMPILE_CMFLAGS = $(COMPILE_CMFLAGS)"
2263 @echo
"COMPILE_CMMFLAGS = $(COMPILE_CMMFLAGS)"
2264 @echo
"LDFLAGS = $(LDFLAGS)"
2265 @echo
"OS_LDFLAGS = $(OS_LDFLAGS)"
2266 @echo
"DSO_LDOPTS = $(DSO_LDOPTS)"
2267 @echo
"OS_INCLUDES = $(OS_INCLUDES)"
2268 @echo
"OS_LIBS = $(OS_LIBS)"
2269 @echo
"EXTRA_LIBS = $(EXTRA_LIBS)"
2270 @echo
"BIN_FLAGS = $(BIN_FLAGS)"
2271 @echo
"INCLUDES = $(INCLUDES)"
2272 @echo
"DEFINES = $(DEFINES)"
2273 @echo
"ACDEFINES = $(ACDEFINES)"
2274 @echo
"BIN_SUFFIX = $(BIN_SUFFIX)"
2275 @echo
"LIB_SUFFIX = $(LIB_SUFFIX)"
2276 @echo
"DLL_SUFFIX = $(DLL_SUFFIX)"
2277 @echo
"IMPORT_LIB_SUFFIX = $(IMPORT_LIB_SUFFIX)"
2278 @echo
"INSTALL = $(INSTALL)"
2281 @echo
"HOST_CC = $(HOST_CC)"
2282 @echo
"HOST_CXX = $(HOST_CXX)"
2283 @echo
"HOST_CFLAGS = $(HOST_CFLAGS)"
2284 @echo
"HOST_LDFLAGS = $(HOST_LDFLAGS)"
2285 @echo
"HOST_LIBS = $(HOST_LIBS)"
2286 @echo
"HOST_EXTRA_LIBS = $(HOST_EXTRA_LIBS)"
2287 @echo
"HOST_EXTRA_DEPS = $(HOST_EXTRA_DEPS)"
2288 @echo
"HOST_PROGRAM = $(HOST_PROGRAM)"
2289 @echo
"HOST_OBJS = $(HOST_OBJS)"
2290 @echo
"HOST_PROGOBJS = $(HOST_PROGOBJS)"
2291 @echo
"HOST_LIBRARY = $(HOST_LIBRARY)"
2294 @echo
"Build Modules = $(BUILD_MODULES)"
2295 @echo
"Module dirs = $(BUILD_MODULE_DIRS)"
2298 ifneq (,$(filter $(PROGRAM
) $(SIMPLE_PROGRAMS
) $(LIBRARY
) $(SHARED_LIBRARY
),$(TARGETS
)))
2299 zip
$(DEPTH
)/makefiles
$(subst $(topsrcdir
),$(MOZ_SRC
)/mozilla
,$(srcdir)/Makefile.in
)
2301 +$(LOOP_OVER_PARALLEL_DIRS
)
2306 $(DOXYGEN
) $(DEPTH
)/config
/doxygen.cfg
2308 check:: $(SUBMAKEFILES
) $(MAKE_DIRS
)
2309 +$(LOOP_OVER_PARALLEL_DIRS
)
2311 +$(LOOP_OVER_TOOL_DIRS
)