/[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 460 by siliconforks, Sat Sep 26 23:15:22 2009 UTC revision 507 by siliconforks, Sun Jan 10 07:23:34 2010 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 *****
41    
42  ifndef topsrcdir  ifndef topsrcdir
43  topsrcdir               = $(DEPTH)  $(error topsrcdir was not set))
44  endif  endif
45    
46  ifndef MOZILLA_DIR  ifndef MOZILLA_DIR
# Line 54  Line 55 
55  include $(topsrcdir)/config/version.mk  include $(topsrcdir)/config/version.mk
56  endif  endif
57    
58    ifdef SDK_XPIDLSRCS
59    XPIDLSRCS += $(SDK_XPIDLSRCS)
60    endif
61    ifdef SDK_HEADERS
62    EXPORTS += $(SDK_HEADERS)
63    endif
64    
65  REPORT_BUILD = @echo $(notdir $<)  REPORT_BUILD = @echo $(notdir $<)
66    
67  ifeq ($(OS_ARCH),OS2)  ifeq ($(OS_ARCH),OS2)
# Line 81  Line 89 
89  endif  endif
90    
91  ifeq (,$(filter-out WINNT WINCE,$(OS_ARCH)))  ifeq (,$(filter-out WINNT WINCE,$(OS_ARCH)))
92  PWD := $(shell pwd)  _VPATH_SRCS = $(if $(filter /%,$<),$<,$(CURDIR)/$<)
 _VPATH_SRCS = $(if $(filter /%,$<),$<,$(PWD)/$<)  
93  else  else
94  _VPATH_SRCS = $<  _VPATH_SRCS = $<
95  endif  endif
# Line 132  Line 139 
139  testxpcobjdir = $(DEPTH)/_tests/xpcshell  testxpcobjdir = $(DEPTH)/_tests/xpcshell
140    
141  # Test file installation  # Test file installation
142  ifdef NSINSTALL_BIN  ifneq (,$(filter WINNT os2-emx,$(HOST_OS_ARCH)))
143  # nsinstall in moztools can't recursively copy directories, so use nsinstall.py  # Windows and OS/2 nsinstall can't recursively copy directories, so use nsinstall.py
144  TEST_INSTALLER = $(PYTHON) $(topsrcdir)/config/nsinstall.py  TEST_INSTALLER = $(PYTHON) $(topsrcdir)/config/nsinstall.py
145  else  else
146  TEST_INSTALLER = $(INSTALL)  TEST_INSTALLER = $(INSTALL)
# Line 157  Line 164 
164  # Execute all tests in the $(XPCSHELL_TESTS) directories.  # Execute all tests in the $(XPCSHELL_TESTS) directories.
165  # See also testsuite-targets.mk 'xpcshell-tests' target for global execution.  # See also testsuite-targets.mk 'xpcshell-tests' target for global execution.
166  xpcshell-tests:  xpcshell-tests:
167          $(PYTHON) -u \          $(PYTHON) -u $(topsrcdir)/config/pythonpath.py \
168              -I$(topsrcdir)/build \
169            $(testxpcsrcdir)/runxpcshelltests.py \            $(testxpcsrcdir)/runxpcshelltests.py \
170              --symbols-path=$(DIST)/crashreporter-symbols \
171            $(DIST)/bin/xpcshell \            $(DIST)/bin/xpcshell \
172            $(foreach dir,$(XPCSHELL_TESTS),$(testxpcobjdir)/$(MODULE)/$(dir))            $(foreach dir,$(XPCSHELL_TESTS),$(testxpcobjdir)/$(MODULE)/$(dir))
173    
# Line 166  Line 175 
175  # start the test. Instead, present the xpcshell prompt so the user can  # start the test. Instead, present the xpcshell prompt so the user can
176  # attach a debugger and then start the test.  # attach a debugger and then start the test.
177  check-interactive:  check-interactive:
178          $(PYTHON) -u \          $(PYTHON) -u $(topsrcdir)/config/pythonpath.py \
179              -I$(topsrcdir)/build \
180            $(testxpcsrcdir)/runxpcshelltests.py \            $(testxpcsrcdir)/runxpcshelltests.py \
181              --symbols-path=$(DIST)/crashreporter-symbols \
182            --test-path=$(SOLO_FILE) \            --test-path=$(SOLO_FILE) \
183            --interactive \            --interactive \
184            $(DIST)/bin/xpcshell \            $(DIST)/bin/xpcshell \
# Line 175  Line 186 
186    
187  # Execute a single test, specified in $(SOLO_FILE)  # Execute a single test, specified in $(SOLO_FILE)
188  check-one:  check-one:
189          $(PYTHON) -u \          $(PYTHON) -u $(topsrcdir)/config/pythonpath.py \
190              -I$(topsrcdir)/build \
191            $(testxpcsrcdir)/runxpcshelltests.py \            $(testxpcsrcdir)/runxpcshelltests.py \
192              --symbols-path=$(DIST)/crashreporter-symbols \
193            --test-path=$(SOLO_FILE) \            --test-path=$(SOLO_FILE) \
194            $(DIST)/bin/xpcshell \            $(DIST)/bin/xpcshell \
195            $(foreach dir,$(XPCSHELL_TESTS),$(testxpcobjdir)/$(MODULE)/$(dir))            $(foreach dir,$(XPCSHELL_TESTS),$(testxpcobjdir)/$(MODULE)/$(dir))
# Line 190  Line 203 
203  # which stuff links.  # which stuff links.
204  CPPSRCS += $(CPP_UNIT_TESTS)  CPPSRCS += $(CPP_UNIT_TESTS)
205  SIMPLE_PROGRAMS += $(CPP_UNIT_TESTS:.cpp=$(BIN_SUFFIX))  SIMPLE_PROGRAMS += $(CPP_UNIT_TESTS:.cpp=$(BIN_SUFFIX))
206  REQUIRES += testing xpcom  INCLUDES += -I$(DIST)/include/testing
207  LIBS += $(XPCOM_GLUE_LDOPTS) $(NSPR_LIBS)  LIBS += $(XPCOM_GLUE_LDOPTS) $(NSPR_LIBS)
208    
209  # ...and run them the usual way  # ...and run them the usual way
# Line 215  Line 228 
228  #  #
229    
230  ifndef LIBRARY  ifndef LIBRARY
231  ifdef LIBRARY_NAME  ifdef STATIC_LIBRARY_NAME
232  ifneq (,$(filter OS2 WINNT WINCE,$(OS_ARCH)))  ifneq (,$(filter OS2 WINNT WINCE,$(OS_ARCH)))
233  ifdef SHORT_LIBNAME  ifdef SHORT_LIBNAME
234  LIBRARY_NAME            := $(SHORT_LIBNAME)  STATIC_LIBRARY_NAME     := $(SHORT_LIBNAME)
235  endif  SHARED_LIBRARY_NAME     := $(SHORT_LIBNAME)
 endif  
 LIBRARY                 := $(LIB_PREFIX)$(LIBRARY_NAME).$(LIB_SUFFIX)  
