Since we are using the standard .i extension for the swig file, we can use setup.py to build the wrapper. Drop the existing build code since it is not needed. Signed-off-by: Simon Glass <sjg@xxxxxxxxxxxx> --- Changes in v3: - Add a new patch to use setup.py to build the swig file Changes in v2: None pylibfdt/Makefile.pylibfdt | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/pylibfdt/Makefile.pylibfdt b/pylibfdt/Makefile.pylibfdt index 7ee72f2..2843ef5 100644 --- a/pylibfdt/Makefile.pylibfdt +++ b/pylibfdt/Makefile.pylibfdt @@ -1,8 +1,8 @@ # Makefile.pylibfdt # -PYLIBFDT_srcs = $(addprefix $(LIBFDT_srcdir)/,$(LIBFDT_SRCS)) -WRAP = $(PYLIBFDT_objdir)/libfdt_wrap.c +PYLIBFDT_srcs = $(addprefix $(LIBFDT_srcdir)/,$(LIBFDT_SRCS)) \ + $(PYLIBFDT_srcdir)/libfdt.i PYMODULE = $(PYLIBFDT_objdir)/_libfdt.so define run_setup @@ -11,17 +11,13 @@ define run_setup $(PYLIBFDT_objdir)/setup.py --quiet $(2) endef -$(PYMODULE): $(PYLIBFDT_srcs) $(WRAP) +$(PYMODULE): $(PYLIBFDT_srcs) @$(VECHO) PYMOD $@ $(call run_setup, $^, build_ext --inplace) -$(WRAP): $(PYLIBFDT_srcdir)/libfdt.i - @$(VECHO) SWIG $@ - $(SWIG) -python -o $@ $< - -install_pylibfdt: $(WRAP) $(PYMODULE) +install_pylibfdt: $(PYMODULE) $(VECHO) INSTALL-PYLIB; \ - $(call run_setup, $(PYLIBFDT_srcs) $(WRAP), \ + $(call run_setup, $(PYLIBFDT_srcs), \ install $(if $(SETUP_PREFIX),--prefix=$(SETUP_PREFIX))) PYLIBFDT_cleanfiles = libfdt_wrap.c libfdt.py libfdt.pyc _libfdt.so -- 2.12.2.715.g7642488e1d-goog -- To unsubscribe from this list: send the line "unsubscribe devicetree-compiler" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html