X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=liblttng-ust-python-agent%2FMakefile.am;h=e2a15f48da8898a1c5263737ef2b58ef5cf87598;hb=6b649e4894d06e63c9835728772198c7ffb206b3;hp=4b34964c84fb363d380ac1c3ea3af749bffb82b8;hpb=bf70766ba183a061c860f3eed8b50145f37cb1dd;p=lttng-ust.git diff --git a/liblttng-ust-python-agent/Makefile.am b/liblttng-ust-python-agent/Makefile.am index 4b34964c..e2a15f48 100644 --- a/liblttng-ust-python-agent/Makefile.am +++ b/liblttng-ust-python-agent/Makefile.am @@ -1,20 +1,34 @@ - -AM_CPPFLAGS = $(PYTHON_INCLUDE) -I$(top_srcdir)/include/ +# tracepoint provider +AM_CPPFLAGS = $(PYTHON_INCLUDE) -I$(top_srcdir)/include/ \ + -I$(top_builddir)/include/ AM_CFLAGS = -fno-strict-aliasing +lib_LTLIBRARIES = liblttng-ust-python-agent.la +liblttng_ust_python_agent_la_SOURCES = lttng_ust_python.c lttng_ust_python.h +liblttng_ust_python_agent_la_LIBADD = -lc -llttng-ust \ + -L$(top_builddir)/liblttng-ust/.libs -EXTRA_DIST = lttng_agent.py.in +# Use setup.py for the installation instead of Autoconf. +# This ease the installation process and assure a *pythonic* +# installation. +agent_path=lttngust +all-local: + $(PYTHON) setup.py build --verbose -nodist_lttng_agent_PYTHON = lttng_agent.py -lttng_agentdir = $(pythondir) +install-exec-local: + @opts="--prefix=$(prefix) --verbose --no-compile $(DISTSETUPOPTS)"; \ + if [ "$(DESTDIR)" != "" ]; then \ + opts="$$opts --root=$(DESTDIR)"; \ + fi; \ + $(PYTHON) setup.py install $$opts; -lib_LTLIBRARIES = liblttng-ust-python-agent.la +clean-local: + rm -rf build -nodist_liblttng_ust_python_agent_la_SOURCES = lttng_agent.py -liblttng_ust_python_agent_la_SOURCES = lttng_ust_python.c lttng_ust_python.h -liblttng_ust_python_agent_la_LIBADD = -lc -llttng-ust \ - -L$(top_builddir)/liblttng-ust/.libs +uninstall-local: + rm -rf $(DESTDIR)$(pkgpythondir) -all: - $(SED) 's|LIBDIR_STR|$(libdir)|g' < $(srcdir)/lttng_agent.py.in > lttng_agent.py +EXTRA_DIST=$(agent_path) -CLEANFILES = lttng_agent.py +# Remove automake generated file before dist +dist-hook: + rm -rf $(distdir)/$(agent_path)/__init__.py