From 75d79f3dad99106c2ecb68c67507f9c367893ec1 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 21 Nov 2014 16:34:01 +0100 Subject: [PATCH] makefiles: standard usage of make.tmpl Use lvm2 standard TARGETS. Make liblvm_python.c as intermediate target (gets deleted after use) Properly delete build dir on make distclean. Mark install_python_bindings as .PHONY. --- python/Makefile.in | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/python/Makefile.in b/python/Makefile.in index 1aaec7e42..843560eca 100644 --- a/python/Makefile.in +++ b/python/Makefile.in @@ -15,7 +15,9 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ -python_bindings: .liblvm_built +TARGETS = .liblvm_built + +include $(top_builddir)/make.tmpl .liblvm_built: liblvm_python.c $(PYTHON) setup.py build @@ -24,18 +26,21 @@ python_bindings: .liblvm_built liblvm_python.c: $(LN_S) $(srcdir)/liblvm.c $@ -include $(top_builddir)/make.tmpl - -install_python_bindings: python_bindings +install_python_bindings: $(TARGETS) $(PYTHON) setup.py install --skip-build --prefix $(pyexecdir) install_lvm2: install_python_bindings install: install_lvm2 +.PHONY: install_python_bindings +.INTERMEDIATE: liblvm_python.c + clean: $(RM) -r build -CLEAN_TARGETS += .liblvm_built liblvm_python.c +distclean: clean + +CLEAN_TARGETS += liblvm_python.c DISTCLEAN_TARGETS += setup.py