forked from osmocom/wireshark
macos-setup: clean up uninstallation of snappy.
For a CMake build done in a subdirectory of the source directory, the equivalent of "make distclean" is "rm -rf {that subdirectory}". Make it so. When uninstalling the stuff snappy installs with "rm -rf", use $DO_RM, so it's done with sudo iff /usr/local isn't writable by us, just as "make uninstall" is done with $DO_MAKE_UNINSTALL so it's done with sudo iff /usr/local isn't writable by us. Fix up the list of what to remove, now that we're building snappy as a shared library, so that it removes shared libraries rather than the non-existent static library. Update a comment while we're at it, as Lua isn't the only dependency that doesn't support "make uninstall".
This commit is contained in:
parent
1a3703cc3e
commit
7d01e3a74e
|
@ -1381,22 +1381,24 @@ uninstall_snappy() {
|
|||
cd snappy-$installed_snappy_version
|
||||
#
|
||||
# snappy uses cmake and doesn't support "make uninstall" or
|
||||
# "make distclean"
|
||||
# "make distclean". For "make uninstall, we just remove
|
||||
# what we know it installs; for "make disclean", we just
|
||||
# remove the entire build directory.
|
||||
#
|
||||
# $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
|
||||
rm -rf build_dir || exit 1
|
||||
$DO_RM -f /usr/local/lib/libsnappy.1.1.8.dylib \
|
||||
/usr/local/lib/libsnappy.1.dylib \
|
||||
/usr/local/lib/libsnappy.dylib \
|
||||
/usr/local/include/snappy-c.h \
|
||||
/usr/local/include/snappy-sinksource.h \
|
||||
/usr/local/include/snappy-stubs-public.h \
|
||||
/usr/local/include/snappy.h \
|
||||
/usr/local/lib/cmake/Snappy/SnappyConfig.cmake \
|
||||
/usr/local/lib/cmake/Snappy/SnappyConfigVersion.cmake \
|
||||
/usr/local/lib/cmake/Snappy/SnappyTargets-noconfig.cmake \
|
||||
/usr/local/lib/cmake/Snappy/SnappyTargets.cmake || exit 1
|
||||
cd ..
|
||||
rm snappy-$installed_snappy_version-done
|
||||
|
||||
|
@ -2850,8 +2852,9 @@ uninstall_all() {
|
|||
# (If that's not the case, this test needs to check the subdirectories
|
||||
# as well.)
|
||||
#
|
||||
# If not, do "make install", "make uninstall", the removes for Lua,
|
||||
# and the renames of [g]libtool* with sudo.
|
||||
# If not, do "make install", "make uninstall", the removes for
|
||||
# dependencies that don't support "make uninstall", and the renames
|
||||
# of [g]libtool* with sudo.
|
||||
#
|
||||
if [ -w /usr/local ]
|
||||
then
|
||||
|
|
Loading…
Reference in New Issue