From df679caa1cf353daf95f2739380f05f8bb65312f Mon Sep 17 00:00:00 2001 From: Alexander Kornienko Date: Tue, 23 Feb 2016 16:11:43 +0000 Subject: [PATCH] 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 --- docs/tools/dump_format_style.py | 6 ++++-- 1 file 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): -- 2.50.1