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


Attachments
Patch (1.04 KB, patch)
2012-04-30 07:06 PDT, Kyle Huey [:khuey] (khuey@mozilla.com) (Away until 6/13)
ted: review+
Details | Diff | Review

Description Kyle Huey [:khuey] (khuey@mozilla.com) (Away until 6/13) 2012-04-30 07:06:04 PDT
Created attachment 619545 [details] [diff] [review]
Patch

This was ... fun.

js/xpconnect/src/Makefile.in has the following lines

nsXPConnect.$(OBJ_SUFFIX): dom_quickstubs.h

...

dom_quickstubs.h: dom_quickstubs.cpp

qsgen.py 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]
Patch

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] (khuey@mozilla.com) (Away until 6/13) 2012-04-30 09:31:36 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/5bc5a841856e
Comment 4 :Ehsan Akhgari (busy, don't ask for review please) 2012-05-02 21:07:16 PDT
https://hg.mozilla.org/mozilla-central/rev/5bc5a841856e

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