diff options
author | Jörg Mayer <jmayer@loplof.de> | 2013-09-05 08:55:09 +0000 |
---|---|---|
committer | Jörg Mayer <jmayer@loplof.de> | 2013-09-05 08:55:09 +0000 |
commit | a5e2a30fc7ce921fcbb2b6b18f9f23abe776eeb3 (patch) | |
tree | d4590df102c726589862e539c74f829f1c70716a /tools/asn2wrs.py | |
parent | 06c27f8749de1e90632acdfc0b0244fd8f8b1a23 (diff) |
Change the regexp syntax a bit.
svn path=/trunk/; revision=51778
Diffstat (limited to 'tools/asn2wrs.py')
-rwxr-xr-x | tools/asn2wrs.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/tools/asn2wrs.py b/tools/asn2wrs.py index d89ca9ddf8..983fb0de83 100755 --- a/tools/asn2wrs.py +++ b/tools/asn2wrs.py @@ -2915,12 +2915,9 @@ class EthOut: out += '\n' # Make Windows path separator look like Unix path separator out = out.replace('\\', '/') - # Change abolute paths from cmake builds to relative paths as used - # in autotools for identical output of both build systems. - out = re.sub(r'( [^ ]*/tools/)', ' ../../tools/', out) - out = re.sub(r'( [^ ]*/epan/)', ' ../../epan/', out) - out = re.sub(r'( [^ ]*/asn1/[^\s/]*)', ' .', out) - out = re.sub(r'( [^ ]*/asn1/[^\s]/)', ' ./', out) + # Change abolute paths to paths relative to asn1/<proto> subdir + out = re.sub(r'(\s)/\S*(/tools/|/epan/)', r'\1../..\2', out) + out = re.sub(r'(\s)/\S*/asn1/\S*?([\s/])', r'\1.\2', out) return out #--- dbg_print ------------------------------------------------------- |