1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-23 03:03:02 +01:00

Makefile: add uninstall target

This commit is contained in:
Ansa89 2015-04-03 13:04:28 +02:00 committed by cnhenry
parent 37e7b4c3d3
commit fd85d8f87b
2 changed files with 31 additions and 6 deletions

View File

@ -5,6 +5,7 @@ help:
@echo " toxic: Build toxic" @echo " toxic: Build toxic"
@echo " doc: Build documentation" @echo " doc: Build documentation"
@echo " install: Build toxic and install it in PREFIX (default PREFIX is \"$(abspath $(PREFIX))\")" @echo " install: Build toxic and install it in PREFIX (default PREFIX is \"$(abspath $(PREFIX))\")"
@echo " uninstall: Remove toxic from PREFIX (default PREFIX is \"$(abspath $(PREFIX))\")"
@echo " clean: Remove built files" @echo " clean: Remove built files"
@echo " help: This help" @echo " help: This help"
@echo @echo

24
cfg/targets/uninstall.mk Normal file
View File

@ -0,0 +1,24 @@
# Uninstall target
uninstall:
@echo "Removing toxic executable"
@rm -f $(abspath $(DESTDIR)/$(BINDIR)/toxic)
@echo "Removing desktop file"
@rm -f $(abspath $(DESTDIR)/$(APPDIR)/$(DESKFILE))
@echo "Removing data files"
@for f in $(DATAFILES) ; do \
rm -f $(abspath $(DESTDIR)/$(DATADIR)/$$f) ;\
done
@for f in $(SNDFILES) ; do \
rm -f $(abspath $(DESTDIR)/$(DATADIR)/sounds/$$f) ;\
done
@echo "Removing man pages"
@for f in $(MANFILES) ; do \
section=$(abspath $(DESTDIR)/$(MANDIR))/man`echo $$f | rev | cut -d "." -f 1` ;\
file=$$section/$$f ;\
rm -f $$file $$file.gz ;\
done
.PHONY: uninstall