diff --git a/docgen/generate.py b/docgen/generate.py index c068cf5..f49fdd1 100644 --- a/docgen/generate.py +++ b/docgen/generate.py @@ -31,9 +31,16 @@ def collect_headers(input_arg: Path) -> list[tuple[Path, Path]]: base_path is used to compute relative output paths. """ if input_arg.is_file(): + if input_arg.name.endswith('.generated.h'): + print(f"Skipping generated header: {input_arg}", file=sys.stderr) + return [] return [(input_arg, input_arg.parent)] elif input_arg.is_dir(): - return [(h, input_arg) for h in sorted(input_arg.rglob('*.h'))] + headers = [ + h for h in sorted(input_arg.rglob('*.h')) + if 'Intermediate' not in h.parts and not h.name.endswith('.generated.h') + ] + return [(h, input_arg) for h in headers] else: print(f"Error: {input_arg} is not a file or directory", file=sys.stderr) return []