[PATCH v4 1/4] pylibfdt: fix build-lib location

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>

setup.py build_ext is run from top_srcdir with the Makefile
build-system, due to Makefile.pylibfdt inclusion in top_srcdir/Makefile.

--build-lib=../pylibfdt will produce output files in the parent
directory of the current directory. Ex:

~/src/dtc$ make && ls ../pylibfdt
_libfdt.cpython-38-x86_64-linux-gnu.so

Fix it by changing the build-lib directory to $(cwd)/pylibfdt instead.

(note that setup.py install will rebuild it with the default 'build'
directory, there doesn't seem to be a way to override that)

Fixes: 1e4a0928f3b3b827824222572e551a60935607e3 ("pylibfdt: Don't have
setup.py depend on where it's invoked from")
Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
---
 pylibfdt/Makefile.pylibfdt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pylibfdt/Makefile.pylibfdt b/pylibfdt/Makefile.pylibfdt
index 6866a0b..0c07224 100644
--- a/pylibfdt/Makefile.pylibfdt
+++ b/pylibfdt/Makefile.pylibfdt
@@ -18,7 +18,7 @@ endif
 
 $(PYMODULE): $(PYLIBFDT_srcs) $(LIBFDT_archive) $(SETUP) $(VERSION_FILE)
 	@$(VECHO) PYMOD $@
-	$(PYTHON) $(SETUP) $(SETUPFLAGS) build_ext --build-lib=../$(PYLIBFDT_dir)
+	$(PYTHON) $(SETUP) $(SETUPFLAGS) build_ext --build-lib=$(PYLIBFDT_dir)
 
 install_pylibfdt: $(PYMODULE)
 	@$(VECHO) INSTALL-PYLIB
-- 
2.28.0





[Index of Archives]     [Device Tree]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux