summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-01-15 13:10:14 -0500
committerNick Mathewson <nickm@torproject.org>2020-01-15 13:10:14 -0500
commit5e70c27e8560ac1885ae9d9e1b79d3838b49cc09 (patch)
tree504a8f3625644d87d6883f4d9afd4c8ce809021b /scripts
parent5fa7c1b13fbefcfd9b71a1f95922cf4e92b5e141 (diff)
parent73ac1add3f2af813c18b1da5f0082f6112267304 (diff)
downloadtor-5e70c27e8560ac1885ae9d9e1b79d3838b49cc09.tar.gz
tor-5e70c27e8560ac1885ae9d9e1b79d3838b49cc09.zip
Merge remote-tracking branch 'tor-github/pr/1657'
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/maint/add_c_file.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/scripts/maint/add_c_file.py b/scripts/maint/add_c_file.py
index a9a6eb25bd..9ec182efcc 100755
--- a/scripts/maint/add_c_file.py
+++ b/scripts/maint/add_c_file.py
@@ -192,12 +192,9 @@ def get_include_am_location(fname):
not (yet) consistent.
"""
td = topdir_file(fname)
- m = re.match(r'^lib/([a-z0-9_]*)/', td)
+ m = re.match(r'^(lib|core|feature|app)/([a-z0-9_]*)/', td)
if m:
- return "src/lib/{}/include.am".format(m.group(1))
-
- if re.match(r'^(core|feature|app)/', td):
- return "src/core/include.am"
+ return "src/{}/{}/include.am".format(m.group(1),m.group(2))
if re.match(r'^test/', td):
return "src/test/include.am"