diff options
author | Wayne Davison <wayne@opencoder.net> | 2020-06-11 17:09:33 -0700 |
---|---|---|
committer | Wayne Davison <wayne@opencoder.net> | 2020-06-11 19:15:08 -0700 |
commit | 66bd4774a8f67d7b822d585d4dbc269f34137cab (patch) | |
tree | 2d4f93a00de63b799b035018f35b908ccae7ea64 /md2man | |
parent | c117fa4bf9976f3e5e284b87a2304398e4428208 (diff) | |
download | rsync-66bd4774a8f67d7b822d585d4dbc269f34137cab.tar.gz |
Allow maintainer to build with /usr/local prefix but document /usr.
Diffstat (limited to 'md2man')
-rwxr-xr-x | md2man | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -94,7 +94,7 @@ def main(): fi.date = time.strftime('%d %b %Y', time.localtime(fi.mtime)) - env_subs = { } + env_subs = { 'prefix': os.environ.get('RSYNC_OVERRIDE_PREFIX', None) } with open(fi.srcdir + 'Makefile', 'r', encoding='utf-8') as fh: for line in fh: @@ -102,6 +102,8 @@ def main(): if not m: continue var, val = (m[1], m[2]) + if var == 'prefix' and env_subs[var] is not None: + continue while re.search(r'\$\{', val): val = re.sub(r'\$\{(\w+)\}', lambda m: env_subs[m[1]], val) env_subs[var] = val |