summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2016-02-23 16:11:43 +0000
committerAlexander Kornienko <alexfh@google.com>2016-02-23 16:11:43 +0000
commitdf679caa1cf353daf95f2739380f05f8bb65312f (patch)
tree895883dc06b3b6f5cbbff67939f2d04452df1969 /docs
parent01173ebb9d1a8a3aa66291bcf1f3f48398f82ae6 (diff)
downloadclang-df679caa1cf353daf95f2739380f05f8bb65312f.tar.gz
Allow running dump_format_style.py from any directory.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261642 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rwxr-xr-xdocs/tools/dump_format_style.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/tools/dump_format_style.py b/docs/tools/dump_format_style.py
index b61d2017d0..42e957044f 100755
--- a/docs/tools/dump_format_style.py
+++ b/docs/tools/dump_format_style.py
@@ -4,11 +4,13 @@
# Run from the directory in which this file is located to update the docs.
import collections
+import os
import re
import urllib2
-FORMAT_STYLE_FILE = '../../include/clang/Format/Format.h'
-DOC_FILE = '../ClangFormatStyleOptions.rst'
+CLANG_DIR = os.path.join(os.path.dirname(__file__), '../..')
+FORMAT_STYLE_FILE = os.path.join(CLANG_DIR, 'include/clang/Format/Format.h')
+DOC_FILE = os.path.join(CLANG_DIR, 'docs/ClangFormatStyleOptions.rst')
def substitute(text, tag, contents):