build: Fix the uninstall target

It should not create dirs and should not fail when installed
files are missing.
This commit is contained in:
orbea 2021-11-13 21:01:13 -08:00
parent 0530cae984
commit 358a0ae5a3

View File

@ -108,14 +108,9 @@ install: all
install -p -m644 $(SRCDIR)/data/com.github.Alcaro.Flips.metainfo.xml $(DESTDIR)$(PREFIX)/share/metainfo
uninstall:
mkdir -p $(DESTDIR)$(PREFIX)/bin
mkdir -p $(DESTDIR)$(PREFIX)/share/applications
mkdir -p $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps
mkdir -p $(DESTDIR)$(PREFIX)/share/icons/hicolor/symbolic/apps
mkdir -p $(DESTDIR)$(PREFIX)/share/metainfo
rm $(DESTDIR)$(PREFIX)/bin/$(FNAME_$(TARGET))
rm $(DESTDIR)$(PREFIX)/share/applications/com.github.Alcaro.Flips.desktop
rm $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/com.github.Alcaro.Flips.svg
rm $(DESTDIR)$(PREFIX)/share/icons/hicolor/symbolic/apps/com.github.Alcaro.Flips-symbolic.svg
rm $(DESTDIR)$(PREFIX)/share/metainfo/com.github.Alcaro.Flips.metainfo.xml
rm -f $(DESTDIR)$(PREFIX)/bin/$(FNAME_$(TARGET))
rm -f $(DESTDIR)$(PREFIX)/share/applications/com.github.Alcaro.Flips.desktop
rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/com.github.Alcaro.Flips.svg
rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/symbolic/apps/com.github.Alcaro.Flips-symbolic.svg
rm -f $(DESTDIR)$(PREFIX)/share/metainfo/com.github.Alcaro.Flips.metainfo.xml
endif