diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-25 02:01:30 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-25 02:01:30 +0000 |
commit | cdd8b38dee9e50540580f02b793e9a2fa0d0f6eb (patch) | |
tree | caa2c2e0071d4b7da926ae382bc9474f28e55c38 /tools | |
parent | 7e7427cf17bd36dce33678b77cba29126adac3f8 (diff) | |
download | chromium_src-cdd8b38dee9e50540580f02b793e9a2fa0d0f6eb.zip chromium_src-cdd8b38dee9e50540580f02b793e9a2fa0d0f6eb.tar.gz chromium_src-cdd8b38dee9e50540580f02b793e9a2fa0d0f6eb.tar.bz2 |
grit_info: Explicitly make __file__ relative to the current directory.
__file__ is relative if grit_info is called like `python ../tools/grit/grit_info.py`,
but not if it's invoked from python code like `import grit_info; grit_info.DoMain()`.
And that confuses the xcode project generator, which will complain about hash
collisions if these paths are serialized in absolute form.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/7066030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86551 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/grit/grit_info.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/grit/grit_info.py b/tools/grit/grit_info.py index c0e0ed8..675e0aa 100755 --- a/tools/grit/grit_info.py +++ b/tools/grit/grit_info.py @@ -66,7 +66,7 @@ def Inputs(filename, defines): # Add in the grit source files. If one of these change, we want to re-run # grit. - grit_root_dir = os.path.dirname(__file__) + grit_root_dir = os.path.relpath(os.path.dirname(__file__), os.getcwd()) for root, dirs, filenames in os.walk(grit_root_dir): grit_src = [os.path.join(root, f) for f in filenames if f.endswith('.py') or f == 'resource_ids'] |