Fix #7011 - Removed unused clean.sh, full-uninstall.sh, uninstall.sh, changed purge.sh (#10938)

* Deleted clean.sh, full-uninstall.sh
* Removed uninstall.sh, running make uninstall should be enough
* Changed Makefile and purge.sh, now users should only use ,ake purge or make system-purge, as listed in README
* Reduced 'distclean mrproper rmd clean' options to simple 'clean' in Makefile
This commit is contained in:
Dmitriy Somov 2018-08-10 17:06:41 +03:00 committed by radare
parent 745c81faa1
commit 054351b223
7 changed files with 35 additions and 71 deletions

View File

@ -168,18 +168,15 @@ ifneq ($(USE_ZIP),NO)
$(ZIP) -r "${ZIPNAME}" "radare2-${WINBITS}-${VERSION}"
endif
clean: rmd
clean:
rm -f `find . -type f -iname '*.d'`
rm -f libr/libr.a libr/libr.dylib libr/include/r_version.h
rm -rf libr/.libr
for DIR in shlr libr binr ; do $(MAKE) -C "$$DIR" clean ; done
distclean mrproper:
-rm -f `find . -type f -name '*.d'`
rm -f `find . -type f -name '*.o'`
rm -f libr/libr.a
for DIR in libr binr shlr ; do ( cd "$$DIR" ; ${MAKE} mrproper) ; done
rm -f config-user.mk plugins.cfg libr/config.h
rm -f libr/include/r_userconf.h libr/include/r_version.h libr/config.mk
rm -f libr/include/r_userconf.h libr/config.mk
rm -f pkgcfg/*.pc
pkgcfg:
@ -232,10 +229,6 @@ install love: install-doc install-man install-www
$(SHELL) sys/ldconfig.sh
$(SHELL) ./configure-plugins --rm-static $(DESTDIR)$(LIBDIR)/radare2/last/
# Remove make .d files. fixes build when .c files are removed
rmd:
rm -f `find . -type f -iname '*.d'`
install-www:
rm -rf "${DESTDIR}${WWWROOT}"
rm -rf "${DESTDIR}${LIBDIR}/radare2/${VERSION}/www" # old dir
@ -338,17 +331,8 @@ purge: purge-doc purge-dev user-uninstall
rm -rf "${DESTDIR}${INCLUDEDIR}/libr"
rm -rf "${DESTDIR}${DATADIR}/radare2"
purge2:
$(MAKE) purge
ifneq ($(PREFIX),/usr)
$(MAKE) purge PREFIX=/usr
endif
ifneq ($(PREFIX),/usr/local)
$(MAKE) purge PREFIX=/usr/local
endif
purge3: purge2
sys/purge.sh distro
system-purge: purge
sys/purge.sh
R2V=radare2-${VERSION}
@ -471,7 +455,7 @@ shlr/capstone:
include ${MKPLUGINS}
.PHONY: all clean distclean mrproper install symstall uninstall deinstall strip
.PHONY: all clean install symstall uninstall deinstall strip
.PHONY: libr binr install-man w32dist tests dist shot pkgcfg depgraph.png love
.PHONY: purge purge2 purge3
.PHONY: purge system-purge
.PHONY: shlr/capstone

View File

@ -117,6 +117,10 @@ version or remove all previous installations:
$ make uninstall
$ make purge
To remove all stuff including libraries, use
$ make system-purge
# Package manager

View File

@ -1,2 +0,0 @@
#!/bin/sh
rm -f .mark*

View File

@ -1,6 +0,0 @@
#!/bin/sh
# find root
cd "$(dirname "$PWD/$0")" ; cd ..
make purge

View File

@ -6,30 +6,27 @@ if [ -z "${MAKE}" ]; then
[ $? = 0 ] && MAKE=gmake
fi
if [ "$1" = "distro" ]; then
# TODO: Query the user before taking any action
if [ -x /usr/bin/apt-get ] ; then
sudo apt-get remove radare2
sudo apt-get remove libradare2-common
sudo apt-get remove --auto-remove libradare2-common
sudo apt-get purge libradare2-common
sudo apt-get purge --auto-remove libradare2-common
sudo apt-get remove libradare2
sudo apt-get remove --auto-remove libradare2
sudo apt-get purge libradare2
sudo apt-get purge --auto-remove libradare2
fi
# TODO: support brew
# TODO: support archlinux
# TODO: support gentoo
exit 0
fi
echo "All files related to current and previous installations
of r2 (including libraries) will be deleted. Continue? (y/n) "
read answer
case "$answer" in
y|Y)
if [ -x /usr/bin/apt-get ] ; then
sudo apt-get remove radare2
sudo apt-get remove libradare2-common
sudo apt-get remove --auto-remove libradare2-common
sudo apt-get purge libradare2-common
sudo apt-get purge --auto-remove libradare2-common
sudo apt-get remove libradare2
sudo apt-get remove --auto-remove libradare2
sudo apt-get purge libradare2
sudo apt-get purge --auto-remove libradare2
fi
# TODO: support brew
# TODO: support archlinux
# TODO: support gentoo
exit 0
esac
PREFIX="$1"
if [ -z "${PREFIX}" ]; then
PREFIX=/usr
fi
[ -z "${SUDO}" ] && SUDO=sudo
echo "Uninstalling r2 from ${PREFIX}..."
./configure --prefix="${PREFIX}"
${SUDO} ${MAKE} purge2
echo "Aborting."
exit 1

View File

@ -47,7 +47,6 @@ fileslist=(
./sys/build.sh
./sys/cherrypull.sh
./sys/clang-analyzer.sh
./sys/clean.sh
./sys/clone-r2-bindings.sh
./sys/dist-all.sh
./sys/dist-bin.sh
@ -64,7 +63,6 @@ fileslist=(
./sys/farm/run.sh
./sys/farm.sh
./sys/find-regression.sh
./sys/full-uninstall.sh
./sys/gtkaml.sh
./sys/gtk.sh
./sys/indent.sh
@ -88,6 +86,7 @@ fileslist=(
./sys/osx-pkg.sh
./sys/osx-pkg-uninstall.sh
./sys/osx-pkg-uninstall.tool
./sys/purge.sh
./sys/python-bindist.sh
./sys/python-dist.sh
./sys/python-r2pipe.sh
@ -97,7 +96,6 @@ fileslist=(
./sys/static.sh
./sys/sync.sh
./sys/tiny.sh
./sys/uninstall.sh
./sys/update.sh
./sys/user.sh
./sys/vala.sh

View File

@ -1,11 +0,0 @@
#!/bin/sh
# find root
cd "$(dirname "$PWD/$0")" ; cd ..
MAKE=make
gmake --help >/dev/null 2>&1
[ $? = 0 ] && MAKE=gmake
${MAKE} purge
${MAKE} deinstall