Skip to content

Commit e5f4a86

Browse files
committed
Build: fix amalgamation public header warning
The previous code would mix up absolute and relative paths to determine when to print the warning about public headers first being encountered when processing the source files. This commit fixes this and thus gets rid of the incorrect warnings.
1 parent c683b12 commit e5f4a86

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

assets/amalgamate.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ def merge_headers(
5959
with path.open() as f:
6060
lines = [x.rstrip() for x in f]
6161

62-
if path in covered_headers:
62+
if header in covered_headers:
6363
return []
6464

6565
print(f'Processing header "{header}"')
66-
covered_headers.add(path)
66+
covered_headers.add(header)
6767

6868
# Print the header we emit next & the include stack (if non-root).
6969
include_stack = []
@@ -169,8 +169,6 @@ def main():
169169
stack=[],
170170
)))
171171

172-
print(covered_headers)
173-
174172
with open(OUTPUT_DIR / 'Zydis.c', 'w') as f:
175173
f.write('\n'.join(FILE_HEADER + merge_sources(
176174
source_dir=ZYDIS_ROOT / 'src',

0 commit comments

Comments
 (0)