[PATCH] D148146: [clang] Make make_cxx_dr_status script runnable from anywhere

Vlad Serebrennikov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 12 10:30:54 PDT 2023


Endill created this revision.
Endill added reviewers: clang-language-wg, cor3ntin.
Herald added a project: All.
Endill requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D148146

Files:
  clang/www/make_cxx_dr_status


Index: clang/www/make_cxx_dr_status
===================================================================
--- clang/www/make_cxx_dr_status
+++ 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):


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148146.512892.patch
Type: text/x-patch
Size: 726 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230412/0ff495f7/attachment-0001.bin>


More information about the cfe-commits mailing list