asn2wrs: Rewrite relative paths in header.
Change both absolute paths and relative paths generated outside source directory to paths relative to asn1/<proto> subdir. Change-Id: I867d3a31c687b08347b11336ce69fc70db2d7c7b Reviewed-on: https://code.wireshark.org/review/88 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Stig Bjørlykke <stig@bjorlykke.org>
This commit is contained in:
parent
28e028ddd5
commit
4e7e5a63c3
|
@ -2940,9 +2940,10 @@ class EthOut:
|
|||
out += '\n'
|
||||
# Make Windows path separator look like Unix path separator
|
||||
out = out.replace('\\', '/')
|
||||
# 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)
|
||||
# Change absolute paths and relative paths generated outside
|
||||
# source directory 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 -------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue