2012-10-12 05:08:47 +04:00
#
2016-02-18 02:53:35 +03:00
# Copyright (C) 2011-2016 Red Hat, Inc.
2012-10-12 05:08:47 +04:00
#
# This file is part of LVM2.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions
# of the GNU Lesser General Public License v.2.1.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, write to the Free Software Foundation,
2016-01-21 13:49:46 +03:00
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
2012-10-12 05:08:47 +04:00
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
2014-11-21 18:34:01 +03:00
TARGETS = .liblvm_built
i n c l u d e $( top_builddir ) / m a k e . t m p l
2012-10-12 05:08:47 +04:00
.liblvm_built : liblvm_python .c
2016-02-18 02:53:35 +03:00
i f e q ( "@PYTHON2_BINDINGS@" , "yes" )
$( PYTHON2) setup.py build
e n d i f
i f e q ( "@PYTHON3_BINDINGS@" , "yes" )
$( PYTHON3) setup.py build
e n d i f
2012-10-12 05:08:47 +04:00
touch $@
liblvm_python.c :
$( LN_S) $( srcdir) /liblvm.c $@
2014-11-21 18:34:01 +03:00
install_python_bindings : $( TARGETS )
2016-02-18 02:53:35 +03:00
i f e q ( "@PYTHON2_BINDINGS@" , "yes" )
$( PYTHON2) setup.py install --skip-build --prefix $( pythonprefix)
e n d i f
i f e q ( "@PYTHON3_BINDINGS@" , "yes" )
$( PYTHON3) setup.py install --skip-build --prefix $( pythonprefix)
e n d i f
2012-10-12 05:08:47 +04:00
install_lvm2 : install_python_bindings
install : install_lvm 2
2014-11-21 18:34:01 +03:00
.PHONY : install_python_bindings
.INTERMEDIATE : liblvm_python .c
2013-07-24 15:57:49 +04:00
clean :
$( RM) -r build
2014-11-21 18:34:01 +03:00
distclean : clean
CLEAN_TARGETS += liblvm_python.c
2012-10-12 05:08:47 +04:00
DISTCLEAN_TARGETS += setup.py