Remove stale trace-ir test files
[babeltrace.git] / bindings / python / babeltrace / Makefile.am
1 # Since the shared object used by the python bindings is not built with
2 # libtool, we need to add the directory containing libbabeltrace to the
3 # linker path.
4 AM_LDFLAGS=-L$(top_builddir)/lib/.libs
5
6 INSTALLED_FILES=$(builddir)/installed_files.txt
7
8 STATIC_BINDINGS_DEPS = \
9 babeltrace/common.py \
10 babeltrace/reader.py \
11 babeltrace/reader_event_declaration.py \
12 babeltrace/reader_event.py \
13 babeltrace/reader_field_declaration.py \
14 babeltrace/reader_field_definition.py \
15 babeltrace/reader_trace_collection.py \
16 babeltrace/reader_trace_handle.py \
17 babeltrace/writer.py
18
19 GENERATED_BINDINGS_DEPS = \
20 babeltrace/__init__.py \
21 setup.py
22
23
24 all-local: build-python-bindings.stamp
25
26 copy-static-deps.stamp: $(STATIC_BINDINGS_DEPS)
27 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
28 for file in $(STATIC_BINDINGS_DEPS); do \
29 cp -f $(srcdir)/$$file $(builddir)/$$file; \
30 done; \
31 fi
32 touch $@
33
34 build-python-bindings.stamp: copy-static-deps.stamp $(GENERATED_BINDINGS_DEPS)
35 $(BUILD_FLAGS) $(PYTHON) $(builddir)/setup.py build
36 touch $@
37
38 install-exec-local: build-python-bindings.stamp
39 @opts="--prefix=$(prefix) --record $(INSTALLED_FILES) --verbose --no-compile $(DISTSETUPOPTS)"; \
40 if [ "$(DESTDIR)" != "" ]; then \
41 opts="$$opts --root=$(DESTDIR)"; \
42 fi; \
43 $(PYTHON) $(builddir)/setup.py install $$opts;
44
45 clean-local:
46 rm -rf $(builddir)/build
47 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
48 for file in $(STATIC_BINDINGS_DEPS); do \
49 rm -f $(builddir)/$$file; \
50 done; \
51 fi
52
53 # Distutils' setup.py does not include an uninstall target, we thus need to do
54 # it manually. We save the path of the files that were installed during the install target
55 # and delete them during the uninstallation.
56 uninstall-local:
57 if [ "$(DESTDIR)" != "" ]; then \
58 $(SED) -i "s|^|$(DESTDIR)/|g" $(INSTALLED_FILES); \
59 fi
60 cat $(INSTALLED_FILES) | xargs rm -rf || true
61 $(GREP) "__init__.py" $(INSTALLED_FILES) | xargs dirname | xargs rm -rf || true
62 rm -f $(INSTALLED_FILES)
63
64 # distribute: extra Python modules and SWIG interface files
65 EXTRA_DIST = $(STATIC_BINDINGS_DEPS)
66
67 # clean: generated Python files and stamps
68 CLEANFILES = build-python-bindings.stamp copy-static-deps.stamp
This page took 0.031134 seconds and 4 git commands to generate.