From 6027e07b827da41731e0c363fa633848582cd7a3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Fri, 13 May 2016 14:38:59 -0400 Subject: [PATCH] Copy bindings sources to build directory MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The python bindings are made up of both source and generated files. We copy the source files to the build directory so that the build directory contains a valid python package for use in tests. Signed-off-by: Jérémie Galarneau --- bindings/python/babeltrace/Makefile.am | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/bindings/python/babeltrace/Makefile.am b/bindings/python/babeltrace/Makefile.am index 26f388ca..cf56dfc7 100644 --- a/bindings/python/babeltrace/Makefile.am +++ b/bindings/python/babeltrace/Makefile.am @@ -13,6 +13,7 @@ AM_CFLAGS = $(PYTHON_INCLUDE) -I$(top_srcdir)/include/ -I$(srcdir) EXTRA_DIST = common.py reader.py writer.py $(INIT_PY_IN) $(NATIVEBT_I) nodist_btpackage_PYTHON = $(INIT_PY) $(NATIVEBT_PY) common.py reader.py writer.py +SCRIPT_LIST = common.py reader.py writer.py nativebtlib_LTLIBRARIES = _nativebt.la btpackagedir = $(pythondir)/babeltrace @@ -32,3 +33,17 @@ $(NATIVEBT_WRAP_C): $(NATIVEBT_I) $(SWIG) -python -Wall -I$(srcdir) -I$(top_srcdir)/include -outcurrentdir $< CLEANFILES = $(NATIVEBT_PY) $(NATIVEBT_WRAP_C) $(INIT_PY) + +all-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(SCRIPT_LIST); do \ + cp -f $(srcdir)/$$script $(builddir); \ + done; \ + fi + +clean-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(SCRIPT_LIST); do \ + rm -f $(builddir)/$$script; \ + done; \ + fi -- 2.34.1