Hi On Mon, Oct 12, 2020 at 11:15 AM Marc-André Lureau <marcandre.lureau@xxxxxxxxxx> wrote: > > Hi > > > On Mon, Oct 12, 2020 at 9:49 AM David Gibson > <david@xxxxxxxxxxxxxxxxxxxxx> wrote: > > > > On Mon, Oct 12, 2020 at 04:43:19PM +1100, David Gibson wrote: > > > On Tue, Oct 06, 2020 at 12:27:10PM +0400, marcandre.lureau@xxxxxxxxxx wrote: > > > > From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx> > > > > > > > > With meson, we have to support out-of-tree build. > > > > > > > > Introduce a --top-builddir option, which will default to the current > > > > directory to lookup generated filed such as version_gen.h and output > > > > directories. > > > > > > > > Other source paths are derived from the location of the setup.py script > > > > in the source tree. > > > > > > > > Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx> > > > > > > Applied, thanks. > > > > Wait... no... unapplied. This somehow breaks the auto-detection & > > build of pylibfdt. After applying on a clean tree: > > > > $ make check > > [...] > > ********** TEST SUMMARY > > * Total testcases: 2033 > > * PASS: 2033 > > * FAIL: 0 > > * Bad configuration: 0 > > * Strange test result: 0 > > ********** > > > > That number doesn't include the pylibfdt tests (it should be 2070 > > including them). Plus, the extension module doesn't appear to have > > been built in the expected place: > > > > $ ls pylibfdt/ > > libfdt.i Makefile.pylibfdt setup.py* > > > > Explicitly running "make pylibfdt" works around it, but I'd rather not > > have to. > > Ah, this is where the first patch actually comes in then. I don't > understand what's going on yet, but it's a part of the puzzle.. Ok, I think I understand what's going on... In the middle of the setup.py, there is a "os.chdir(setupdir)". So the --build-lib option isn't relative to the current directory, but to the setup.py. In the next patch, I removed the need for os.chdir() and thus the two patches should be combined. Sending a v5. Thanks