236  endif  endif
237  endif  endif
238    LIBRARY                 := $(LIB_PREFIX)$(STATIC_LIBRARY_NAME).$(LIB_SUFFIX)
239    endif # STATIC_LIBRARY_NAME
240    endif # LIBRARY
241    
242  ifndef HOST_LIBRARY  ifndef HOST_LIBRARY
243  ifdef HOST_LIBRARY_NAME  ifdef HOST_LIBRARY_NAME
# Line 240  Line 254 
254  endif  endif
255    
256  ifdef MAKE_FRAMEWORK  ifdef MAKE_FRAMEWORK
257  SHARED_LIBRARY          := $(LIBRARY_NAME)  SHARED_LIBRARY          := $(SHARED_LIBRARY_NAME)
258  else  else
259  SHARED_LIBRARY          := $(DLL_PREFIX)$(LIBRARY_NAME)$(DLL_SUFFIX)  SHARED_LIBRARY          := $(DLL_PREFIX)$(SHARED_LIBRARY_NAME)$(DLL_SUFFIX)
260  endif  endif
261    
262  ifeq ($(OS_ARCH),OS2)  ifeq ($(OS_ARCH),OS2)
# Line 250  Line 264 
264  endif  endif
265    
266  ifneq (,$(filter OS2 WINNT WINCE,$(OS_ARCH)))  ifneq (,$(filter OS2 WINNT WINCE,$(OS_ARCH)))
267  IMPORT_LIBRARY          := $(LIB_PREFIX)$(LIBRARY_NAME).$(IMPORT_LIB_SUFFIX)  IMPORT_LIBRARY          := $(LIB_PREFIX)$(SHARED_LIBRARY_NAME).$(IMPORT_LIB_SUFFIX)
268  endif  endif
269    
270  ifdef MOZ_ENABLE_LIBXUL  ifdef MOZ_ENABLE_LIBXUL
# Line 315  Line 329 
329  endif  endif
330    
331  ifdef MOZ_MAPINFO  ifdef MOZ_MAPINFO
332  ifdef LIBRARY_NAME  ifdef SHARED_LIBRARY_NAME
333  MAPFILE=$(LIBRARY_NAME).map  MAPFILE=$(SHARED_LIBRARY_NAME).map
334  else  else
335  MAPFILE=$(basename $(@F)).map  MAPFILE=$(basename $(@F)).map
336  endif # LIBRARY_NAME  endif # SHARED_LIBRARY_NAME
337  endif # MOZ_MAPINFO  endif # MOZ_MAPINFO
338    
339  ifdef DEFFILE  ifdef DEFFILE
340  OS_LDFLAGS += -DEF:$(DEFFILE)  OS_LDFLAGS += -DEF:$(call normalizepath,$(DEFFILE))
341  EXTRA_DEPS += $(DEFFILE)  EXTRA_DEPS += $(DEFFILE)
342  endif  endif
343    
344  ifdef MAPFILE  ifdef MAPFILE
345  OS_LDFLAGS += -MAP:$(MAPFILE)  OS_LDFLAGS += -MAP:$(MAPFILE)
 #CFLAGS += -Fm$(MAPFILE)  
 #CXXFLAGS += -Fm$(MAPFILE)  
346  endif  endif
347    
 #ifdef CODFILE  
 #CFLAGS += -Fa$(CODFILE) -FAsc  
 #CFLAGS += -Fa$(CODFILE) -FAsc  
 #endif  
   
