Bug 967297 - consider ipdl modules as inputs to the ipdl build process; r=glandium
authorNathan Froyd <froydnj@gmail.com>
Thu, 06 Feb 2014 00:21:46 -0500
changeset 167151 9185c4a586dfa67fa80aaba5d532f3cfb855f9e6
parent 167150 a35eb8ef75a1a29261a1f551710fd0b7cd6f1d37
child 167152 98236f59f6f99dc6783cfa4ce6f571eed80e4b0a
push id26159
push usercbook@mozilla.com
push dateThu, 06 Feb 2014 11:50:11 +0000
treeherdermozilla-central@b04e2524e2eb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs967297
milestone30.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 967297 - consider ipdl modules as inputs to the ipdl build process; r=glandium
ipc/ipdl/ipdl.py
--- a/ipc/ipdl/ipdl.py
+++ b/ipc/ipdl/ipdl.py
@@ -1,14 +1,17 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 import optparse, os, re, sys
 from cStringIO import StringIO
+from mozbuild.pythonutil import iter_modules_in_path
+import mozpack.path as mozpath
+import itertools
 
 import ipdl
 
 def log(minv, fmt, *args):
     if _verbosity >= minv:
         print fmt % args
 
 # process command line
@@ -41,17 +44,19 @@ includedirs = [ os.path.abspath(incdir) 
 
 if not len(files):
     op.error("No IPDL files specified")
 
 ipcmessagestartpath = os.path.join(headersdir, 'IPCMessageStart.h')
 
 # Compiling the IPDL files can take a long time, even on a fast machine.
 # Check to see whether we need to do any work.
-latestipdlmod = max(os.stat(f).st_mtime for f in files)
+latestipdlmod = max(os.stat(f).st_mtime
+                    for f in itertools.chain(files,
+                                             iter_modules_in_path(mozpath.dirname(__file__))))
 
 def outputModTime(f):
     # A non-existant file is newer than everything.
     if not os.path.exists(f):
         return 0
     return os.stat(f).st_mtime
 
 # Because the IPDL headers are placed into directories reflecting their