[clang] d945b64 - [clang] Make make_cxx_dr_status script runnable from anywhere

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 12 10:46:13 PDT 2023


Author: Vlad Serebrennikov
Date: 2023-04-12T20:46:05+03:00
New Revision: d945b6496ec6604f692804d501fc96583069d432

URL: https://github.com/llvm/llvm-project/commit/d945b6496ec6604f692804d501fc96583069d432
DIFF: https://github.com/llvm/llvm-project/commit/d945b6496ec6604f692804d501fc96583069d432.diff

LOG: [clang] Make make_cxx_dr_status script runnable from anywhere

This script has hardcoded relative paths to `clang/test/CXX/drs`, `cwg_index.html`, and `cxx_dr_status.html`, which requires running it with `clang/www` CWD. This patch makes those paths relative to path of the script itself, so that it could be run from anywhere.

Reviewed By: #clang-language-wg, cor3ntin

Differential Revision: https://reviews.llvm.org/D148146

Added: 
    

Modified: 
    clang/www/make_cxx_dr_status

Removed: 
    


################################################################################
diff  --git a/clang/www/make_cxx_dr_status b/clang/www/make_cxx_dr_status
index 205922169ebe8..c6229b9bf2c92 100755
--- a/clang/www/make_cxx_dr_status
+++ b/clang/www/make_cxx_dr_status
@@ -2,10 +2,11 @@
 import sys, os, re, urllib.request
 
 
-default_issue_list_path = 'cwg_index.html'
+clang_www_dir = os.path.dirname(__file__)
+default_issue_list_path = os.path.join(clang_www_dir, 'cwg_index.html')
 issue_list_url = "https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_index.html"
-output = 'cxx_dr_status.html'
-dr_test_dir = '../test/CXX/drs'
+output = os.path.join(clang_www_dir, 'cxx_dr_status.html')
+dr_test_dir = os.path.join(clang_www_dir, '../test/CXX/drs')
 
 class DR:
   def __init__(self, section, issue, url, status, title):


        


More information about the cfe-commits mailing list