- # generate pmdinfo sources
- pmdinfogen_srcs = run_command('grep', '--files-with-matches',
- 'RTE_PMD_REGISTER_.*(.*)', sources).stdout().strip().split()
- foreach src: pmdinfogen_srcs
- out_filename = '@0@.pmd.c'.format(src.split('/')[-1])
- tmp_lib = static_library('tmp_@0@'.format(src.underscorify()),
- src, include_directories: includes,
+ # generate pmdinfo sources by building a temporary
+ # lib and then running pmdinfogen on the contents of
+ # that lib. The final lib reuses the object files and
+ # adds in the new source file.
+ out_filename = lib_name + '.pmd.c'
+ tmp_lib = static_library('tmp_' + lib_name,
+ sources,
+ include_directories: includes,