aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorteor <teor@torproject.org>2020-01-20 13:20:14 +1000
committerteor <teor@torproject.org>2020-01-20 13:20:14 +1000
commit2c75d4a8d0bea2e9c0ebd5ef07b6f9149ce135cb (patch)
tree0b9f79b0e6b79cc1e0006509b1e865f4812950dc /scripts
parent0418bc0cb276a6c11f6f05332ca15c87b5a5e56d (diff)
downloadtor-2c75d4a8d0bea2e9c0ebd5ef07b6f9149ce135cb.tar.gz
tor-2c75d4a8d0bea2e9c0ebd5ef07b6f9149ce135cb.zip
add_c_file: Improve script documentation
Part of 32962.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/maint/add_c_file.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/scripts/maint/add_c_file.py b/scripts/maint/add_c_file.py
index a7478cbecf..75e1f556b8 100755
--- a/scripts/maint/add_c_file.py
+++ b/scripts/maint/add_c_file.py
@@ -4,16 +4,20 @@
Add a C file with matching header to the Tor codebase. Creates
both files from templates, and adds them to the right include.am file.
- This script takes paths relative to the top-level tor directory.
- It creates files, and inserts them into include.am, also relative to
- the top-level tor directory.
+ This script takes paths relative to the top-level tor directory. It
+ expects to be run from that directory.
+
+ This script creates files, and inserts them into include.am, also
+ relative to the top-level tor directory.
But the template content in those files is relative to tor's src
directory. (This script strips "src" from the paths used to create
templated comments and macros.)
This script expects posix paths, so it should be run with a python
- where os.path is posixpath. (Rather than ntpath.)
+ where os.path is posixpath. (Rather than ntpath.) This probably means
+ Linux, macOS, or BSD, although it might work on Windows if your python
+ was compiled with mingw, MSYS, or cygwin.
Example usage: