On Mon, Aug 17, 2020 at 01:24:50PM +0200, Paolo Bonzini wrote: > On 17/08/20 13:02, Roman Bolshakov wrote: > > > > Tested-by: Roman Bolshakov <r.bolsha...@yadro.com> > > > > On the next step, it might be good to drop configure in favor of meson > > configuration, so configure, build and test commands would be similar to > > libvirt: > > > > meson build > > ninja -C build > > meson test -C build > > Well, there are quite a few steps needed to get there: > > 1) moving feature tests from configure to Meson is a no-brainer. > However it's better to first convert the unit tests to Meson and get rid > of the rest of rules.mak. This is because it's simpler to do this if > there are no uses left of CONFIG_* symbols in the Makefiles. >
Agreed > 2) moving the rest of "make install" to Meson is even more of a > no-brainer. Marc-André has patches there. They also include a > conversion of the ROM build. > > 3) moving the bulk of the build from meson to ninja is possible and I > already have patches for it. It requires adding ninja as a build > dependency however. The main advantage here is getting rid of > Ninjatool. I'm not sure how moving the handling of submodules to Meson > would work, and that's needed in order to be able to build with "ninja > -C build". > I'm more familiar with CMake rather than meson but they seem to be similar. CMake has a way to wrap build of submodules: https://cmake.org/cmake/help/latest/module/ExternalProject.html I haven't found if meson has the feature. Perhaps, like 4) it's something to be enhanced in meson. An alternative is to change the submodules to Meson (if their maintainers don't mind the change) and use meson subproject: https://mesonbuild.com/Subprojects.html Regards, Roman > 4) I find "meson test" to be inferior in some respects to the QEMU's TAP > test harness. In particular, one feature of QEMU's Makefiles is that > you can cut-and-paste from "make V=1 output" into the shell. So that > part may take some time. I'd rather extend Meson so that it's possible > to write arbitrary test runners. >