Skip to content

Commit

Permalink
[build] Fix #line statements on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
olafmersmann committed Nov 22, 2023
1 parent fe9004f commit 841f1b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/fabricate
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class Amalgator:
with open(filename) as fd:
line_number = 1
if not self.release:
self.destination_fd.write("#line %i \"%s\"\n" % (line_number, filename))
self.destination_fd.write("#line %i \"%s\"\n" % (line_number, filename.name))
for line in fd.readlines():
## Is this an include statement?
matches = re.match("#include \"(.*)\"", line)
Expand All @@ -79,7 +79,7 @@ class Amalgator:
self.process_file(include_file)
if not self.release:
self.destination_fd.write("#line %i \"%s\"\n" %
(line_number + 1, filename))
(line_number + 1, filename.name))
else:
self.destination_fd.write(line)
line_number += 1
Expand Down

0 comments on commit 841f1b3

Please sign in to comment.