From: Alexander Kornienko Date: Tue, 23 Feb 2016 16:11:43 +0000 (+0000) Subject: Allow running dump_format_style.py from any directory. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=df679caa1cf353daf95f2739380f05f8bb65312f;p=clang 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 --- 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):