summaryrefslogtreecommitdiffstats
path: root/clang/docs/tools
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
commit370bfb4431c16c7a8c122b5ec6a32ec461803ca1 (patch)
treee907910c90045aff6337161b6e634878ca858cf0 /clang/docs/tools
parente98cc7477fc261567609fd2dd7afc8ef97698589 (diff)
downloadbcm5719-llvm-370bfb4431c16c7a8c122b5ec6a32ec461803ca1.tar.gz
bcm5719-llvm-370bfb4431c16c7a8c122b5ec6a32ec461803ca1.zip
Allow running dump_format_style.py from any directory.
llvm-svn: 261642
Diffstat (limited to 'clang/docs/tools')
-rwxr-xr-xclang/docs/tools/dump_format_style.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/docs/tools/dump_format_style.py b/clang/docs/tools/dump_format_style.py
index b61d2017d05..42e957044fd 100755
--- a/clang/docs/tools/dump_format_style.py
+++ b/clang/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):
OpenPOWER on IntegriCloud