cryptodev: add elliptic curve Diffie-Hellman
[dpdk.git] / doc / api / generate_doxygen.py
1 #!/usr/bin/env python3
2 # SPDX-License-Identifier: BSD-3-Clause
3 # (c) 2018 Luca Boccassi <bluca@debian.org>
4 # (c) 2022 Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
5
6 import os, re, subprocess, sys
7
8 pattern = re.compile('^Preprocessing (.*)...$')
9 out_dir, *doxygen_command = sys.argv[1:]
10 out_file = os.path.join(os.path.dirname(out_dir), 'doxygen.out')
11 dep_file = f'{out_dir}.d'
12 with open(out_file, 'w') as out:
13     subprocess.run(doxygen_command, check=True, stdout=out)
14 with open(out_file) as out, open(dep_file, 'w') as dep:
15     print(f'{out_dir}:', end=' ', file=dep)
16     for line in out:
17         match = re.match(pattern, line)
18         if match:
19             print(match.group(1), end=' ', file=dep)