From: Jérémie Galarneau Date: Fri, 13 May 2016 18:38:59 +0000 (-0400) Subject: Copy bindings sources to build directory X-Git-Tag: v2.0.0-pre1~950 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=6027e07b827da41731e0c363fa633848582cd7a3 Copy bindings sources to build directory 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 --- 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