Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@xxxxxxxxx> --- Makefile | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9f49184..0acd655 100644 --- a/Makefile +++ b/Makefile @@ -4,8 +4,17 @@ # Copyright 2019 VMware Inc, Yordan Karadzhov (VMware) <y.karadz@xxxxxxxxx> # +UID := $(shell id -u) + +CYAN := '\e[36m' +PURPLE := '\e[35m' +NC := '\e[0m' + all: + @ echo ${CYAN}Installing third party:${NC}; ./install_third_party.sh + @ echo + @ echo ${CYAN}Buildinging trace-cruncher:${NC}; python3 setup.py build clean: @@ -13,7 +22,15 @@ clean: rm -f src/datawrapper.c install: + @ echo ${CYAN}Installing trace-cruncher:${NC}; python3 setup.py install --record install_manifest.txt uninstall: - xargs rm -v < install_manifest.txt + @ if [ $(UID) -ne 0 ]; then \ + echo ${PURPLE}Permission denied${NC} 1>&2; \ + else \ + echo ${CYAN}Uninstalling trace-cruncher:${NC}; \ + xargs rm -v < install_manifest.txt; \ + rm -rfv dist tracecruncher.egg-info; \ + rm -fv install_manifest.txt; \ + fi -- 2.20.1