Bug 785622 - Only include .pp files corresponding to files we do build. r=khuey
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 29 Aug 2012 08:55:58 +0200
changeset 105779 c2e464e9524b528129e67204c6cb11af52dc2422
parent 105778 40e82036f9ec298374664fe78e540996126f1983
child 105780 2f3daa00593ce295e50736d647f32e6a6d6934bc
push id55
push usershu@rfrn.org
push dateThu, 30 Aug 2012 01:33:09 +0000
reviewerskhuey
bugs785622
milestone18.0a1
Bug 785622 - Only include .pp files corresponding to files we do build. r=khuey
build/cl.py
config/rules.mk
js/src/build/cl.py
js/src/config/rules.mk
js/xpconnect/src/Makefile.in
media/libvpx/Makefile.in
--- a/build/cl.py
+++ b/build/cl.py
@@ -39,17 +39,17 @@ def InvokeClWithDependencyGeneration(cmd
         else:
             sys.stdout.write(line) # Make sure we preserve the relevant output
                                    # from cl
 
     ret = cl.wait()
     if ret != 0 or target == "":
         sys.exit(ret)
 
-    depsdir = os.path.normpath(os.path.join(os.path.dirname(target), ".deps"))
+    depsdir = os.path.normpath(os.path.join(os.curdir, ".deps"))
     depstarget = os.path.join(depsdir, depstarget)
     if not os.path.isdir(depsdir):
         try:
             os.makedirs(depsdir)
         except OSError:
             pass # This suppresses the error we get when the dir exists, at the
                  # cost of masking failure to create the directory.  We'll just
                  # die on the next line though, so it's not that much of a loss.
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -1492,17 +1492,17 @@ endif
 #   a previous build in the source tree) and thus neglect to create a
 #   dependency directory in the object directory, where we really need
 #   it.
 
 $(CURDIR)/$(MDDEPDIR):
 	$(MKDIR) -p $@
 
 ifneq (,$(filter-out all chrome default export realchrome tools clean clobber clobber_all distclean realclean,$(MAKECMDGOALS)))
-MDDEPEND_FILES		:= $(strip $(wildcard $(MDDEPDIR)/*.pp))
+MDDEPEND_FILES		:= $(strip $(wildcard $(foreach file,$(OBJS) $(PROGOBJS) $(HOST_OBJS) $(HOST_PROGOBJS) $(TARGETS) $(XPIDLSRCS:.idl=.h) $(XPIDLSRCS:.idl=.xpt),$(MDDEPDIR)/$(notdir $(file)).pp) $(addprefix $(MDDEPDIR)/,$(EXTRA_MDDEPEND_FILES))))
 
 ifneq (,$(MDDEPEND_FILES))
 # The script mddepend.pl checks the dependencies and writes to stdout
 # one rule to force out-of-date objects. For example,
 #   foo.o boo.o: FORCE
 # The script has an advantage over including the *.pp files directly
 # because it handles the case when header files are removed from the build.
 # 'make' would complain that there is no way to build missing headers.
--- a/js/src/build/cl.py
+++ b/js/src/build/cl.py
@@ -39,17 +39,17 @@ def InvokeClWithDependencyGeneration(cmd
         else:
             sys.stdout.write(line) # Make sure we preserve the relevant output
                                    # from cl
 
     ret = cl.wait()
     if ret != 0 or target == "":
         sys.exit(ret)
 
-    depsdir = os.path.normpath(os.path.join(os.path.dirname(target), ".deps"))
+    depsdir = os.path.normpath(os.path.join(os.curdir, ".deps"))
     depstarget = os.path.join(depsdir, depstarget)
     if not os.path.isdir(depsdir):
         try:
             os.makedirs(depsdir)
         except OSError:
             pass # This suppresses the error we get when the dir exists, at the
                  # cost of masking failure to create the directory.  We'll just
                  # die on the next line though, so it's not that much of a loss.
--- a/js/src/config/rules.mk
+++ b/js/src/config/rules.mk
@@ -1492,17 +1492,17 @@ endif
 #   a previous build in the source tree) and thus neglect to create a
 #   dependency directory in the object directory, where we really need
 #   it.
 
 $(CURDIR)/$(MDDEPDIR):
 	$(MKDIR) -p $@
 
 ifneq (,$(filter-out all chrome default export realchrome tools clean clobber clobber_all distclean realclean,$(MAKECMDGOALS)))
-MDDEPEND_FILES		:= $(strip $(wildcard $(MDDEPDIR)/*.pp))
+MDDEPEND_FILES		:= $(strip $(wildcard $(foreach file,$(OBJS) $(PROGOBJS) $(HOST_OBJS) $(HOST_PROGOBJS) $(TARGETS) $(XPIDLSRCS:.idl=.h) $(XPIDLSRCS:.idl=.xpt),$(MDDEPDIR)/$(notdir $(file)).pp) $(addprefix $(MDDEPDIR)/,$(EXTRA_MDDEPEND_FILES))))
 
 ifneq (,$(MDDEPEND_FILES))
 # The script mddepend.pl checks the dependencies and writes to stdout
 # one rule to force out-of-date objects. For example,
 #   foo.o boo.o: FORCE
 # The script has an advantage over including the *.pp files directly
 # because it handles the case when header files are removed from the build.
 # 'make' would complain that there is no way to build missing headers.
--- a/js/xpconnect/src/Makefile.in
+++ b/js/xpconnect/src/Makefile.in
@@ -78,16 +78,18 @@ LOCAL_INCLUDES = \
 		-I$(topsrcdir)/xpcom/ds \
 		$(NULL)
 
 SHARED_LIBRARY_LIBS = \
   ../loader/$(LIB_PREFIX)jsloader_s.$(LIB_SUFFIX) \
   ../wrappers/$(LIB_PREFIX)xpcwrappers_s.$(LIB_SUFFIX) \
   $(NULL)
 
+EXTRA_MDDEPEND_FILES = dom_qsgen.pp dombindingsgen.pp dictionary_helper_gen.pp event_impl_gen.pp
+
 include $(topsrcdir)/config/rules.mk
 
 DEFINES += \
   -DJSFILE \
   -DJS_THREADSAFE \
   -DEXPORT_XPC_API \
   -DNO_NSPR_10_SUPPORT \
   $(NULL)
--- a/media/libvpx/Makefile.in
+++ b/media/libvpx/Makefile.in
@@ -478,16 +478,18 @@ asm_enc_offsets.asm: asm_enc_offsets.s
 	    $(if $(VPX_AS_CONVERSION),| $(VPX_AS_CONVERSION)) > $@
 
 GARBAGE += asm_enc_offsets.s asm_enc_offsets.asm
 
 endif
 
 endif
 
+EXTRA_MDDEPEND_FILES = asm_enc_offsets.s.pp asm_enc_offsets.$(OBJ_SUFFIX).pp asm_com_offsets.s.pp asm_com_offsets.$(OBJ_SUFFIX).pp
+
 include $(topsrcdir)/config/rules.mk
 
 # This must be after rules.mk in order to use $(OBJ_SUFFIX) outside a
 # recursively-expanded variable.
 ifdef VPX_NEED_OBJ_INT_EXTRACT
 
 # only for MSVC
 ifdef _MSC_VER