Last Comment Bug 750253 - XPConnect is rebuilt unnecessarily
: XPConnect is rebuilt unnecessarily
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla15
Assigned To: Kyle Huey [:khuey] (
Depends on:
  Show dependency treegraph
Reported: 2012-04-30 07:06 PDT by Kyle Huey [:khuey] (
Modified: 2012-05-02 21:07 PDT (History)
3 users (show)
khuey: in‑testsuite-
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Patch (1.04 KB, patch)
2012-04-30 07:06 PDT, Kyle Huey [:khuey] (
ted: review+
Details | Diff | Splinter Review

Description Kyle Huey [:khuey] ( 2012-04-30 07:06:04 PDT
Created attachment 619545 [details] [diff] [review]

This was ... fun.

js/xpconnect/src/ has the following lines

nsXPConnect.$(OBJ_SUFFIX): dom_quickstubs.h


dom_quickstubs.h: dom_quickstubs.cpp writes the .h after the .cpp.  Thus, the mtime of the .h is later than the mtime of the .cpp.  When we rebuild, pymake recognizes that dom_quickstubs.h needs to be rebuilt and "executes" the empty rule (but prints no logging information!).  It then rebuilds nsXPConnect.$(OBJ_SUFFIX) because its dependency was just rebuilt.
Comment 1 Ted Mielczarek [:ted.mielczarek] 2012-04-30 08:09:17 PDT
Comment on attachment 619545 [details] [diff] [review]

Review of attachment 619545 [details] [diff] [review]:

Is this a pymake bug that we should file? Obviously the logic here was bad, so the dependency checking was doing the right thing, but gmake doesn't seem to exhibit this behavior.
Comment 2 Ted Mielczarek [:ted.mielczarek] 2012-04-30 08:30:25 PDT
After some testing, it looks like gmake is a little more lenient here, running "make -d" on a testcase prints:
      No need to remake target `blah.cpp'.
     Finished prerequisites of target file `blah.h'.
     Prerequisite `blah.cpp' is newer than target `blah.h'.
    No commands for `blah.h' and no prerequisites actually changed.
    No need to remake target `blah.h'.

If you had an actual command (even an empty one) in the blah.h: blah.cpp rule, it'd get run every time.
Comment 3 Kyle Huey [:khuey] ( 2012-04-30 09:31:36 PDT

Note You need to log in before you can comment on or make changes to this bug.