Commit caeda713 authored by Kevin J. McCarthy's avatar Kevin J. McCarthy

Improve info install/uninstall checks.

Make sure install-info exists before using it.

Make sure target mutt.info exists before calling `install-info
--delete`.  Add a few missing '-f' force flags to removals during
uninstall.
parent 95c4c5c2
Pipeline #32138248 passed with stages
in 16 minutes and 31 seconds
......@@ -89,9 +89,11 @@ install-data-local: makedoc-all instdoc
$(INSTALL) -m 644 Muttrc $(DESTDIR)$(sysconfdir) ; \
fi
-if [ -f mutt.info ] ; then \
$(MKDIR_P) $(DESTDIR)$(infodir) ; \
$(INSTALL) -m 644 mutt.info $(DESTDIR)$(infodir) ; \
install-info $(DESTDIR)$(infodir)/mutt.info $(DESTDIR)$(infodir)/dir ; \
$(MKDIR_P) $(DESTDIR)$(infodir) ; \
$(INSTALL) -m 644 mutt.info $(DESTDIR)$(infodir) ; \
if command -v install-info >/dev/null 2>&1 ; then \
install-info $(DESTDIR)$(infodir)/mutt.info $(DESTDIR)$(infodir)/dir ; \
fi \
fi
uninstall-local:
......@@ -108,12 +110,16 @@ uninstall-local:
-rm -f $(DESTDIR)$(docdir)/manual.txt
for i in Muttrc ; do \
if cmp -s $(DESTDIR)$(sysconfdir)/$$i.dist $(DESTDIR)$(sysconfdir)/$$i ; then \
rm $(DESTDIR)$(sysconfdir)/$$i ; \
rm -f $(DESTDIR)$(sysconfdir)/$$i ; \
fi ; \
rm $(DESTDIR)$(sysconfdir)/$${i}.dist ; \
rm -f $(DESTDIR)$(sysconfdir)/$${i}.dist ; \
done
install-info --delete $(DESTDIR)$(infodir)/mutt.info $(DESTDIR)$(infodir)/dir
rm -f $(DESTDIR)$(infodir)/mutt.info
-if [ -f $(DESTDIR)$(infodir)/mutt.info ] ; then \
if command -v install-info >/dev/null 2>&1 ; then \
install-info --delete $(DESTDIR)$(infodir)/mutt.info $(DESTDIR)$(infodir)/dir ; \
fi ; \
rm -f $(DESTDIR)$(infodir)/mutt.info ; \
fi
check:
manual.txt: manual.html
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment