Blame src/python/Makefile.am

Packit 56e23f
####
Packit 56e23f
# Seccomp Library Python Bindings
Packit 56e23f
#
Packit 56e23f
Packit 56e23f
#
Packit 56e23f
# This library is free software; you can redistribute it and/or modify it
Packit 56e23f
# under the terms of version 2.1 of the GNU Lesser General Public License
Packit 56e23f
# as published by the Free Software Foundation.
Packit 56e23f
#
Packit 56e23f
# This library is distributed in the hope that it will be useful, but
Packit 56e23f
# WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 56e23f
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser
Packit 56e23f
# General Public License for more details.
Packit 56e23f
#
Packit 56e23f
# You should have received a copy of the GNU Lesser General Public License
Packit 56e23f
# along with this library; if not, see <http://www.gnu.org/licenses>.
Packit 56e23f
#
Packit 56e23f
Packit 56e23f
PY_DISTUTILS = \
Packit 56e23f
	VERSION_RELEASE="@PACKAGE_VERSION@" \
Packit 56e23f
	CPPFLAGS="-I\${top_srcdir}/include ${AM_CPPFLAGS} ${CPPFLAGS}" \
Packit 56e23f
	CFLAGS="${AM_CFLAGS} ${CFLAGS}" \
Packit 56e23f
	LDFLAGS="${AM_LDFLAGS} ${LDFLAGS}" \
Packit 56e23f
	${PYTHON} ${srcdir}/setup.py
Packit 56e23f
Packit 56e23f
# support silent builds
Packit 56e23f
PY_BUILD_0 = @echo "  PYTHON  " $@; ${PY_DISTUTILS} -q build
Packit 56e23f
PY_BUILD_1 = ${PY_DISTUTILS} build
Packit 56e23f
PY_BUILD_ = ${PY_BUILD_0}
Packit 56e23f
PY_BUILD = ${PY_BUILD_@AM_V@}
Packit 56e23f
Packit 56e23f
PY_INSTALL = ${PY_DISTUTILS} install
Packit 56e23f
Packit 56e23f
EXTRA_DIST = libseccomp.pxd seccomp.pyx setup.py
Packit 56e23f
Packit 56e23f
all-local: build
Packit 56e23f
Packit 56e23f
build: ../libseccomp.la libseccomp.pxd seccomp.pyx setup.py
Packit 56e23f
	[ ${srcdir} == ${builddir} ] || cp ${srcdir}/seccomp.pyx ${builddir}
Packit 56e23f
	${PY_BUILD} && touch build
Packit 56e23f
Packit 56e23f
install-exec-local: build
Packit 56e23f
	${PY_INSTALL} --install-lib=${DESTDIR}/${pyexecdir} \
Packit 56e23f
		--record=${DESTDIR}/${pyexecdir}/install_files.txt
Packit 56e23f
Packit 56e23f
uninstall-local:
Packit 56e23f
	cat ${DESTDIR}/${pyexecdir}/install_files.txt | xargs ${RM} -f
Packit 56e23f
	${RM} -f ${DESTDIR}/${pyexecdir}/install_files.txt
Packit 56e23f
Packit 56e23f
clean-local:
Packit 56e23f
	[ ${srcdir} == ${builddir} ] || ${RM} -f ${builddir}/seccomp.pyx
Packit 56e23f
	${RM} -rf seccomp.c build