348  endif # !GNU_CC  endif # !GNU_CC
349    
350  ifdef ENABLE_CXX_EXCEPTIONS  ifdef ENABLE_CXX_EXCEPTIONS
# Line 386  Line 393 
393  LIBOBJS                 := $(addsuffix \", $(LIBOBJS))  LIBOBJS                 := $(addsuffix \", $(LIBOBJS))
394    
395  ifndef MOZ_AUTO_DEPS  ifndef MOZ_AUTO_DEPS
396  ifneq (,$(OBJS)$(XPIDLSRCS)$(SDK_XPIDLSRCS)$(SIMPLE_PROGRAMS))  ifneq (,$(OBJS)$(XPIDLSRCS)$(SIMPLE_PROGRAMS))
397  MDDEPFILES              = $(addprefix $(MDDEPDIR)/,$(OBJS:.$(OBJ_SUFFIX)=.pp))  MDDEPFILES              = $(addprefix $(MDDEPDIR)/,$(OBJS:.$(OBJ_SUFFIX)=.pp))
398  ifndef NO_GEN_XPT  ifndef NO_GEN_XPT
399  MDDEPFILES              += $(addprefix $(MDDEPDIR)/,$(XPIDLSRCS:.idl=.xpt)) \  MDDEPFILES              += $(addprefix $(MDDEPDIR)/,$(XPIDLSRCS:.idl=.xpt))
                            $(addprefix $(MDDEPDIR)/,$(SDK_XPIDLSRCS:.idl=.xpt))  
400  endif  endif
401  endif  endif
402  endif  endif
# Line 453  Line 459 
459  # Its good not to have a newline at the end of the titlebar string because it  # Its good not to have a newline at the end of the titlebar string because it
460  # makes the make -s output easier to read.  Echo -n does not work on all  # makes the make -s output easier to read.  Echo -n does not work on all
461  # platforms, but we can trick sed into doing it.  # platforms, but we can trick sed into doing it.
462  UPDATE_TITLE = sed -e "s!Y!$@ in $(shell $(BUILD_TOOLS)/print-depth-path.sh)/$(dir)!" $(MOZILLA_DIR)/config/xterm.str;  UPDATE_TITLE = sed -e "s!Y!$(1) in $(shell $(BUILD_TOOLS)/print-depth-path.sh)/$(2)!" $(MOZILLA_DIR)/config/xterm.str;
 UPDATE_TITLE_export = sed -e "s!Y!export in $(shell $(BUILD_TOOLS)/print-depth-path.sh)/$*!" $(MOZILLA_DIR)/config/xterm.str;  
 UPDATE_TITLE_libs = sed -e "s!Y!libs 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;  
463  endif  endif
464    
465    define SUBMAKE # $(call SUBMAKE,target,directory)
466    @$(UPDATE_TITLE)
467    +@$(MAKE) $(if $(2),-C $(2)) $(1)
468    
469    endef # The extra line is important here! don't delete it
470    
471  ifneq (,$(strip $(DIRS)))  ifneq (,$(strip $(DIRS)))
472  LOOP_OVER_DIRS = \  LOOP_OVER_DIRS = \
473      @$(EXIT_ON_ERROR) \    $(foreach dir,$(DIRS),$(call SUBMAKE,$@,$(dir)))
     $(foreach dir,$(DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; )  
474  endif  endif
475    
476  # 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
477  ifneq (,$(strip $(PARALLEL_DIRS)))  ifneq (,$(strip $(PARALLEL_DIRS)))
478  LOOP_OVER_PARALLEL_DIRS = \  LOOP_OVER_PARALLEL_DIRS = \
479      @$(EXIT_ON_ERROR) \    $(foreach dir,$(PARALLEL_DIRS),$(call SUBMAKE,$@,$(dir)))
     $(foreach dir,$(PARALLEL_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; )  
480  endif  endif
481    
482  ifneq (,$(strip $(STATIC_DIRS)))  ifneq (,$(strip $(STATIC_DIRS)))
483  LOOP_OVER_STATIC_DIRS = \  LOOP_OVER_STATIC_DIRS = \
484      @$(EXIT_ON_ERROR) \    $(foreach dir,$(STATIC_DIRS),$(call SUBMAKE,$@,$(dir)))
     $(foreach dir,$(STATIC_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; )  
485  endif  endif
486    
487  ifneq (,$(strip $(TOOL_DIRS)))  ifneq (,$(strip $(TOOL_DIRS)))
488  LOOP_OVER_TOOL_DIRS = \  LOOP_OVER_TOOL_DIRS = \
489      @$(EXIT_ON_ERROR) \    $(foreach dir,$(TOOL_DIRS),$(call SUBMAKE,$@,$(dir)))
     $(foreach dir,$(TOOL_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; )  
490  endif  endif
491    
492  ifdef PARALLEL_DIRS  ifdef PARALLEL_DIRS
# Line 508  Line 513 
513  # MAKE_DIRS: List of directories to build while looping over directories.  # MAKE_DIRS: List of directories to build while looping over directories.
514  # A Makefile that needs $(MDDEPDIR) created but doesn't set any of these  # A Makefile that needs $(MDDEPDIR) created but doesn't set any of these
515  # variables we know to check can just set NEED_MDDEPDIR explicitly.  # variables we know to check can just set NEED_MDDEPDIR explicitly.
516  ifneq (,$(OBJS)$(XPIDLSRCS)$(SDK_XPIDLSRCS)$(SIMPLE_PROGRAMS)$(NEED_MDDEPDIR))  ifneq (,$(OBJS)$(XPIDLSRCS)$(SIMPLE_PROGRAMS)$(NEED_MDDEPDIR))
517  MAKE_DIRS               += $(CURDIR)/$(MDDEPDIR)  MAKE_DIRS               += $(CURDIR)/$(MDDEPDIR)
518  GARBAGE_DIRS            += $(MDDEPDIR)  GARBAGE_DIRS            += $(MDDEPDIR)
519  endif  endif
# Line 712  Line 717 
717  ifndef SUPPRESS_DEFAULT_RULES  ifndef SUPPRESS_DEFAULT_RULES
718  ifdef TIERS  ifdef TIERS
719  default all alldep::  default all alldep::
720          $(EXIT_ON_ERROR) \          $(foreach tier,$(TIERS),$(call SUBMAKE,tier_$(tier)))
         $(foreach tier,$(TIERS),$(MAKE) tier_$(tier); ) true  
   
721  else  else
722    
723  default all::  default all::
724  ifneq (,$(strip $(STATIC_DIRS)))  ifneq (,$(strip $(STATIC_DIRS)))
725          $(foreach dir,$(STATIC_DIRS),$(MAKE) -C $(dir); )          $(foreach dir,$(STATIC_DIRS),$(call SUBMAKE,,$(dir)))
726  endif  endif
727          $(MAKE) export          $(MAKE) export
728          $(MAKE) libs          $(MAKE) libs
# Line 745  Line 748 
748    
749  MAKE_TIER_SUBMAKEFILES = +$(if $(tier_$*_dirs),$(MAKE) $(addsuffix /Makefile,$(tier_$*_dirs)))  MAKE_TIER_SUBMAKEFILES = +$(if $(tier_$*_dirs),$(MAKE) $(addsuffix /Makefile,$(tier_$*_dirs)))
750    
751  export_tier_%:  export_tier_%:
752          @$(ECHO) "$@"          @$(ECHO) "$@"
753          @$(MAKE_TIER_SUBMAKEFILES)          @$(MAKE_TIER_SUBMAKEFILES)
754          @$(EXIT_ON_ERROR) \          $(foreach dir,$(tier_$*_dirs),$(call SUBMAKE,export,$(dir)))
         $(foreach dir,$(tier_$*_dirs),$(MAKE) -C $(dir) export; ) true  
755    
756  libs_tier_%:  libs_tier_%:
757          @$(ECHO) "$@"          @$(ECHO) "$@"
758          @$(MAKE_TIER_SUBMAKEFILES)          @$(MAKE_TIER_SUBMAKEFILES)
759          @$(EXIT_ON_ERROR) \          $(foreach dir,$(tier_$*_dirs),$(call SUBMAKE,libs,$(dir)))
         $(foreach dir,$(tier_$*_dirs),$(MAKE) -C $(dir) libs; ) true  
760    
761  tools_tier_%:  tools_tier_%:
762          @$(ECHO) "$@"          @$(ECHO) "$@"
763          @$(MAKE_TIER_SUBMAKEFILES)          @$(MAKE_TIER_SUBMAKEFILES)
764          @$(EXIT_ON_ERROR) \          $(foreach dir,$(tier_$*_dirs),$(call SUBMAKE,tools,$(dir)))
         $(foreach dir,$(tier_$*_dirs),$(MAKE) -C $(dir) tools; ) true  
765    
766  $(foreach tier,$(TIERS),tier_$(tier))::  $(foreach tier,$(TIERS),tier_$(tier))::
767          @$(ECHO) "$@: $($@_staticdirs) $($@_dirs)"          @$(ECHO) "$@: $($@_staticdirs) $($@_dirs)"
768          @$(EXIT_ON_ERROR) \          $(foreach dir,$($@_staticdirs),$(call SUBMAKE,,$(dir)))
         $(foreach dir,$($@_staticdirs),$(MAKE) -C $(dir); ) true  
769          $(MAKE) export_$@          $(MAKE) export_$@
770          $(MAKE) libs_$@          $(MAKE) libs_$@
771    
# Line 778  Line 777 
777  # Add dummy depend target for tinderboxes  # Add dummy depend target for tinderboxes
778  depend::  depend::
779    
 ifdef ALL_PLATFORMS  
 all_platforms:: $(NFSPWD)  
         @d=`$(NFSPWD)`;                                                 \  
         if test ! -d LOGS; then rm -rf LOGS; mkdir LOGS; else true; fi; \  
         for h in $(PLATFORM_HOSTS); do                                  \  
                 echo "On $$h: $(MAKE) $(ALL_PLATFORMS) >& LOGS/$$h.log";\  
                 rsh $$h -n "(chdir $$d;                                 \  
                              $(MAKE) $(ALL_PLATFORMS) >& LOGS/$$h.log;  \  
                              echo DONE) &" 2>&1 > LOGS/$$h.pid &        \  
                 sleep 1;                                                \  
         done  
   
 $(NFSPWD):  
         cd $(@D); $(MAKE) $(@F)  
 endif  
   
780  # Target to only regenerate makefiles  # Target to only regenerate makefiles
781  makefiles: $(SUBMAKEFILES)  makefiles: $(SUBMAKEFILES)
782  ifneq (,$(DIRS)$(TOOL_DIRS)$(PARALLEL_DIRS))  ifneq (,$(DIRS)$(TOOL_DIRS)$(PARALLEL_DIRS))
783          +$(LOOP_OVER_PARALLEL_DIRS)          $(LOOP_OVER_PARALLEL_DIRS)
784          +$(LOOP_OVER_DIRS)          $(LOOP_OVER_DIRS)
785          +$(LOOP_OVER_TOOL_DIRS)          $(LOOP_OVER_TOOL_DIRS)
786  endif  endif
787    
788  ifdef PARALLEL_DIRS  ifdef PARALLEL_DIRS
789  export:: $(PARALLEL_DIRS_export)  export:: $(PARALLEL_DIRS_export)
790    
791  $(PARALLEL_DIRS_export): %_export: %/Makefile  $(PARALLEL_DIRS_export): %_export: %/Makefile
792          +@$(UPDATE_TITLE_export) $(MAKE) -C $* export          +@$(call SUBMAKE,export,$*)
793  endif  endif
794    
795  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))  export:: $(SUBMAKEFILES) $(MAKE_DIRS) $(if $(XPIDLSRCS),$(IDL_DIR))
796          +$(LOOP_OVER_DIRS)          $(LOOP_OVER_DIRS)
797          +$(LOOP_OVER_TOOL_DIRS)          $(LOOP_OVER_TOOL_DIRS)
798    
799  ifdef PARALLEL_DIRS  ifdef PARALLEL_DIRS
800  tools:: $(PARALLEL_DIRS_tools)  tools:: $(PARALLEL_DIRS_tools)
801    
802  $(PARALLEL_DIRS_tools): %_tools: %/Makefile  $(PARALLEL_DIRS_tools): %_tools: %/Makefile
803          +@$(UPDATE_TITLE_tools) $(MAKE) -C $* tools          +@$(call SUBMAKE,tools,$*)
804  endif  endif
805    
806  tools:: $(SUBMAKEFILES) $(MAKE_DIRS)  tools:: $(SUBMAKEFILES) $(MAKE_DIRS)
807          +$(LOOP_OVER_DIRS)          $(LOOP_OVER_DIRS)
808  ifneq (,$(strip $(TOOL_DIRS)))  ifneq (,$(strip $(TOOL_DIRS)))
809          @$(EXIT_ON_ERROR) \          $(foreach dir,$(TOOL_DIRS),$(call SUBMAKE,libs,$(dir)))
         $(foreach dir,$(TOOL_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) libs; )  
810  endif  endif
811    
812  #  #
# Line 835  Line 817 
817  ifdef EXPORT_LIBRARY  ifdef EXPORT_LIBRARY
818  ifdef IS_COMPONENT  ifdef IS_COMPONENT
819  ifdef BUILD_STATIC_LIBS  ifdef BUILD_STATIC_LIBS
820          @$(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl $(FINAL_LINK_COMPS) $(LIBRARY_NAME)          @$(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl $(FINAL_LINK_COMPS) $(STATIC_LIBRARY_NAME)
821  ifdef MODULE_NAME  ifdef MODULE_NAME
822          @$(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl $(FINAL_LINK_COMP_NAMES) $(MODULE_NAME)          @$(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl $(FINAL_LINK_COMP_NAMES) $(MODULE_NAME)
823  endif  endif
824  endif  endif # BUILD_STATIC_LIBS
825  else  else  # !IS_COMPONENT
826          $(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl $(FINAL_LINK_LIBS) $(LIBRARY_NAME)          $(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl $(FINAL_LINK_LIBS) $(STATIC_LIBRARY_NAME)
827  endif # IS_COMPONENT  endif # IS_COMPONENT
828  endif # EXPORT_LIBRARY  endif # EXPORT_LIBRARY
829  endif # LIBRARY_NAME  endif # LIBRARY_NAME
# Line 859  Line 841 
841  libs:: $(PARALLEL_DIRS_libs)  libs:: $(PARALLEL_DIRS_libs)
842    
843  $(PARALLEL_DIRS_libs): %_libs: %/Makefile  $(PARALLEL_DIRS_libs): %_libs: %/Makefile
844          +@$(UPDATE_TITLE_libs) $(MAKE) -C $* libs          +@$(call SUBMAKE,libs,$*)
845  endif  endif
846    
847  libs:: $(SUBMAKEFILES) $(MAKE_DIRS) $(HOST_LIBRARY) $(LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) $(HOST_PROGRAM) $(PROGRAM) $(HOST_SIMPLE_PROGRAMS) $(SIMPLE_PROGRAMS) $(JAVA_LIBRARY)  libs:: $(SUBMAKEFILES) $(MAKE_DIRS) $(HOST_LIBRARY) $(LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) $(HOST_PROGRAM) $(PROGRAM) $(HOST_SIMPLE_PROGRAMS) $(SIMPLE_PROGRAMS) $(JAVA_LIBRARY)
# Line 884  Line 866 
866  ifdef IS_COMPONENT  ifdef IS_COMPONENT
867          $(INSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(FINAL_TARGET)/components          $(INSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(FINAL_TARGET)/components
868          $(ELF_DYNSTR_GC) $(FINAL_TARGET)/components/$(SHARED_LIBRARY)          $(ELF_DYNSTR_GC) $(FINAL_TARGET)/components/$(SHARED_LIBRARY)
869            @$(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl $(FINAL_TARGET)/components/components.list $(SHARED_LIBRARY)
870  ifdef BEOS_ADDON_WORKAROUND  ifdef BEOS_ADDON_WORKAROUND
871          ( cd $(FINAL_TARGET)/components && $(CC) -nostart -o $(SHARED_LIBRARY).stub $(SHARED_LIBRARY) )          ( cd $(FINAL_TARGET)/components && $(CC) -nostart -o $(SHARED_LIBRARY).stub $(SHARED_LIBRARY) )
872  endif  endif
# Line 922  Line 905 
905  endif  endif
906  endif # JAVA_LIBRARY  endif # JAVA_LIBRARY
907  endif # !NO_DIST_INSTALL  endif # !NO_DIST_INSTALL
908          +$(LOOP_OVER_DIRS)          $(LOOP_OVER_DIRS)
909    
910  ##############################################  ##############################################
911    
# Line 951  Line 934 
934  endif  endif
935  ifdef SHARED_LIBRARY  ifdef SHARED_LIBRARY
936          $(PYTHON) $(topsrcdir)/build/win32/pgomerge.py \          $(PYTHON) $(topsrcdir)/build/win32/pgomerge.py \
937            $(LIBRARY_NAME) $(DIST)/bin            $(SHARED_LIBRARY_NAME) $(DIST)/bin
938  endif  endif
939  endif  endif
940  endif # MOZ_PROFILE_USE  endif # MOZ_PROFILE_USE
# Line 964  Line 947 
947  checkout:  checkout:
948          $(MAKE) -C $(topsrcdir) -f client.mk checkout          $(MAKE) -C $(topsrcdir) -f client.mk checkout
949    
 run_viewer: $(FINAL_TARGET)/viewer  
         cd $(FINAL_TARGET); \  
         MOZILLA_FIVE_HOME=`pwd` \  
         LD_LIBRARY_PATH=".:$(LIBS_PATH):$$LD_LIBRARY_PATH" \  
         viewer  
   
950  clean clobber realclean clobber_all:: $(SUBMAKEFILES)  clean clobber realclean clobber_all:: $(SUBMAKEFILES)
951          -rm -f $(ALL_TRASH)          -rm -f $(ALL_TRASH)
952          -rm -rf $(ALL_TRASH_DIRS)          -rm -rf $(ALL_TRASH_DIRS)
953          +-$(LOOP_OVER_PARALLEL_DIRS)          $(foreach dir,$(PARALLEL_DIRS) $(DIRS) $(STATIC_DIRS) $(TOOL_DIRS),-$(call SUBMAKE,$@,$(dir)))
         +-$(LOOP_OVER_DIRS)  
         +-$(LOOP_OVER_STATIC_DIRS)  
         +-$(LOOP_OVER_TOOL_DIRS)  
954    
955  distclean:: $(SUBMAKEFILES)  distclean:: $(SUBMAKEFILES)
956          +-$(LOOP_OVER_PARALLEL_DIRS)          $(foreach dir,$(PARALLEL_DIRS) $(DIRS) $(STATIC_DIRS) $(TOOL_DIRS),-$(call SUBMAKE,$@,$(dir)))
         +-$(LOOP_OVER_DIRS)  
         +-$(LOOP_OVER_STATIC_DIRS)  
         +-$(LOOP_OVER_TOOL_DIRS)  
957          -rm -rf $(ALL_TRASH_DIRS)          -rm -rf $(ALL_TRASH_DIRS)
958          -rm -f $(ALL_TRASH)  \          -rm -f $(ALL_TRASH)  \
959          Makefile .HSancillary \          Makefile .HSancillary \
# Line 1047  Line 1018 
1018          $(HOST_LD) -NOLOGO -OUT:$@ -PDB:$(HOST_PDBFILE) $(HOST_OBJS) $(WIN32_EXE_LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)          $(HOST_LD) -NOLOGO -OUT:$@ -PDB:$(HOST_PDBFILE) $(HOST_OBJS) $(WIN32_EXE_LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
1019  ifdef MSMANIFEST_TOOL  ifdef MSMANIFEST_TOOL
1020          @if test -f $@.manifest; then \          @if test -f $@.manifest; then \
1021                  mt.exe -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \                  if test -f "$(srcdir)/$@.manifest"; then \
1022                            mt.exe -NOLOGO -MANIFEST "$(win_srcdir)/$@.manifest" $@.manifest -OUTPUTRESOURCE:$@\;1; \
1023                    else \
1024                            mt.exe -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \
1025                    fi; \
1026                  rm -f $@.manifest; \                  rm -f $@.manifest; \
1027          fi          fi
1028  endif   # MSVC with manifest tool  endif   # MSVC with manifest tool
# Line 1181  Line 1156 
1156  ifeq ($(OS_ARCH),OS2)  ifeq ($(OS_ARCH),OS2)
1157  $(DEF_FILE): $(OBJS) $(SHARED_LIBRARY_LIBS)  $(DEF_FILE): $(OBJS) $(SHARED_LIBRARY_LIBS)
1158          rm -f $@          rm -f $@
1159          echo LIBRARY $(LIBRARY_NAME) INITINSTANCE TERMINSTANCE > $@          echo LIBRARY $(SHARED_LIBRARY_NAME) INITINSTANCE TERMINSTANCE > $@
1160          echo PROTMODE >> $@          echo PROTMODE >> $@
1161          echo CODE    LOADONCALL MOVEABLE DISCARDABLE >> $@          echo CODE    LOADONCALL MOVEABLE DISCARDABLE >> $@
1162          echo DATA    PRELOAD MOVEABLE MULTIPLE NONSHARED >> $@          echo DATA    PRELOAD MOVEABLE MULTIPLE NONSHARED >> $@
# Line 1383  Line 1358 
1358          $(REPORT_BUILD)          $(REPORT_BUILD)
1359          $(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)
1360    
1361  %: %.c $(GLOBAL_DEPS)  %:: %.c $(GLOBAL_DEPS)
1362          $(REPORT_BUILD)          $(REPORT_BUILD)
1363          @$(MAKE_DEPS_AUTO_CC)          @$(MAKE_DEPS_AUTO_CC)
1364          $(ELOG) $(CC) $(CFLAGS) $(LDFLAGS) $(OUTOPTION)$@ $(_VPATH_SRCS)          $(ELOG) $(CC) $(CFLAGS) $(LDFLAGS) $(OUTOPTION)$@ $(_VPATH_SRCS)
# Line 1406  Line 1381 
1381  %.$(OBJ_SUFFIX): %.S $(GLOBAL_DEPS)  %.$(OBJ_SUFFIX): %.S $(GLOBAL_DEPS)
1382          $(AS) -o $@ $(ASFLAGS) -c $<          $(AS) -o $@ $(ASFLAGS) -c $<
1383    
1384  %: %.cpp $(GLOBAL_DEPS)  %:: %.cpp $(GLOBAL_DEPS)
1385          @$(MAKE_DEPS_AUTO_CXX)          @$(MAKE_DEPS_AUTO_CXX)
1386          $(CCC) $(OUTOPTION)$@ $(CXXFLAGS) $(_VPATH_SRCS) $(LDFLAGS)          $(CCC) $(OUTOPTION)$@ $(CXXFLAGS) $(_VPATH_SRCS) $(LDFLAGS)
1387    
# Line 1473  Line 1448 
1448  endif  endif
1449    
1450  # need 3 separate lines for OS/2  # need 3 separate lines for OS/2
1451  %: %.pl  %:: %.pl
1452          rm -f $@          rm -f $@
1453          cp $< $@          cp $< $@
1454          chmod +x $@          chmod +x $@
1455    
1456  %: %.sh  %:: %.sh
1457          rm -f $@; cp $< $@; chmod +x $@          rm -f $@; cp $< $@; chmod +x $@
1458    
1459  # Cancel these implicit rules  # Cancel these implicit rules
# Line 1517  Line 1492 
1492  #  on it, then merge with the rest of the path.  #  on it, then merge with the rest of the path.
1493  root-path = $(shell echo $(1) | sed -e "s|\(/[^/]*\)/\?\(.*\)|\1|")  root-path = $(shell echo $(1) | sed -e "s|\(/[^/]*\)/\?\(.*\)|\1|")
1494  non-root-path = $(shell echo $(1) | sed -e "s|\(/[^/]*\)/\?\(.*\)|\2|")  non-root-path = $(shell echo $(1) | sed -e "s|\(/[^/]*\)/\?\(.*\)|\2|")
1495  normalizepath = $(foreach p,$(1),$(if $(filter /%,$(1)),$(shell cd $(call root-path,$(1)) && pwd -W)$(call non-root-path,$(1)),$(1)))  normalizepath = $(foreach p,$(1),$(if $(filter /%,$(1)),$(patsubst %/,%,$(shell cd $(call root-path,$(1)) && pwd -W))/$(call non-root-path,$(1)),$(1)))
1496  endif  endif
1497  else  else
1498  normalizepath = $(1)  normalizepath = $(1)
# Line 1582  Line 1557 
1557  ###############################################################################  ###############################################################################
1558    
1559  ################################################################################  ################################################################################
1560  # Copy each element of EXPORTS to $(PUBLIC)  # Copy each element of EXPORTS to $(DIST)/include
   
 ifneq ($(EXPORTS)$(XPIDLSRCS)$(SDK_HEADERS)$(SDK_XPIDLSRCS),)  
 $(SDK_PUBLIC) $(PUBLIC):  
         $(NSINSTALL) -D $@  
 endif  
1561    
1562  ifdef MOZ_JAVAXPCOM  ifdef MOZ_JAVAXPCOM
1563  ifneq ($(XPIDLSRCS)$(SDK_XPIDLSRCS),)  ifneq ($(XPIDLSRCS),)
1564  $(JAVA_DIST_DIR)::  $(JAVA_DIST_DIR)::
1565          $(NSINSTALL) -D $@          $(NSINSTALL) -D $@
1566  endif  endif
# Line 1604  Line 1574 
1574  endif  endif
1575    
1576  ifndef NO_DIST_INSTALL  ifndef NO_DIST_INSTALL
1577  ifneq ($(EXPORTS),)  ifneq (,$(EXPORTS))
1578  export:: $(EXPORTS) $(PUBLIC)  export:: $(EXPORTS)
1579          $(INSTALL) $(IFLAGS1) $^          $(INSTALL) $(IFLAGS1) $^ $(DIST)/include
1580  endif  endif
1581    endif # NO_DIST_INSTALL
 ifneq ($(SDK_HEADERS),)  
 export:: $(SDK_HEADERS) $(SDK_PUBLIC)  
         $(INSTALL) $(IFLAGS1) $^  
1582    
1583  export:: $(SDK_HEADERS) $(PUBLIC)  define EXPORT_NAMESPACE_RULE
1584          $(INSTALL) $(IFLAGS1) $^  ifndef NO_DIST_INSTALL
1585  endif  export:: $(EXPORTS_$(namespace))
1586            $(INSTALL) $(IFLAGS1) $$^ $(DIST)/include/$(namespace)
1587  endif # NO_DIST_INSTALL  endif # NO_DIST_INSTALL
1588    endef
1589    
1590    $(foreach namespace,$(EXPORTS_NAMESPACES),$(eval $(EXPORT_NAMESPACE_RULE)))
1591    
1592  ################################################################################  ################################################################################
1593  # Copy each element of PREF_JS_EXPORTS  # Copy each element of PREF_JS_EXPORTS
# Line 1665  Line 1636 
1636    
1637  endif  endif
1638  ################################################################################  ################################################################################
1639  # Export the elements of $(XPIDLSRCS) & $(SDK_XPIDLSRCS),  # Export the elements of $(XPIDLSRCS)
1640  # generating .h and .xpt files and moving them to the appropriate places.  # generating .h and .xpt files and moving them to the appropriate places.
1641    
1642  ifneq ($(XPIDLSRCS)$(SDK_XPIDLSRCS),)  ifneq ($(XPIDLSRCS),)
1643    
1644  export:: $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.h, $(XPIDLSRCS))  export:: $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.h, $(XPIDLSRCS))
1645    
# Line 1685  Line 1656 
1656          @echo; sleep 2; false          @echo; sleep 2; false
1657  endif  endif
1658    
1659  $(SDK_IDL_DIR) $(IDL_DIR)::  $(IDL_DIR)::
1660          $(NSINSTALL) -D $@          $(NSINSTALL) -D $@
1661    
1662  # generate .h files from into $(XPIDL_GEN_DIR), then export to $(PUBLIC);  # generate .h files from into $(XPIDL_GEN_DIR), then export to $(DIST)/include;
1663  # warn against overriding existing .h file.  # warn against overriding existing .h file.
1664  $(XPIDL_GEN_DIR)/.done:  $(XPIDL_GEN_DIR)/.done:
1665          @if test ! -d $(XPIDL_GEN_DIR); then echo Creating $(XPIDL_GEN_DIR)/.done; rm -rf $(XPIDL_GEN_DIR); mkdir $(XPIDL_GEN_DIR); fi          @if test ! -d $(XPIDL_GEN_DIR); then echo Creating $(XPIDL_GEN_DIR)/.done; rm -rf $(XPIDL_GEN_DIR); mkdir $(XPIDL_GEN_DIR); fi
# Line 1700  Line 1671 
1671  $(XPIDL_GEN_DIR)/%.h: %.idl $(XPIDL_COMPILE) $(XPIDL_GEN_DIR)/.done  $(XPIDL_GEN_DIR)/%.h: %.idl $(XPIDL_COMPILE) $(XPIDL_GEN_DIR)/.done
1672          $(REPORT_BUILD)          $(REPORT_BUILD)
1673          $(ELOG) $(XPIDL_COMPILE) -m header -w $(XPIDL_FLAGS) -o $(XPIDL_GEN_DIR)/$* $(_VPATH_SRCS)          $(ELOG) $(XPIDL_COMPILE) -m header -w $(XPIDL_FLAGS) -o $(XPIDL_GEN_DIR)/$* $(_VPATH_SRCS)
1674          @if test -n "$(findstring $*.h, $(EXPORTS) $(SDK_HEADERS))"; \          @if test -n "$(findstring $*.h, $(EXPORTS))"; \
1675            then echo "*** WARNING: file $*.h generated from $*.idl overrides $(srcdir)/$*.h"; else true; fi            then echo "*** WARNING: file $*.h generated from $*.idl overrides $(srcdir)/$*.h"; else true; fi
1676    
1677  ifndef NO_GEN_XPT  ifndef NO_GEN_XPT
# Line 1712  Line 1683 
1683    
1684  # no need to link together if XPIDLSRCS contains only XPIDL_MODULE  # no need to link together if XPIDLSRCS contains only XPIDL_MODULE
1685  ifneq ($(XPIDL_MODULE).idl,$(strip $(XPIDLSRCS)))  ifneq ($(XPIDL_MODULE).idl,$(strip $(XPIDLSRCS)))
1686  $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt: $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.xpt,$(XPIDLSRCS) $(SDK_XPIDLSRCS)) $(GLOBAL_DEPS) $(XPIDL_LINK)  $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt: $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.xpt,$(XPIDLSRCS)) $(GLOBAL_DEPS) $(XPIDL_LINK)
1687          $(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))
1688  endif # XPIDL_MODULE.xpt != XPIDLSRCS  endif # XPIDL_MODULE.xpt != XPIDLSRCS
1689    
1690  libs:: $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt  libs:: $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt
# Line 1725  Line 1696 
1696    
1697  GARBAGE_DIRS            += $(XPIDL_GEN_DIR)  GARBAGE_DIRS            += $(XPIDL_GEN_DIR)
1698    
1699  endif # XPIDLSRCS || SDK_XPIDLSRCS  endif # XPIDLSRCS
1700    
1701  ifneq ($(XPIDLSRCS),)  ifneq ($(XPIDLSRCS),)
1702  # export .idl files to $(IDL_DIR)  # export .idl files to $(IDL_DIR)
# Line 1733  Line 1704 
1704  export:: $(XPIDLSRCS) $(IDL_DIR)  export:: $(XPIDLSRCS) $(IDL_DIR)
1705          $(INSTALL) $(IFLAGS1) $^          $(INSTALL) $(IFLAGS1) $^
1706    
1707  export:: $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.h, $(XPIDLSRCS)) $(PUBLIC)  export:: $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.h, $(XPIDLSRCS)) $(DIST)/include
1708          $(INSTALL) $(IFLAGS1) $^          $(INSTALL) $(IFLAGS1) $^
1709  endif # NO_DIST_INSTALL  endif # NO_DIST_INSTALL
1710    
# Line 1753  Line 1724 
1724    
1725  export-idl:: $(SUBMAKEFILES) $(MAKE_DIRS)  export-idl:: $(SUBMAKEFILES) $(MAKE_DIRS)
1726    
1727  ifneq ($(XPIDLSRCS)$(SDK_XPIDLSRCS),)  ifneq ($(XPIDLSRCS),)
1728  ifndef NO_DIST_INSTALL  ifndef NO_DIST_INSTALL
1729  export-idl:: $(XPIDLSRCS) $(SDK_XPIDLSRCS) $(IDL_DIR)  export-idl:: $(XPIDLSRCS) $(IDL_DIR)
1730          $(INSTALL) $(IFLAGS1) $^          $(INSTALL) $(IFLAGS1) $^
1731  endif  endif
1732  endif  endif
1733          +$(LOOP_OVER_PARALLEL_DIRS)          $(LOOP_OVER_PARALLEL_DIRS)
1734          +$(LOOP_OVER_DIRS)          $(LOOP_OVER_DIRS)
1735          +$(LOOP_OVER_TOOL_DIRS)          $(LOOP_OVER_TOOL_DIRS)
   
   
   
   
 ifneq ($(SDK_XPIDLSRCS),)  
 # export .idl files to $(IDL_DIR) & $(SDK_IDL_DIR)  
 ifndef NO_DIST_INSTALL  
 export:: $(SDK_XPIDLSRCS) $(IDL_DIR)  
         $(INSTALL) $(IFLAGS1) $^  
   
 export:: $(SDK_XPIDLSRCS) $(SDK_IDL_DIR)  
         $(INSTALL) $(IFLAGS1) $^  
   
 export:: $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.h, $(SDK_XPIDLSRCS)) $(PUBLIC)  
         $(INSTALL) $(IFLAGS1) $^  
   
 export:: $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.h, $(SDK_XPIDLSRCS)) $(SDK_PUBLIC)  
         $(INSTALL) $(IFLAGS1) $^  
 endif  
   
 endif # SDK_XPIDLSRCS  
   
   
1736    
1737  ifdef MOZ_JAVAXPCOM  ifdef MOZ_JAVAXPCOM
1738  ifneq ($(XPIDLSRCS)$(SDK_XPIDLSRCS),)  ifneq ($(XPIDLSRCS),)
1739    
1740  JAVA_XPIDLSRCS = $(XPIDLSRCS) $(SDK_XPIDLSRCS)  JAVA_XPIDLSRCS = $(XPIDLSRCS)
1741    
1742  # A single IDL file can contain multiple interfaces, which result in multiple  # A single IDL file can contain multiple interfaces, which result in multiple
1743  # Java interface files.  So use hidden dependency files.  # Java interface files.  So use hidden dependency files.
# Line 1823  Line 1771 
1771  export:: $(JAVA_DIST_DIR) $(JAVADEPFILES) $(JAVA_INSTALL_DIR)  export:: $(JAVA_DIST_DIR) $(JAVADEPFILES) $(JAVA_INSTALL_DIR)
1772          (cd $(JAVA_GEN_DIR) && tar $(TAR_CREATE_FLAGS) - .) | (cd $(JAVA_INSTALL_DIR) && tar -xf -)          (cd $(JAVA_GEN_DIR) && tar $(TAR_CREATE_FLAGS) - .) | (cd $(JAVA_INSTALL_DIR) && tar -xf -)
1773    
1774  endif # XPIDLSRCS || SDK_XPIDLSRCS  endif # XPIDLSRCS
1775  endif # MOZ_JAVAXPCOM  endif # MOZ_JAVAXPCOM
1776    
1777  ################################################################################  ################################################################################
# Line 1832  Line 1780 
1780  libs:: $(EXTRA_COMPONENTS)  libs:: $(EXTRA_COMPONENTS)
1781  ifndef NO_DIST_INSTALL  ifndef NO_DIST_INSTALL
1782          $(INSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/components          $(INSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/components
1783            @$(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl $(FINAL_TARGET)/components/components.list $(notdir $^)
1784  endif  endif
1785    
1786  endif  endif
# Line 1842  Line 1791 
1791          $(EXIT_ON_ERROR) \          $(EXIT_ON_ERROR) \
1792          $(NSINSTALL) -D $(FINAL_TARGET)/components; \          $(NSINSTALL) -D $(FINAL_TARGET)/components; \
1793          for i in $^; do \          for i in $^; do \
1794            dest=$(FINAL_TARGET)/components/`basename $$i`; \            fname=`basename $$i`; \
1795              dest=$(FINAL_TARGET)/components/$${fname}; \
1796            $(RM) -f $$dest; \            $(RM) -f $$dest; \
1797            $(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) $$i > $$dest; \            $(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) $$i > $$dest; \
1798              $(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl $(FINAL_TARGET)/components/components.list $$fname; \
1799          done          done
1800  endif  endif
1801    
# Line 1906  Line 1857 
1857    
1858  chrome::  chrome::
1859          $(MAKE) realchrome          $(MAKE) realchrome
1860          +$(LOOP_OVER_PARALLEL_DIRS)          $(LOOP_OVER_PARALLEL_DIRS)
1861          +$(LOOP_OVER_DIRS)          $(LOOP_OVER_DIRS)
1862          +$(LOOP_OVER_TOOL_DIRS)          $(LOOP_OVER_TOOL_DIRS)
1863    
1864  $(FINAL_TARGET)/chrome:  $(FINAL_TARGET)/chrome:
1865          $(NSINSTALL) -D $@          $(NSINSTALL) -D $@
# Line 2053  Line 2004 
2004          $(REPORT_BUILD)          $(REPORT_BUILD)
2005          @$(MAKE_DEPS_NOAUTO)          @$(MAKE_DEPS_NOAUTO)
2006    
2007  ifneq (,$(OBJS)$(XPIDLSRCS)$(SDK_XPIDLSRCS)$(SIMPLE_PROGRAMS))  ifneq (,$(OBJS)$(XPIDLSRCS)$(SIMPLE_PROGRAMS))
2008  depend:: $(SUBMAKEFILES) $(MAKE_DIRS) $(MDDEPFILES)  depend:: $(SUBMAKEFILES) $(MAKE_DIRS) $(MDDEPFILES)
2009  else  else
2010  depend:: $(SUBMAKEFILES)  depend:: $(SUBMAKEFILES)
2011  endif  endif
2012          +$(LOOP_OVER_PARALLEL_DIRS)          $(LOOP_OVER_PARALLEL_DIRS)
2013          +$(LOOP_OVER_DIRS)          $(LOOP_OVER_DIRS)
2014          +$(LOOP_OVER_TOOL_DIRS)          $(LOOP_OVER_TOOL_DIRS)
2015    
2016  dependclean:: $(SUBMAKEFILES)  dependclean:: $(SUBMAKEFILES)
2017          rm -f $(MDDEPFILES)          rm -f $(MDDEPFILES)
2018          +$(LOOP_OVER_PARALLEL_DIRS)          $(LOOP_OVER_PARALLEL_DIRS)
2019          +$(LOOP_OVER_DIRS)          $(LOOP_OVER_DIRS)
2020          +$(LOOP_OVER_TOOL_DIRS)          $(LOOP_OVER_TOOL_DIRS)
2021    
2022  endif # MOZ_AUTO_DEPS  endif # MOZ_AUTO_DEPS
2023    
# Line 2089  Line 2040 
2040          @if test ! -d $@; then echo Creating $@; rm -rf $@; mkdir $@; else true; fi          @if test ! -d $@; then echo Creating $@; rm -rf $@; mkdir $@; else true; fi
2041    
2042  ifneq (,$(filter-out all chrome default export realchrome tools clean clobber clobber_all distclean realclean,$(MAKECMDGOALS)))  ifneq (,$(filter-out all chrome default export realchrome tools clean clobber clobber_all distclean realclean,$(MAKECMDGOALS)))
2043  ifneq (,$(OBJS)$(XPIDLSRCS)$(SDK_XPIDLSRCS)$(SIMPLE_PROGRAMS))  ifneq (,$(OBJS)$(XPIDLSRCS)$(SIMPLE_PROGRAMS))
2044  MDDEPEND_FILES          := $(strip $(wildcard $(MDDEPDIR)/*.pp))  MDDEPEND_FILES          := $(strip $(wildcard $(MDDEPDIR)/*.pp))
2045    
2046  ifneq (,$(MDDEPEND_FILES))  ifneq (,$(MDDEPEND_FILES))
# Line 2157  Line 2108 
2108  # 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
2109  # name already exists.  # name already exists.
2110  #  #
2111  .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  .PHONY: all alltags boot checkout chrome realchrome clean clobber clobber_all export install libs makefiles realclean run_apprunner tools $(DIRS) $(TOOL_DIRS) FORCE
2112    
2113  # Used as a dependency to force targets to rebuild  # Used as a dependency to force targets to rebuild
2114  FORCE:  FORCE:
# Line 2172  Line 2123 
2123    
2124  TAGS: $(SUBMAKEFILES) $(CSRCS) $(CPPSRCS) $(wildcard *.h)  TAGS: $(SUBMAKEFILES) $(CSRCS) $(CPPSRCS) $(wildcard *.h)
2125          -etags $(CSRCS) $(CPPSRCS) $(wildcard *.h)          -etags $(CSRCS) $(CPPSRCS) $(wildcard *.h)
2126          +$(LOOP_OVER_PARALLEL_DIRS)          $(LOOP_OVER_PARALLEL_DIRS)
2127          +$(LOOP_OVER_DIRS)          $(LOOP_OVER_DIRS)
2128    
2129  echo-variable-%:  echo-variable-%:
2130          @echo "$($*)"          @echo "$($*)"
# Line 2181  Line 2132 
2132  echo-tiers:  echo-tiers:
2133          @echo $(TIERS)          @echo $(TIERS)
2134    
2135    echo-tier-dirs:
2136            @$(foreach tier,$(TIERS),echo '$(tier):'; echo '  dirs: $(tier_$(tier)_dirs)'; echo '  staticdirs: $(tier_$(tier)_staticdirs)'; )
2137    
2138  echo-dirs:  echo-dirs:
2139          @echo $(DIRS)          @echo $(DIRS)
2140    
# Line 2196  Line 2150 
2150  else  else
2151          @$(if $(REQUIRES),echo $(subst $(topsrcdir)/,,$(srcdir)): $(MODULE): $(REQUIRES))          @$(if $(REQUIRES),echo $(subst $(topsrcdir)/,,$(srcdir)): $(MODULE): $(REQUIRES))
2152  endif  endif
2153          +$(LOOP_OVER_PARALLEL_DIRS)          $(LOOP_OVER_PARALLEL_DIRS)
2154          +$(LOOP_OVER_DIRS)          $(LOOP_OVER_DIRS)
2155    
2156  echo-depth-path:  echo-depth-path:
2157          @$(topsrcdir)/build/unix/print-depth-path.sh          @$(topsrcdir)/build/unix/print-depth-path.sh
# Line 2226  Line 2180 
2180          @echo "DEPENDENT_LIBS      = $(DEPENDENT_LIBS)"          @echo "DEPENDENT_LIBS      = $(DEPENDENT_LIBS)"
2181          @echo --------------------------------------------------------------------------------          @echo --------------------------------------------------------------------------------
2182  endif  endif
2183          +$(LOOP_OVER_PARALLEL_DIRS)          $(LOOP_OVER_PARALLEL_DIRS)
2184          +$(LOOP_OVER_DIRS)          $(LOOP_OVER_DIRS)
2185    
2186  showbuild:  showbuild:
2187          @echo "MOZ_BUILD_ROOT     = $(MOZ_BUILD_ROOT)"          @echo "MOZ_BUILD_ROOT     = $(MOZ_BUILD_ROOT)"
# Line 2284  Line 2238 
2238          @echo "Build Modules    = $(BUILD_MODULES)"          @echo "Build Modules    = $(BUILD_MODULES)"
2239          @echo "Module dirs      = $(BUILD_MODULE_DIRS)"          @echo "Module dirs      = $(BUILD_MODULE_DIRS)"
2240    
 zipmakes:  
 ifneq (,$(filter $(PROGRAM) $(SIMPLE_PROGRAMS) $(LIBRARY) $(SHARED_LIBRARY),$(TARGETS)))  
         zip $(DEPTH)/makefiles $(subst $(topsrcdir),$(MOZ_SRC)/mozilla,$(srcdir)/Makefile.in)  
 endif  
         +$(LOOP_OVER_PARALLEL_DIRS)  
         +$(LOOP_OVER_DIRS)  
   
2241  documentation:  documentation:
2242          @cd $(DEPTH)          @cd $(DEPTH)
2243          $(DOXYGEN) $(DEPTH)/config/doxygen.cfg          $(DOXYGEN) $(DEPTH)/config/doxygen.cfg
2244    
2245  ifdef ENABLE_TESTS  ifdef ENABLE_TESTS
2246  check:: $(SUBMAKEFILES) $(MAKE_DIRS)  check:: $(SUBMAKEFILES) $(MAKE_DIRS)
2247          +$(LOOP_OVER_PARALLEL_DIRS)          $(LOOP_OVER_PARALLEL_DIRS)
2248          +$(LOOP_OVER_DIRS)          $(LOOP_OVER_DIRS)
2249          +$(LOOP_OVER_TOOL_DIRS)          $(LOOP_OVER_TOOL_DIRS)
2250  endif  endif
2251    
2252    
2253    FREEZE_VARIABLES = \
2254      CSRCS \
2255      CPPSRCS \
2256      EXPORTS \
2257      XPIDLSRCS \
2258      DIRS \
2259      LIBRARY \
2260      MODULE \
2261      REQUIRES \
2262      SHORT_LIBNAME \
2263      TIERS \
2264      $(NULL)
2265    
2266    $(foreach var,$(FREEZE_VARIABLES),$(eval $(var)_FROZEN := '$($(var))'))
2267    
2268    CHECK_FROZEN_VARIABLES = $(foreach var,$(FREEZE_VARIABLES), \
2269      $(if $(subst $($(var)_FROZEN),,'$($(var))'),$(error Makefile variable '$(var)' changed value after including rules.mk. Was $($(var)_FROZEN), now $($(var)).)))
2270    
2271    libs export libs::
2272            $(CHECK_FROZEN_VARIABLES)

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

  ViewVC Help
Powered by ViewVC 1.1.24