Fix incorrect depfile path relativization

While 'gyp dictates that commands are run from the base directory'
(ninja.py:1613), ninja still expects the depfile path for the depfile
that this command will create to be relative to the build directory.

If the depfile argument doesn't contain special paths like
<(PRODUCT_DIR), <(SHARED_INTERMEDIATE_DIR) or <(INTERMEDIATE_DIR),
ExpandSpecial returns its argument unchanged.

If it does contain one of these special paths, on the other hand, ninja
will never find the correct depfile without this fix.

Bug: 549
Change-Id: Idfae9dd1e7134720c5ce19fc8e4f877dde796d56
Reviewed-on: https://chromium-review.googlesource.com/c/external/gyp/+/1561250
Reviewed-by: Mark Mentovai <mark@chromium.org>
4 files changed
tree: 28cfc2a6a6797614bbb623bd8fe7c21b5fb8e4f1
  1. .gitignore
  2. .travis.yml
  3. AUTHORS
  4. DEPS
  5. LICENSE
  6. OWNERS
  7. PRESUBMIT.py
  8. README.md
  9. buildbot/
  10. codereview.settings
  11. data/
  12. gyp
  13. gyp.bat
  14. gyp_main.py
  15. gyptest.py
  16. pylib/
  17. samples/
  18. setup.py
  19. test/
  20. tools/
README.md

GYP can Generate Your Projects.

Documents are available at gyp.gsrc.io, or you can check out md-pages branch to read those documents offline.