enable python module build in subdir
Michael Tokarev
mjt at tls.msk.ru
Thu Apr 28 08:42:40 UTC 2022
Ping? Is it not the right place for such changes?
17.04.2022 23:37, Michael Tokarev via Unbound-users wrote:
> Unbound Makefile has two small issues preventing
> building python modules in a non-source directory
> (eg in a subdir).
>
> First, swig fails to find <libunbound/unbound.h>
> which is not in build dir but in source dir.
>
> Next, libunbound/python/unbound.py is now being
> generated file, generated in the build dir, not
> in source dir.
>
> This patch fixes them.
>
> Signed-off-by: Michael Tokarev <mjt at tls.msk.ru>
>
> diff --git a/Makefile.in b/Makefile.in
> index 55125a44..f04db624 100644
> --- a/Makefile.in
> +++ b/Makefile.in
> @@ -59,3 +59,3 @@ CC=@CC@
> CPPFLAGS=-I. @CPPFLAGS@
> -PYTHON_CPPFLAGS=-I. @PYTHON_CPPFLAGS@
> +PYTHON_CPPFLAGS=-I$(srcdir) @PYTHON_CPPFLAGS@
> CFLAGS=-DSRCDIR=$(srcdir) @CFLAGS@
> @@ -558,3 +558,3 @@ pyunbound-install:
> $(INSTALL) -m 755 -d $(DESTDIR)$(PYTHON_SITE_PKG)
> - $(INSTALL) -c -m 644 $(srcdir)/libunbound/python/unbound.py $(DESTDIR)$(PYTHON_SITE_PKG)/unbound.py
> + $(INSTALL) -c -m 644 libunbound/python/unbound.py $(DESTDIR)$(PYTHON_SITE_PKG)/unbound.py
> $(LIBTOOL) --mode=install cp _unbound.la $(DESTDIR)$(PYTHON_SITE_PKG)
More information about the Unbound-users
mailing list