https://codereview.appspot.com/553700043/diff/567370043/mf/scan-mf-deps.py File mf/scan-mf-deps.py (right):
https://codereview.appspot.com/553700043/diff/567370043/mf/scan-mf-deps.py#newcode12 mf/scan-mf-deps.py:12: target = target.replace(srcdir, "").lstrip("/") This doesn't work for out-of-tree builds where srcdir != builddir. target is naturally below builddir and srcdir is not found, so it only lstrip's / which leads to an absolute path without the leading slash. https://codereview.appspot.com/553700043/