From 04e98a80045c11e834eb2abdf33af5d5e715ec30 Mon Sep 17 00:00:00 2001 From: tgoff0 Date: Sat, 16 May 2015 01:53:20 +0000 Subject: [PATCH] Improve uninstalling python sbin programs. --- configure.ac | 1 + daemon/Makefile.am | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 83b7de8b..b8ca184e 100644 --- a/configure.ac +++ b/configure.ac @@ -250,6 +250,7 @@ if test "x$want_python" = "xyes"; then pythondir=`echo ${pythondir} | sed -e 's,[$][{]prefix[}],${pyprefix},g'` pyexecdir=`echo ${pyexecdir} | sed -e 's,[$][{]exec_prefix[}],${pyprefix},g'` fi + PYTHON_EXEC_PREFIX=$($PYTHON -c 'import sys; print sys.exec_prefix') else # Namespace support requires Python support want_linux_netns=no diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 6a435a3f..2818d88b 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -7,6 +7,8 @@ # Makefile for building netns components. # +PYSBINDIR = ${PYTHON_EXEC_PREFIX}/sbin + if WANT_NETNS SUBDIRS = src ns3 endif @@ -22,10 +24,11 @@ install-exec-hook: # Python package uninstall uninstall-hook: - rm -f ${SBINDIR}/core-daemon - rm -f ${SBINDIR}/coresendmsg - rm -f ${SBINDIR}/core-cleanup - rm -f ${SBINDIR}/core-xen-cleanup + rm -f ${PYSBINDIR}/core-daemon + rm -f ${PYSBINDIR}/coresendmsg + rm -f ${PYSBINDIR}/core-cleanup + rm -f ${PYSBINDIR}/core-xen-cleanup + rm -f ${PYSBINDIR}/core-manage rm -f ${pythondir}/core_python-${COREDPY_VERSION}-py${PYTHON_VERSION}.egg-info rm -f ${pythondir}/core_python_netns-1.0-py${PYTHON_VERSION}.egg-info rm -rf ${pythondir}/core