Commit cdd8b38d authored by thakis@chromium.org's avatar thakis@chromium.org

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
parent 7e7427cf
......@@ -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']
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment