doc: sort file lists in API generators
In order to build the documentation in a reproducible manner,
sort the lists of files used as input,
since walking the filesystem is not guaranteed to be done in a stable order.
When converting the scripts from shell to python, sorting the input was lost.
Fixes: 53bb9a073f
("doc: rewrite shell scripts in Python")
Cc: stable@dpdk.org
Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
This commit is contained in:
parent
1a5a1073cc
commit
fac23f030c
@ -13,7 +13,7 @@
|
|||||||
subprocess.run(doxygen_command, check=True, stdout=out)
|
subprocess.run(doxygen_command, check=True, stdout=out)
|
||||||
with open(out_file) as out, open(dep_file, 'w') as dep:
|
with open(out_file) as out, open(dep_file, 'w') as dep:
|
||||||
print(f'{out_dir}:', end=' ', file=dep)
|
print(f'{out_dir}:', end=' ', file=dep)
|
||||||
for line in out:
|
for line in sorted(out):
|
||||||
match = re.match(pattern, line)
|
match = re.match(pattern, line)
|
||||||
if match:
|
if match:
|
||||||
print(match.group(1), end=' ', file=dep)
|
print(match.group(1), end=' ', file=dep)
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
with open(f'{api_examples}.d', 'w') as dep:
|
with open(f'{api_examples}.d', 'w') as dep:
|
||||||
print(f'{api_examples}:', end=' ', file=dep)
|
print(f'{api_examples}:', end=' ', file=dep)
|
||||||
for root, _, files in os.walk(examples_dir):
|
for root, _, files in os.walk(examples_dir):
|
||||||
for name in files:
|
for name in sorted(files):
|
||||||
is_source = name.endswith('.c')
|
is_source = name.endswith('.c')
|
||||||
if is_source or name == 'meson.build':
|
if is_source or name == 'meson.build':
|
||||||
path = os.path.join(root, name)
|
path = os.path.join(root, name)
|
||||||
@ -23,7 +23,7 @@
|
|||||||
print('''/**
|
print('''/**
|
||||||
@page examples DPDK Example Programs
|
@page examples DPDK Example Programs
|
||||||
''', file=out)
|
''', file=out)
|
||||||
for path in sources:
|
for path in sorted(sources):
|
||||||
# Produce consistent output with forward slashes on all systems.
|
# Produce consistent output with forward slashes on all systems.
|
||||||
# Every \ in paths within examples directory is a separator, not escape.
|
# Every \ in paths within examples directory is a separator, not escape.
|
||||||
relpath = os.path.relpath(path, examples_dir).replace('\\', '/')
|
relpath = os.path.relpath(path, examples_dir).replace('\\', '/')
|
||||||
|
Loading…
Reference in New Issue
Block a user