On Tue, Dec 12 2023, Oliver Upton <oliver.upton@xxxxxxxxx> wrote: > Building the KVM selftests from the main selftests Makefile (as opposed > to the kvm subdirectory) doesn't work as OUTPUT is set, forcing the > generated header to spill into the selftests directory. Additionally, > relative paths do not work when building outside of the srctree, as the > canonical selftests path is replaced with 'kselftest' in the output. > > Work around both of these issues by explicitly overriding OUTPUT on the > submake cmdline. Move the whole fragment below the point lib.mk gets > included such that $(abs_objdir) is available. > > Signed-off-by: Oliver Upton <oliver.upton@xxxxxxxxx> > --- > tools/testing/selftests/kvm/Makefile | 26 ++++++++++++++++---------- > 1 file changed, 16 insertions(+), 10 deletions(-) Reviewed-by: Cornelia Huck <cohuck@xxxxxxxxxx>