1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

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.
This commit is contained in:
Zdenek Kabelac 2014-11-21 16:34:01 +01:00
parent 4dc602f79b
commit 75d79f3dad

View File

@ -15,7 +15,9 @@ srcdir = @srcdir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
top_builddir = @top_builddir@ top_builddir = @top_builddir@
python_bindings: .liblvm_built TARGETS = .liblvm_built
include $(top_builddir)/make.tmpl
.liblvm_built: liblvm_python.c .liblvm_built: liblvm_python.c
$(PYTHON) setup.py build $(PYTHON) setup.py build
@ -24,18 +26,21 @@ python_bindings: .liblvm_built
liblvm_python.c: liblvm_python.c:
$(LN_S) $(srcdir)/liblvm.c $@ $(LN_S) $(srcdir)/liblvm.c $@
include $(top_builddir)/make.tmpl install_python_bindings: $(TARGETS)
install_python_bindings: python_bindings
$(PYTHON) setup.py install --skip-build --prefix $(pyexecdir) $(PYTHON) setup.py install --skip-build --prefix $(pyexecdir)
install_lvm2: install_python_bindings install_lvm2: install_python_bindings
install: install_lvm2 install: install_lvm2
.PHONY: install_python_bindings
.INTERMEDIATE: liblvm_python.c
clean: clean:
$(RM) -r build $(RM) -r build
CLEAN_TARGETS += .liblvm_built liblvm_python.c distclean: clean
CLEAN_TARGETS += liblvm_python.c
DISTCLEAN_TARGETS += setup.py DISTCLEAN_TARGETS += setup.py