Skip to content

Commit

Permalink
build: exclude meson files from examples installation
Browse files Browse the repository at this point in the history
[ upstream commit 5d20515 ]

The meson.build files in each example directory is simply to support
building the example as part of the main SDK build, and these should not
be installed with the example's source code and makefile. The exclude of
"meson.build" only filters out the top-level examples/meson.build file,
not the file in each subdirectory.

To fix this, we can build up the list of files to exclude based off the
list of all examples. With this change "find examples/ -name meson.build"
returns no hits when run on an installed instance.

Fixes: e5b9500 ("examples: fix flattening directory layout on install")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
  • Loading branch information
bruce-richardson authored and steevenlee committed May 8, 2021
1 parent b66b37a commit f59f4e9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions examples/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ all_examples = [
'vmdq', 'vmdq_dcb',
]

# on install, skip copying all meson.build files
ex_file_excludes = ['meson.build']
foreach ex:all_examples
ex_file_excludes += [ex + '/meson.build']
endforeach

if get_option('examples') == ''
subdir_done()
endif
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ subdir('doc')
subdir('examples')
install_subdir('examples',
install_dir: get_option('datadir') + '/dpdk',
exclude_files: 'meson.build')
exclude_files: ex_file_excludes)

# build kernel modules if enabled
if get_option('enable_kmods')
Expand Down

0 comments on commit f59f4e9

Please sign in to comment.