Bug 901644 - Allow mach build paths to be specified relative to $srcdir; r=gps
☠☠ backed out by a727146d85e2 ☠ ☠
authorDave Camp <dcamp@mozilla.com>
Mon, 19 Aug 2013 20:47:07 -0700
changeset 143206 a82f3a08ff3a7e817eb9bd5750b71a89d433d296
parent 143180 c21468186d3de4b9a9b2eed2c2419ec4b2ade7cb
child 143207 7be02f09275ca891965128227decabce590e5842
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersgps
bugs901644
milestone26.0a1
Bug 901644 - Allow mach build paths to be specified relative to $srcdir; r=gps DONTBUILD (NPOTB)
python/mozbuild/mozbuild/util.py
--- a/python/mozbuild/mozbuild/util.py
+++ b/python/mozbuild/mozbuild/util.py
@@ -170,22 +170,18 @@ def resolve_target_to_make(topobjdir, ta
     A regular (non-Makefile) file resolves to the nearest directory at
     or above the file containing a Makefile, and an appropriate
     target.
 
     A Makefile resolves to the nearest parent strictly above the
     Makefile containing a different Makefile, and an appropriate
     target.
     '''
-    if os.path.isabs(target):
-        print('Absolute paths for make targets are not allowed.')
-        return (None, None)
 
-    target = target.replace(os.sep, '/')
-
+    target = target.replace(os.sep, '/').lstrip('/')
     abs_target = os.path.join(topobjdir, target)
 
     # For directories, run |make -C dir|. If the directory does not
     # contain a Makefile, check parents until we find one. At worst,
     # this will terminate at the root.
     if os.path.isdir(abs_target):
         current = abs_target