On Fri, Nov 13, 2020 at 03:14:14PM +0100, David Marchand wrote: > On Fri, Nov 13, 2020 at 3:06 PM Bruce Richardson > <bruce.richard...@intel.com> wrote: > > > > On Fri, Nov 13, 2020 at 01:24:30PM +0100, David Marchand wrote: > > > Rather than just installing all examples, we can use the build checks to > > > filter out any examples that are missing dependencies or are otherwise > > > unbuildable on the current system. > > > Introduce a new "buildable" special value for the -Dexamples= meson > > > option, this way existing behavior on installing all examples is > > > preserved. > > > > > > Select only buildable examples and test their compilation for the > > > x86-default target. > > > > > > Note for maintainers/users of the script: for existing environments, > > > the x86-default target might get broken by this patch since the script > > > now tries to build all "installed" examples and dependencies for some > > > might be unfulfilled. > > > To fix this temporary situation, you can either delete the whole > > > directory or reconfigure it: > > > $ meson configure $DPDK_BUILD_TEST_DIR/build-x86-default \ > > > -Dexamples=buildable > > > > > > Suggested-by: Bruce Richardson <bruce.richard...@intel.com> > > > Signed-off-by: David Marchand <david.march...@redhat.com> > > > --- > > > Changelog since v1: > > > - rebased on main, > > > - introduced a new "buildable" special value for the -Dexamples option, > > > - installation of the "multi-level" examples has been fixed, so > > > corresponding exceptions have been removed, > > > - a fix for the vhost is waiting in next-virtio, I assume it will get > > > pulled before this series, > > > - the only remaining exception is for vm_power_manager which is broken, > > > > > > --- > > I'm not sure my "suggested-by" should be on this, since the idea of adding > > I was not sure how to credit my copying of the meson bits :-). > > > > an extra buildable option is not mine here. I actually think I prefer the > > previous approach based on your original suggestion of always skipping > > unbuildable examples. Two reasons for that: > > * I'm not fully sure of the value of installing examples that can't be > > built, which was the original issue you raised. > > Thomas objected that all examples have always been provided regardless > of the configuration. > The examples serve as documentation and the API/guides documentations > are all compiled anyway. > Since we are looking to start adding in checks for features into the example makefiles, I'd go with continuing the policy of just shipping them all [1]. Over time we can update the makefiles to start adding proper build error messages with explanations in cases where examples are missing dependencies.
/Bruce [1] http://patches.dpdk.org/patch/83911/