Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(574)

Unified Diff: pylib/gyp/generator/make.py

Issue 11659002: Teach ninja to handle output directories outside the source dir. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pylib/gyp/generator/make.py
===================================================================
--- pylib/gyp/generator/make.py (revision 1537)
+++ pylib/gyp/generator/make.py (working copy)
@@ -619,21 +619,6 @@
return s.replace(' ', quote)
-def InvertRelativePath(path):
- """Given a relative path like foo/bar, return the inverse relative path:
- the path from the relative path back to the origin dir.
-
- E.g. os.path.normpath(os.path.join(path, InvertRelativePath(path)))
- should always produce the empty string."""
-
- if not path:
- return path
- # Only need to handle relative paths into subdirectories for now.
- assert '..' not in path, path
- depth = len(path.split(os.path.sep))
- return os.path.sep.join(['..'] * depth)
-
-
# Map from qualified target to path to output.
target_outputs = {}
# Map from qualified target to any linkable output. A subset
@@ -1417,7 +1402,7 @@
lambda p: Sourceify(self.Absolutify(p)))
# TARGET_POSTBUILDS_$(BUILDTYPE) is added to postbuilds later on.
- gyp_to_build = InvertRelativePath(self.path)
+ gyp_to_build = gyp.common.InvertRelativePath(self.path)
target_postbuild = self.xcode_settings.GetTargetPostbuilds(
configname,
QuoteSpaces(os.path.normpath(os.path.join(gyp_to_build,

Powered by Google App Engine
This is Rietveld 408576698