/[jscoverage]/trunk/js/config/rules.mk
ViewVC logotype

Diff of /trunk/js/config/rules.mk

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 459 by siliconforks, Tue Dec 9 23:37:53 2008 UTC revision 460 by siliconforks, Sat Sep 26 23:15:22 2009 UTC
# Line 38  Line 38 
38  # the terms of any one of the MPL, the GPL or the LGPL.  # the terms of any one of the MPL, the GPL or the LGPL.
39  #  #
40  # ***** END LICENSE BLOCK *****  # ***** END LICENSE BLOCK *****
 NO_DIST_INSTALL = 1  
   
41  ifndef topsrcdir  ifndef topsrcdir
42  topsrcdir               = $(DEPTH)  topsrcdir               = $(DEPTH)
43  endif  endif
# Line 64  Line 62 
62  EXEC                    = exec  EXEC                    = exec
63  endif  endif
64    
65    # Don't copy xulrunner files at install time, when using system xulrunner
66    ifdef SYSTEM_LIBXUL
67      SKIP_COPY_XULRUNNER=1
68    endif
69    
70  # ELOG prints out failed command when building silently (gmake -s).  # ELOG prints out failed command when building silently (gmake -s).
71  ifneq (,$(findstring -s,$(MAKEFLAGS)))  ifneq (,$(findstring -s,$(MAKEFLAGS)))
72    ELOG := $(EXEC) sh $(BUILD_TOOLS)/print-failed-commands.sh    ELOG := $(EXEC) sh $(BUILD_TOOLS)/print-failed-commands.sh
# Line 115  Line 118 
118  EXTRA_DSO_LIBS  := $(call EXPAND_MOZLIBNAME,$(EXTRA_DSO_LIBS))  EXTRA_DSO_LIBS  := $(call EXPAND_MOZLIBNAME,$(EXTRA_DSO_LIBS))
119  endif  endif
120    
121    ################################################################################
122    # Testing frameworks support
123    ################################################################################
124    
125    ifdef ENABLE_TESTS
126    
127    ifdef XPCSHELL_TESTS
128    ifndef MODULE
129    $(error Must define MODULE when defining XPCSHELL_TESTS.)
130    endif
131    
132    testxpcobjdir = $(DEPTH)/_tests/xpcshell
133    
134    # Test file installation
135    ifdef NSINSTALL_BIN
136    # nsinstall in moztools can't recursively copy directories, so use nsinstall.py
137    TEST_INSTALLER = $(PYTHON) $(topsrcdir)/config/nsinstall.py
138    else
139    TEST_INSTALLER = $(INSTALL)
140    endif
141    
142    define _INSTALL_TESTS
143    $(TEST_INSTALLER) $(wildcard $(srcdir)/$(dir)/*) $(testxpcobjdir)/$(MODULE)/$(dir)
144    
145    endef # do not remove the blank line!
146    
147    SOLO_FILE ?= $(error Specify a test filename in SOLO_FILE when using check-interactive or check-one)
148    
149    libs::
150            $(foreach dir,$(XPCSHELL_TESTS),$(_INSTALL_TESTS))
151            $(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl \
152              $(testxpcobjdir)/all-test-dirs.list \
153              $(addprefix $(MODULE)/,$(XPCSHELL_TESTS))
154    
155    testxpcsrcdir = $(topsrcdir)/testing/xpcshell
156    
157    # Execute all tests in the $(XPCSHELL_TESTS) directories.
158    # See also testsuite-targets.mk 'xpcshell-tests' target for global execution.
159    xpcshell-tests:
160            $(PYTHON) -u \
161              $(testxpcsrcdir)/runxpcshelltests.py \
162              $(DIST)/bin/xpcshell \
163              $(foreach dir,$(XPCSHELL_TESTS),$(testxpcobjdir)/$(MODULE)/$(dir))
164    
165    # Execute a single test, specified in $(SOLO_FILE), but don't automatically
166    # start the test. Instead, present the xpcshell prompt so the user can
167    # attach a debugger and then start the test.
168    check-interactive:
169            $(PYTHON) -u \
170              $(testxpcsrcdir)/runxpcshelltests.py \
171              --test-path=$(SOLO_FILE) \
172              --interactive \
173              $(DIST)/bin/xpcshell \
174              $(foreach dir,$(XPCSHELL_TESTS),$(testxpcobjdir)/$(MODULE)/$(dir))
175    
176    # Execute a single test, specified in $(SOLO_FILE)
177    check-one:
178            $(PYTHON) -u \
179              $(testxpcsrcdir)/runxpcshelltests.py \
180              --test-path=$(SOLO_FILE) \
181              $(DIST)/bin/xpcshell \
182              $(foreach dir,$(XPCSHELL_TESTS),$(testxpcobjdir)/$(MODULE)/$(dir))
183    
184    endif # XPCSHELL_TESTS
185    
186    ifdef CPP_UNIT_TESTS
187    
188    # Compile the tests to $(DIST)/bin.  Make lots of niceties available by default
189    # through TestHarness.h, by modifying the list of includes and the libs against
190    # which stuff links.
191    CPPSRCS += $(CPP_UNIT_TESTS)
192    SIMPLE_PROGRAMS += $(CPP_UNIT_TESTS:.cpp=$(BIN_SUFFIX))
193    REQUIRES += testing xpcom
194    LIBS += $(XPCOM_GLUE_LDOPTS) $(NSPR_LIBS)
195    
196    # ...and run them the usual way
197    check::
198            @$(EXIT_ON_ERROR) \
199              for f in $(subst .cpp,,$(CPP_UNIT_TESTS)); do \
200                XPCOM_DEBUG_BREAK=stack-and-abort $(RUN_TEST_PROGRAM) $(DIST)/bin/$$f; \
201              done
202    
203    endif # CPP_UNIT_TESTS
204    
205    .PHONY: check xpcshell-tests check-interactive check-one
206    
207    endif # ENABLE_TESTS
208    
209    
210  #  #
211  # Library rules  # Library rules
212  #  #
# Line 201  Line 293 
293  ifndef GNU_CC  ifndef GNU_CC
294    
295  #  #
296  # All C++ files share a PDB file per directory. For parallel builds, this PDB  # Unless we're building SIMPLE_PROGRAMS, all C++ files share a PDB file per
297  # file is shared and locked by MSPDBSRV.EXE, starting with MSVC8 SP1. If  # directory. For parallel builds, this PDB file is shared and locked by
298  # you're using MSVC 7.1 or MSVC8 without SP1, don't do parallel builds.  # MSPDBSRV.EXE, starting with MSVC8 SP1. If you're using MSVC 7.1 or MSVC8
299    # without SP1, don't do parallel builds.
300  #  #
301  # The final PDB for libraries and programs is created by the linker and uses  # The final PDB for libraries and programs is created by the linker and uses
302  # a different name from the single PDB file created by the compiler. See  # a different name from the single PDB file created by the compiler. See
303  # bug 462740.  # bug 462740.
304  #  #
305    
306    ifdef SIMPLE_PROGRAMS
307    COMPILE_PDBFILE = $(basename $(@F)).pdb
308    else
309  COMPILE_PDBFILE = generated.pdb  COMPILE_PDBFILE = generated.pdb
310    endif
311    
312  LINK_PDBFILE = $(basename $(@F)).pdb  LINK_PDBFILE = $(basename $(@F)).pdb
313  ifdef MOZ_DEBUG  ifdef MOZ_DEBUG
314  CODFILE=$(basename $(@F)).cod  CODFILE=$(basename $(@F)).cod
# Line 327  Line 426 
426  # the Solaris WorkShop template repository cache.  it occasionally can get  # the Solaris WorkShop template repository cache.  it occasionally can get
427  # out of sync, so targets like clobber should kill it.  # out of sync, so targets like clobber should kill it.
428  #  #
429  ifeq ($(OS_ARCH),SunOS)  ifeq ($(SOLARIS_SUNPRO_CXX),1)
 ifeq ($(GNU_CXX),)  
430  GARBAGE_DIRS += SunWS_cache  GARBAGE_DIRS += SunWS_cache
431  endif  endif
 endif  
432    
433  ifeq ($(OS_ARCH),OpenVMS)  ifeq ($(OS_ARCH),OpenVMS)
434  GARBAGE                 += $(wildcard *.*_defines)  GARBAGE                 += $(wildcard *.*_defines)
# Line 362  Line 459 
459  UPDATE_TITLE_tools = sed -e "s!Y!tools in $(shell $(BUILD_TOOLS)/print-depth-path.sh)/$*!" $(MOZILLA_DIR)/config/xterm.str;  UPDATE_TITLE_tools = sed -e "s!Y!tools in $(shell $(BUILD_TOOLS)/print-depth-path.sh)/$*!" $(MOZILLA_DIR)/config/xterm.str;
460  endif  endif
461    
462    ifneq (,$(strip $(DIRS)))
463  LOOP_OVER_DIRS = \  LOOP_OVER_DIRS = \
464      @$(EXIT_ON_ERROR) \      @$(EXIT_ON_ERROR) \
465      $(foreach dir,$(DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; ) true      $(foreach dir,$(DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; )
466    endif
467    
468  # we only use this for the makefiles target and other stuff that doesn't matter  # we only use this for the makefiles target and other stuff that doesn't matter
469    ifneq (,$(strip $(PARALLEL_DIRS)))
470  LOOP_OVER_PARALLEL_DIRS = \  LOOP_OVER_PARALLEL_DIRS = \
471      @$(EXIT_ON_ERROR) \      @$(EXIT_ON_ERROR) \
472      $(foreach dir,$(PARALLEL_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; ) true      $(foreach dir,$(PARALLEL_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; )
473    endif
474    
475    ifneq (,$(strip $(STATIC_DIRS)))
476  LOOP_OVER_STATIC_DIRS = \  LOOP_OVER_STATIC_DIRS = \
477      @$(EXIT_ON_ERROR) \      @$(EXIT_ON_ERROR) \
478      $(foreach dir,$(STATIC_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; ) true      $(foreach dir,$(STATIC_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; )
479    endif
480    
481    ifneq (,$(strip $(TOOL_DIRS)))
482  LOOP_OVER_TOOL_DIRS = \  LOOP_OVER_TOOL_DIRS = \
483      @$(EXIT_ON_ERROR) \      @$(EXIT_ON_ERROR) \
484      $(foreach dir,$(TOOL_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; ) true      $(foreach dir,$(TOOL_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; )
485    endif
486    
487  ifdef PARALLEL_DIRS  ifdef PARALLEL_DIRS
488  # create a bunch of fake targets for order-only processing  # create a bunch of fake targets for order-only processing
# Line 606  Line 711 
711  # default rule before including rules.mk  # default rule before including rules.mk
712  ifndef SUPPRESS_DEFAULT_RULES  ifndef SUPPRESS_DEFAULT_RULES
713  ifdef TIERS  ifdef TIERS
   
 DIRS += $(foreach tier,$(TIERS),$(tier_$(tier)_dirs))  
 STATIC_DIRS += $(foreach tier,$(TIERS),$(tier_$(tier)_staticdirs))  
   
714  default all alldep::  default all alldep::
715          $(EXIT_ON_ERROR) \          $(EXIT_ON_ERROR) \
716          $(foreach tier,$(TIERS),$(MAKE) tier_$(tier); ) true          $(foreach tier,$(TIERS),$(MAKE) tier_$(tier); ) true
# Line 617  Line 718 
718  else  else
719    
720  default all::  default all::
721          @$(EXIT_ON_ERROR) \  ifneq (,$(strip $(STATIC_DIRS)))
722          $(foreach dir,$(STATIC_DIRS),$(MAKE) -C $(dir); ) true          $(foreach dir,$(STATIC_DIRS),$(MAKE) -C $(dir); )
723    endif
724          $(MAKE) export          $(MAKE) export
725          $(MAKE) libs          $(MAKE) libs
726          $(MAKE) tools          $(MAKE) tools
# Line 720  Line 822 
822    
823  tools:: $(SUBMAKEFILES) $(MAKE_DIRS)  tools:: $(SUBMAKEFILES) $(MAKE_DIRS)
824          +$(LOOP_OVER_DIRS)          +$(LOOP_OVER_DIRS)
825  ifdef TOOL_DIRS  ifneq (,$(strip $(TOOL_DIRS)))
826          @$(EXIT_ON_ERROR) \          @$(EXIT_ON_ERROR) \
827          $(foreach dir,$(TOOL_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) libs; ) true          $(foreach dir,$(TOOL_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) libs; )
828  endif  endif
829    
830  #  #
# Line 749  Line 851 
851  HOST_LIBS_DEPS = $(filter %.$(LIB_SUFFIX), $(HOST_LIBS))  HOST_LIBS_DEPS = $(filter %.$(LIB_SUFFIX), $(HOST_LIBS))
852  DSO_LDOPTS_DEPS = $(EXTRA_DSO_LIBS) $(filter %.$(LIB_SUFFIX), $(EXTRA_DSO_LDOPTS))  DSO_LDOPTS_DEPS = $(EXTRA_DSO_LIBS) $(filter %.$(LIB_SUFFIX), $(EXTRA_DSO_LDOPTS))
853    
854    # Dependancies which, if modified, should cause everything to rebuild
855    GLOBAL_DEPS += Makefile Makefile.in $(DEPTH)/config/autoconf.mk $(topsrcdir)/config/config.mk
856    
857  ##############################################  ##############################################
858  ifdef PARALLEL_DIRS  ifdef PARALLEL_DIRS
859  libs:: $(PARALLEL_DIRS_libs)  libs:: $(PARALLEL_DIRS_libs)
# Line 829  Line 934 
934  # in both stages so you can do depend builds with PGO.  # in both stages so you can do depend builds with PGO.
935  ifdef SHARED_LIBRARY  ifdef SHARED_LIBRARY
936  $(SHARED_LIBRARY): FORCE  $(SHARED_LIBRARY): FORCE
 BINARY_BASENAME = $(SHARED_LIBRARY:$(DLL_SUFFIX)=)  
937  endif  endif
938  ifdef PROGRAM  ifdef PROGRAM
939  $(PROGRAM): FORCE  $(PROGRAM): FORCE
 BINARY_BASENAME = $(PROGRAM:$(BIN_SUFFIX)=)  
940  endif  endif
941    
942  ifdef MOZ_PROFILE_USE  ifdef MOZ_PROFILE_USE
943  # In the second pass, we need to merge the pgc files into the pgd file.  # In the second pass, we need to merge the pgc files into the pgd file.
944  # The compiler would do this for us automatically if they were in the right  # The compiler would do this for us automatically if they were in the right
945  # place, but they're in dist/bin.  # place, but they're in dist/bin.
946  ifdef BINARY_BASENAME  ifneq (,$(SHARED_LIBRARY)$(PROGRAM))
947  export::  export::
948    ifdef PROGRAM
949            $(PYTHON) $(topsrcdir)/build/win32/pgomerge.py \
950              $(PROGRAM:$(BIN_SUFFIX)=) $(DIST)/bin
951    endif
952    ifdef SHARED_LIBRARY
953          $(PYTHON) $(topsrcdir)/build/win32/pgomerge.py \          $(PYTHON) $(topsrcdir)/build/win32/pgomerge.py \
954            $(BINARY_BASENAME) $(DIST)/bin            $(LIBRARY_NAME) $(DIST)/bin
955    endif
956  endif  endif
957  endif # MOZ_PROFILE_USE  endif # MOZ_PROFILE_USE
958  endif # WINNT_  endif # WINNT_
# Line 892  Line 1001 
1001  # PROGRAM = Foo  # PROGRAM = Foo
1002  # creates OBJS, links with LIBS to create Foo  # creates OBJS, links with LIBS to create Foo
1003  #  #
1004  $(PROGRAM): $(PROGOBJS) $(LIBS_DEPS) $(EXTRA_DEPS) $(EXE_DEF_FILE) $(RESFILE) Makefile Makefile.in  $(PROGRAM): $(PROGOBJS) $(LIBS_DEPS) $(EXTRA_DEPS) $(EXE_DEF_FILE) $(RESFILE) $(GLOBAL_DEPS)
1005  ifeq (WINCE,$(OS_ARCH))  ifeq (WINCE,$(OS_ARCH))
1006          $(LD) -NOLOGO -OUT:$@ $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(PROGOBJS) $(RESFILE) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)          $(LD) -NOLOGO -OUT:$@ $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(PROGOBJS) $(RESFILE) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
1007  else  else
# Line 930  Line 1039 
1039  endif  endif
1040  endif # BeOS  endif # BeOS
1041    
1042  $(HOST_PROGRAM): $(HOST_PROGOBJS) $(HOST_LIBS_DEPS) $(HOST_EXTRA_DEPS) Makefile Makefile.in  $(HOST_PROGRAM): $(HOST_PROGOBJS) $(HOST_LIBS_DEPS) $(HOST_EXTRA_DEPS) $(GLOBAL_DEPS)
1043  ifeq (WINCE,$(OS_ARCH))  ifeq (WINCE,$(OS_ARCH))
1044          $(HOST_LD) -NOLOGO -OUT:$@ $(HOST_OBJS) $(WIN32_EXE_LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)          $(HOST_LD) -NOLOGO -OUT:$@ $(HOST_OBJS) $(WIN32_EXE_LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
1045  else  else
# Line 959  Line 1068 
1068  # SIMPLE_PROGRAMS = Foo Bar  # SIMPLE_PROGRAMS = Foo Bar
1069  # creates Foo.o Bar.o, links with LIBS to create Foo, Bar.  # creates Foo.o Bar.o, links with LIBS to create Foo, Bar.
1070  #  #
1071  $(SIMPLE_PROGRAMS): %$(BIN_SUFFIX): %.$(OBJ_SUFFIX) $(LIBS_DEPS) $(EXTRA_DEPS) Makefile Makefile.in  $(SIMPLE_PROGRAMS): %$(BIN_SUFFIX): %.$(OBJ_SUFFIX) $(LIBS_DEPS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
1072  ifeq (WINCE,$(OS_ARCH))  ifeq (WINCE,$(OS_ARCH))
1073          $(LD) -nologo  -entry:main -out:$@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)          $(LD) -nologo  -entry:main -out:$@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
1074  else  else
# Line 987  Line 1096 
1096          $(MOZ_POST_PROGRAM_COMMAND) $@          $(MOZ_POST_PROGRAM_COMMAND) $@
1097  endif  endif
1098    
1099  $(HOST_SIMPLE_PROGRAMS): host_%$(HOST_BIN_SUFFIX): host_%.$(OBJ_SUFFIX) $(HOST_LIBS_DEPS) $(HOST_EXTRA_DEPS) Makefile Makefile.in  $(HOST_SIMPLE_PROGRAMS): host_%$(HOST_BIN_SUFFIX): host_%.$(OBJ_SUFFIX) $(HOST_LIBS_DEPS) $(HOST_EXTRA_DEPS) $(GLOBAL_DEPS)
1100  ifeq (WINCE,$(OS_ARCH))  ifeq (WINCE,$(OS_ARCH))
1101          $(HOST_LD) -NOLOGO -OUT:$@ $(WIN32_EXE_LDFLAGS) $< $(HOST_LIBS) $(HOST_EXTRA_LIBS)          $(HOST_LD) -NOLOGO -OUT:$@ $(WIN32_EXE_LDFLAGS) $< $(HOST_LIBS) $(HOST_EXTRA_LIBS)
1102  else  else
# Line 1053  Line 1162 
1162  EXTRA_DEPS += $(DTRACE_PROBE_OBJ)  EXTRA_DEPS += $(DTRACE_PROBE_OBJ)
1163  endif  endif
1164    
1165  $(LIBRARY): $(OBJS) $(LOBJS) $(SHARED_LIBRARY_LIBS) $(EXTRA_DEPS) Makefile Makefile.in  $(LIBRARY): $(OBJS) $(LOBJS) $(SHARED_LIBRARY_LIBS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
1166          rm -f $@          rm -f $@
1167  ifneq (,$(GNU_LD)$(filter-out OS2 WINNT WINCE, $(OS_ARCH)))  ifneq (,$(GNU_LD)$(filter-out OS2 WINNT WINCE, $(OS_ARCH)))
1168  ifdef SHARED_LIBRARY_LIBS  ifdef SHARED_LIBRARY_LIBS
# Line 1127  Line 1236 
1236  # symlinks back to the originals. The symlinks are a no-op for stabs debugging,  # symlinks back to the originals. The symlinks are a no-op for stabs debugging,
1237  # so no need to conditionalize on OS version or debugging format.  # so no need to conditionalize on OS version or debugging format.
1238    
1239  $(SHARED_LIBRARY): $(OBJS) $(LOBJS) $(DEF_FILE) $(RESFILE) $(SHARED_LIBRARY_LIBS) $(EXTRA_DEPS) $(DSO_LDOPTS_DEPS) Makefile Makefile.in  $(SHARED_LIBRARY): $(OBJS) $(LOBJS) $(DEF_FILE) $(RESFILE) $(SHARED_LIBRARY_LIBS) $(EXTRA_DEPS) $(DSO_LDOPTS_DEPS) $(GLOBAL_DEPS)
1240  ifndef INCREMENTAL_LINKER  ifndef INCREMENTAL_LINKER
1241          rm -f $@          rm -f $@
1242  endif  endif
# Line 1211  Line 1320 
1320    
1321  ifdef MOZ_AUTO_DEPS  ifdef MOZ_AUTO_DEPS
1322  ifdef COMPILER_DEPEND  ifdef COMPILER_DEPEND
1323  ifeq (__SunOS,$(GNU_CC)_$(GNU_CXX)_$(OS_ARCH))  ifeq ($(SOLARIS_SUNPRO_CC),1)
1324  _MDDEPFILE = $(MDDEPDIR)/$(@F).pp  _MDDEPFILE = $(MDDEPDIR)/$(@F).pp
1325    
1326  define MAKE_DEPS_AUTO_CC  define MAKE_DEPS_AUTO_CC
# Line 1254  Line 1363 
1363  endif  endif
1364    
1365  # Rules for building native targets must come first because of the host_ prefix  # Rules for building native targets must come first because of the host_ prefix
1366  host_%.$(OBJ_SUFFIX): %.c Makefile Makefile.in  host_%.$(OBJ_SUFFIX): %.c $(GLOBAL_DEPS)
1367          $(REPORT_BUILD)          $(REPORT_BUILD)
1368          $(ELOG) $(HOST_CC) $(HOST_OUTOPTION)$@ -c $(HOST_CFLAGS) $(INCLUDES) $(NSPR_CFLAGS) $(_VPATH_SRCS)          $(ELOG) $(HOST_CC) $(HOST_OUTOPTION)$@ -c $(HOST_CFLAGS) $(INCLUDES) $(NSPR_CFLAGS) $(_VPATH_SRCS)
1369    
1370  host_%.$(OBJ_SUFFIX): %.cpp Makefile Makefile.in  host_%.$(OBJ_SUFFIX): %.cpp $(GLOBAL_DEPS)
1371          $(REPORT_BUILD)          $(REPORT_BUILD)
1372          $(ELOG) $(HOST_CXX) $(HOST_OUTOPTION)$@ -c $(HOST_CXXFLAGS) $(INCLUDES) $(NSPR_CFLAGS) $(_VPATH_SRCS)          $(ELOG) $(HOST_CXX) $(HOST_OUTOPTION)$@ -c $(HOST_CXXFLAGS) $(INCLUDES) $(NSPR_CFLAGS) $(_VPATH_SRCS)
1373    
1374  host_%.$(OBJ_SUFFIX): %.cc Makefile Makefile.in  host_%.$(OBJ_SUFFIX): %.cc $(GLOBAL_DEPS)
1375          $(REPORT_BUILD)          $(REPORT_BUILD)
1376          $(ELOG) $(HOST_CXX) $(HOST_OUTOPTION)$@ -c $(HOST_CXXFLAGS) $(INCLUDES) $(NSPR_CFLAGS) $(_VPATH_SRCS)          $(ELOG) $(HOST_CXX) $(HOST_OUTOPTION)$@ -c $(HOST_CXXFLAGS) $(INCLUDES) $(NSPR_CFLAGS) $(_VPATH_SRCS)
1377    
1378  host_%.$(OBJ_SUFFIX): %.m Makefile Makefile.in  host_%.$(OBJ_SUFFIX): %.m $(GLOBAL_DEPS)
1379          $(REPORT_BUILD)          $(REPORT_BUILD)
1380          $(ELOG) $(HOST_CC) $(HOST_OUTOPTION)$@ -c $(HOST_CFLAGS) $(HOST_CMFLAGS) $(INCLUDES) $(NSPR_CFLAGS) $(_VPATH_SRCS)          $(ELOG) $(HOST_CC) $(HOST_OUTOPTION)$@ -c $(HOST_CFLAGS) $(HOST_CMFLAGS) $(INCLUDES) $(NSPR_CFLAGS) $(_VPATH_SRCS)
1381    
1382  host_%.$(OBJ_SUFFIX): %.mm Makefile Makefile.in  host_%.$(OBJ_SUFFIX): %.mm $(GLOBAL_DEPS)
1383          $(REPORT_BUILD)          $(REPORT_BUILD)
1384          $(ELOG) $(HOST_CXX) $(HOST_OUTOPTION)$@ -c $(HOST_CXXFLAGS) $(HOST_CMMFLAGS) $(INCLUDES) $(NSPR_CFLAGS) $(_VPATH_SRCS)          $(ELOG) $(HOST_CXX) $(HOST_OUTOPTION)$@ -c $(HOST_CXXFLAGS) $(HOST_CMMFLAGS) $(INCLUDES) $(NSPR_CFLAGS) $(_VPATH_SRCS)
1385    
1386  %: %.c Makefile Makefile.in  %: %.c $(GLOBAL_DEPS)
1387          $(REPORT_BUILD)          $(REPORT_BUILD)
1388          @$(MAKE_DEPS_AUTO_CC)          @$(MAKE_DEPS_AUTO_CC)
1389          $(ELOG) $(CC) $(CFLAGS) $(LDFLAGS) $(OUTOPTION)$@ $(_VPATH_SRCS)          $(ELOG) $(CC) $(CFLAGS) $(LDFLAGS) $(OUTOPTION)$@ $(_VPATH_SRCS)
1390    
1391  %.$(OBJ_SUFFIX): %.c Makefile Makefile.in  %.$(OBJ_SUFFIX): %.c $(GLOBAL_DEPS)
1392          $(REPORT_BUILD)          $(REPORT_BUILD)
1393          @$(MAKE_DEPS_AUTO_CC)          @$(MAKE_DEPS_AUTO_CC)
1394          $(ELOG) $(CC) $(OUTOPTION)$@ -c $(COMPILE_CFLAGS) $(_VPATH_SRCS)          $(ELOG) $(CC) $(OUTOPTION)$@ -c $(COMPILE_CFLAGS) $(_VPATH_SRCS)
1395    
1396  moc_%.cpp: %.h Makefile Makefile.in  moc_%.cpp: %.h $(GLOBAL_DEPS)
1397          $(MOC) $< $(OUTOPTION)$@          $(MOC) $< $(OUTOPTION)$@
1398    
1399  ifdef ASFILES  ifdef ASFILES
1400  # The AS_DASH_C_FLAG is needed cause not all assemblers (Solaris) accept  # The AS_DASH_C_FLAG is needed cause not all assemblers (Solaris) accept
1401  # a '-c' flag.  # a '-c' flag.
1402  %.$(OBJ_SUFFIX): %.$(ASM_SUFFIX) Makefile Makefile.in  %.$(OBJ_SUFFIX): %.$(ASM_SUFFIX) $(GLOBAL_DEPS)
1403          $(AS) -o $@ $(ASFLAGS) $(AS_DASH_C_FLAG) $(_VPATH_SRCS)          $(AS) -o $@ $(ASFLAGS) $(AS_DASH_C_FLAG) $(_VPATH_SRCS)
1404  endif  endif
1405    
1406  %.$(OBJ_SUFFIX): %.S Makefile Makefile.in  %.$(OBJ_SUFFIX): %.S $(GLOBAL_DEPS)
1407          $(AS) -o $@ $(ASFLAGS) -c $<          $(AS) -o $@ $(ASFLAGS) -c $<
1408    
1409  %: %.cpp Makefile Makefile.in  %: %.cpp $(GLOBAL_DEPS)
1410          @$(MAKE_DEPS_AUTO_CXX)          @$(MAKE_DEPS_AUTO_CXX)
1411          $(CCC) $(OUTOPTION)$@ $(CXXFLAGS) $(_VPATH_SRCS) $(LDFLAGS)          $(CCC) $(OUTOPTION)$@ $(CXXFLAGS) $(_VPATH_SRCS) $(LDFLAGS)
1412    
1413  #  #
1414  # Please keep the next two rules in sync.  # Please keep the next two rules in sync.
1415  #  #
1416  %.$(OBJ_SUFFIX): %.cc Makefile Makefile.in  %.$(OBJ_SUFFIX): %.cc $(GLOBAL_DEPS)
1417          $(REPORT_BUILD)          $(REPORT_BUILD)
1418          @$(MAKE_DEPS_AUTO_CXX)          @$(MAKE_DEPS_AUTO_CXX)
1419          $(ELOG) $(CCC) $(OUTOPTION)$@ -c $(COMPILE_CXXFLAGS) $(_VPATH_SRCS)          $(ELOG) $(CCC) $(OUTOPTION)$@ -c $(COMPILE_CXXFLAGS) $(_VPATH_SRCS)
1420    
1421  %.$(OBJ_SUFFIX): %.cpp Makefile Makefile.in  %.$(OBJ_SUFFIX): %.cpp $(GLOBAL_DEPS)
1422          $(REPORT_BUILD)          $(REPORT_BUILD)
1423          @$(MAKE_DEPS_AUTO_CXX)          @$(MAKE_DEPS_AUTO_CXX)
1424  ifdef STRICT_CPLUSPLUS_SUFFIX  ifdef STRICT_CPLUSPLUS_SUFFIX
# Line 1320  Line 1429 
1429          $(ELOG) $(CCC) $(OUTOPTION)$@ -c $(COMPILE_CXXFLAGS) $(_VPATH_SRCS)          $(ELOG) $(CCC) $(OUTOPTION)$@ -c $(COMPILE_CXXFLAGS) $(_VPATH_SRCS)
1430  endif #STRICT_CPLUSPLUS_SUFFIX  endif #STRICT_CPLUSPLUS_SUFFIX
1431    
1432  $(OBJ_PREFIX)%.$(OBJ_SUFFIX): %.mm Makefile Makefile.in  $(OBJ_PREFIX)%.$(OBJ_SUFFIX): %.mm $(GLOBAL_DEPS)
1433          $(REPORT_BUILD)          $(REPORT_BUILD)
1434          @$(MAKE_DEPS_AUTO_CXX)          @$(MAKE_DEPS_AUTO_CXX)
1435          $(ELOG) $(CCC) -o $@ -c $(COMPILE_CXXFLAGS) $(COMPILE_CMMFLAGS) $(_VPATH_SRCS)          $(ELOG) $(CCC) -o $@ -c $(COMPILE_CXXFLAGS) $(COMPILE_CMMFLAGS) $(_VPATH_SRCS)
1436    
1437  $(OBJ_PREFIX)%.$(OBJ_SUFFIX): %.m Makefile Makefile.in  $(OBJ_PREFIX)%.$(OBJ_SUFFIX): %.m $(GLOBAL_DEPS)
1438          $(REPORT_BUILD)          $(REPORT_BUILD)
1439          @$(MAKE_DEPS_AUTO_CC)          @$(MAKE_DEPS_AUTO_CC)
1440          $(ELOG) $(CC) -o $@ -c $(COMPILE_CFLAGS) $(COMPILE_CMFLAGS) $(_VPATH_SRCS)          $(ELOG) $(CC) -o $@ -c $(COMPILE_CFLAGS) $(COMPILE_CMFLAGS) $(_VPATH_SRCS)
# Line 1433  Line 1542 
1542  $(_JAVA_DIR)::  $(_JAVA_DIR)::
1543          $(NSINSTALL) -D $@          $(NSINSTALL) -D $@
1544    
1545  $(_JAVA_DIR)/%.class: %.java Makefile Makefile.in $(_JAVA_DIR)  $(_JAVA_DIR)/%.class: %.java $(GLOBAL_DEPS) $(_JAVA_DIR)
1546          $(CYGWIN_WRAPPER) $(JAVAC) $(JAVAC_FLAGS) -classpath $(_JAVA_CLASSPATH) \          $(CYGWIN_WRAPPER) $(JAVAC) $(JAVAC_FLAGS) -classpath $(_JAVA_CLASSPATH) \
1547                          -sourcepath $(_JAVA_SOURCEPATH) -d $(_JAVA_DIR) $(_VPATH_SRCS)                          -sourcepath $(_JAVA_SOURCEPATH) -d $(_JAVA_DIR) $(_VPATH_SRCS)
1548    
1549  $(JAVA_LIBRARY): $(addprefix $(_JAVA_DIR)/,$(JAVA_SRCS:.java=.class)) Makefile Makefile.in  $(JAVA_LIBRARY): $(addprefix $(_JAVA_DIR)/,$(JAVA_SRCS:.java=.class)) $(GLOBAL_DEPS)
1550          $(JAR) cf $@ -C $(_JAVA_DIR) .          $(JAR) cf $@ -C $(_JAVA_DIR) .
1551    
1552  GARBAGE_DIRS += $(_JAVA_DIR)  GARBAGE_DIRS += $(_JAVA_DIR)
# Line 1476  Line 1585 
1585  # Copy each element of EXPORTS to $(PUBLIC)  # Copy each element of EXPORTS to $(PUBLIC)
1586    
1587  ifneq ($(EXPORTS)$(XPIDLSRCS)$(SDK_HEADERS)$(SDK_XPIDLSRCS),)  ifneq ($(EXPORTS)$(XPIDLSRCS)$(SDK_HEADERS)$(SDK_XPIDLSRCS),)
1588  $(SDK_PUBLIC) $(PUBLIC)::  $(SDK_PUBLIC) $(PUBLIC):
1589          $(NSINSTALL) -D $@          $(NSINSTALL) -D $@
1590  endif  endif
1591    
# Line 1603  Line 1712 
1712    
1713  # no need to link together if XPIDLSRCS contains only XPIDL_MODULE  # no need to link together if XPIDLSRCS contains only XPIDL_MODULE
1714  ifneq ($(XPIDL_MODULE).idl,$(strip $(XPIDLSRCS)))  ifneq ($(XPIDL_MODULE).idl,$(strip $(XPIDLSRCS)))
1715  $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt: $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.xpt,$(XPIDLSRCS) $(SDK_XPIDLSRCS)) Makefile.in Makefile $(XPIDL_LINK)  $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt: $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.xpt,$(XPIDLSRCS) $(SDK_XPIDLSRCS)) $(GLOBAL_DEPS) $(XPIDL_LINK)
1716          $(XPIDL_LINK) $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.xpt,$(XPIDLSRCS) $(SDK_XPIDLSRCS))          $(XPIDL_LINK) $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.xpt,$(XPIDLSRCS) $(SDK_XPIDLSRCS))
1717  endif # XPIDL_MODULE.xpt != XPIDLSRCS  endif # XPIDL_MODULE.xpt != XPIDLSRCS
1718    
# Line 1804  Line 1913 
1913  $(FINAL_TARGET)/chrome:  $(FINAL_TARGET)/chrome:
1914          $(NSINSTALL) -D $@          $(NSINSTALL) -D $@
1915    
1916  # libs realchrome:: $(CHROME_DEPS) $(FINAL_TARGET)/chrome  ifneq (,$(wildcard $(JAR_MANIFEST)))
1917  # ifndef NO_DIST_INSTALL  ifndef NO_DIST_INSTALL
1918  #       @$(EXIT_ON_ERROR) \  libs realchrome:: $(CHROME_DEPS) $(FINAL_TARGET)/chrome
1919  #       if test -f $(JAR_MANIFEST); then \          $(PYTHON) $(MOZILLA_DIR)/config/JarMaker.py \
1920  #         $(PYTHON) $(MOZILLA_DIR)/config/JarMaker.py \            $(QUIET) -j $(FINAL_TARGET)/chrome \
1921  #           $(QUIET) -j $(FINAL_TARGET)/chrome \            $(MAKE_JARS_FLAGS) $(XULPPFLAGS) $(DEFINES) $(ACDEFINES) \
1922  #           $(MAKE_JARS_FLAGS) $(XULPPFLAGS) $(DEFINES) $(ACDEFINES) \            $(JAR_MANIFEST)
1923  #           $(JAR_MANIFEST); \  endif
1924  #       fi  endif
 # endif  
1925    
1926  ifneq ($(DIST_FILES),)  ifneq ($(DIST_FILES),)
1927  libs:: $(DIST_FILES)  $(DIST)/bin:
1928            $(NSINSTALL) -D $@
1929    
1930    libs:: $(DIST_FILES) $(DIST)/bin
1931          @$(EXIT_ON_ERROR) \          @$(EXIT_ON_ERROR) \
1932          for f in $(DIST_FILES); do \          for f in $(DIST_FILES); do \
1933            dest=$(FINAL_TARGET)/`basename $$f`; \            dest=$(FINAL_TARGET)/`basename $$f`; \
# Line 1903  Line 2014 
2014          $(_JAR_REGCHROME_DISABLE_JAR)          $(_JAR_REGCHROME_DISABLE_JAR)
2015    
2016    
 ################################################################################  
 # Testing frameworks support  
 ################################################################################  
   
 ifdef ENABLE_TESTS  
   
 ifdef XPCSHELL_TESTS  
 ifndef MODULE  
 $(error Must define MODULE when defining XPCSHELL_TESTS.)  
 endif  
   
 # Test file installation  
 libs::  
         @$(EXIT_ON_ERROR) \  
         for testdir in $(XPCSHELL_TESTS); do \  
           $(INSTALL) \  
             $(srcdir)/$$testdir/*.js \  
             $(DEPTH)/_tests/xpcshell-simple/$(MODULE)/$$testdir; \  
         done  
   
 # Path formats on Windows are hard.  We require a topsrcdir formatted so that  
 # it may be passed to nsILocalFile.initWithPath (in other words, an absolute  
 # path of the form X:\path\to\topsrcdir), which we store in NATIVE_TOPSRCDIR.  
 # We require a forward-slashed path to topsrcdir so that it may be combined  
 # with a relative forward-slashed path for loading scripts, both dynamically  
 # and statically for head/test/tail JS files.  Of course, on non-Windows none  
 # of this matters, and things will work correctly because everything's  
 # forward-slashed, everywhere, always.  
 ifdef CYGWIN_WRAPPER  
 NATIVE_TOPSRCDIR   := `cygpath -wa $(topsrcdir)`  
 FWDSLASH_TOPSRCDIR := `cygpath -ma $(topsrcdir)`  
 else  
 FWDSLASH_TOPSRCDIR := $(topsrcdir)  
 ifeq ($(HOST_OS_ARCH),WINNT)  
 NATIVE_TOPSRCDIR   := $(subst /,\\,$(WIN_TOP_SRC))  
 else  
 NATIVE_TOPSRCDIR   := $(topsrcdir)  
 endif  
 endif # CYGWIN_WRAPPER  
   
 # Test execution  
 check::  
         @$(EXIT_ON_ERROR) \  
         for testdir in $(XPCSHELL_TESTS); do \  
           $(RUN_TEST_PROGRAM) \  
             $(topsrcdir)/tools/test-harness/xpcshell-simple/test_all.sh \  
               $(DIST)/bin/xpcshell \  
               $(FWDSLASH_TOPSRCDIR) \  
               $(NATIVE_TOPSRCDIR) \  
               $(DEPTH)/_tests/xpcshell-simple/$(MODULE)/$$testdir; \  
         done  
   
 # Test execution  
 check-interactive::  
         @$(EXIT_ON_ERROR) \  
         $(RUN_TEST_PROGRAM) \  
           $(topsrcdir)/tools/test-harness/xpcshell-simple/test_one.sh \  
             $(DIST)/bin/xpcshell \  
             $(FWDSLASH_TOPSRCDIR) \  
             $(NATIVE_TOPSRCDIR) \  
             $(DEPTH)/_tests/xpcshell-simple/$(MODULE)/$$testdir \  
             $(SOLO_FILE) 1;  
   
 # Test execution  
 check-one::  
         @$(EXIT_ON_ERROR) \  
         $(RUN_TEST_PROGRAM) \  
           $(topsrcdir)/tools/test-harness/xpcshell-simple/test_one.sh \  
             $(DIST)/bin/xpcshell \  
             $(FWDSLASH_TOPSRCDIR) \  
             $(NATIVE_TOPSRCDIR) \  
             $(DEPTH)/_tests/xpcshell-simple/$(MODULE)/$$testdir \  
             $(SOLO_FILE) 0;  
   
 endif # XPCSHELL_TESTS  
   
 endif # ENABLE_TESTS  
   
   
2017  #############################################################################  #############################################################################
2018  # Dependency system  # Dependency system
2019  #############################################################################  #############################################################################
# Line 2125  Line 2157 
2157  # Fake targets.  Always run these rules, even if a file/directory with that  # Fake targets.  Always run these rules, even if a file/directory with that
2158  # name already exists.  # name already exists.
2159  #  #
2160  .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  .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
2161    
2162  # Used as a dependency to force targets to rebuild  # Used as a dependency to force targets to rebuild
2163  FORCE:  FORCE:
# Line 2144  Line 2176 
2176          +$(LOOP_OVER_DIRS)          +$(LOOP_OVER_DIRS)
2177    
2178  echo-variable-%:  echo-variable-%:
2179          @echo $($*)          @echo "$($*)"
2180    
2181  echo-tiers:  echo-tiers:
2182          @echo $(TIERS)          @echo $(TIERS)
# Line 2263  Line 2295 
2295          @cd $(DEPTH)          @cd $(DEPTH)
2296          $(DOXYGEN) $(DEPTH)/config/doxygen.cfg          $(DOXYGEN) $(DEPTH)/config/doxygen.cfg
2297    
2298    ifdef ENABLE_TESTS
2299  check:: $(SUBMAKEFILES) $(MAKE_DIRS)  check:: $(SUBMAKEFILES) $(MAKE_DIRS)
2300          +$(LOOP_OVER_PARALLEL_DIRS)          +$(LOOP_OVER_PARALLEL_DIRS)
2301          +$(LOOP_OVER_DIRS)          +$(LOOP_OVER_DIRS)
2302          +$(LOOP_OVER_TOOL_DIRS)          +$(LOOP_OVER_TOOL_DIRS)
2303    endif

Legend:
Removed from v.459  
changed lines
  Added in v.460

  ViewVC Help
Powered by ViewVC 1.1.24