Snappy uses CMake, and they didn't bother to provide an unintall target.

Or a distclean target, for that matter.

Do the best we can.

(libpcap and tcpdump support both autotools and CMake, and Wireshark
uses only CMake; all of them support an uninstall target in CMake.  Go
forth, read what they did, and sin no more.)


(cherry picked from commit 504f2ea42a)
This commit is contained in:
Guy Harris 2020-12-12 23:51:10 +00:00
parent 0717bf0a99
commit c98e80f365
1 changed files with 18 additions and 2 deletions

View File

@ -1374,8 +1374,24 @@ uninstall_snappy() {
if [ ! -z "$installed_snappy_version" ] ; then
echo "Uninstalling snappy:"
cd snappy-$installed_snappy_version
$DO_MAKE_UNINSTALL || exit 1
make distclean || exit 1
#
# snappy uses cmake and doesn't support "make uninstall" or
# "make distclean"
#
# $DO_MAKE_UNINSTALL || exit 1
# make distclean || exit 1
cd build_dir
make clean || exit 1
cd ..
sudo rm -f /usr/local/lib/libsnappy.a \
/usr/local/include/snappy-c.h \
/usr/local/include/snappy-sinksource.h \
/usr/local/include/snappy.h \
/usr/local/include/snappy-stubs-public.h \
/usr/local/lib/cmake/Snappy/SnappyTargets.cmake \
/usr/local/lib/cmake/Snappy/SnappyTargets-noconfig.cmake \
/usr/local/lib/cmake/Snappy/SnappyConfig.cmake \
/usr/local/lib/cmake/Snappy/SnappyConfigVersion.cmake
cd ..
rm snappy-$installed_snappy_version-done