From 90e8fcee1a5792446074f4b2a381877dbee6c7c6 Mon Sep 17 00:00:00 2001 From: Yoni Rabkin Date: Fri, 30 May 2014 13:30:56 -0400 Subject: * Makefile: Only use ginstall-info if it exists. --- Makefile | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 4ef02b7..3f73b93 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,9 @@ INFODIR=$(PREFIX)/info MAN1DIR=$(PREFIX)/share/man/man1 SITELISP=$(PREFIX)/share/emacs/site-lisp/emms -INSTALLINFO = /usr/bin/ginstall-info --info-dir=$(INFODIR) +GINSTALLINFO = /usr/bin/ginstall-info --info-dir=$(INFODIR) +# For systems without ginstall-info +INSTALLINFO = /usr/bin/install-info --info-dir=$(INFODIR) CHANGELOG_CMD = git log --pretty=medium --no-merges # The currently released version of EMMS @@ -42,10 +44,18 @@ install: install -m 644 $(ALLCOMPILED) $(SITELISP) install -m 0644 $(DOCDIR)emms.info $(INFODIR)/emms for p in $(MAN1PAGES) ; do $(GZIP) -9c $$p > $(MAN1DIR)/$$p.gz ; done - $(INSTALLINFO) $(DOCDIR)emms.info + if [ -x /usr/bin/ginstall-info ]; then \ + $(GINSTALLINFO) $(DOCDIR)emms.info; \ + else \ + $(INSTALLINFO) $(DOCDIR)emms.info; \ + fi remove-info: - $(INSTALLINFO) --remove $(DOCDIR)emms.info + if [ -x /usr/bin/ginstall-info ]; then \ + $(GINSTALLINFO) --remove $(DOCDIR)emms.info; \ + else \ + $(INSTALLINFO) --remove $(DOCDIR)emms.info; \ + fi ChangeLog: $(CHANGELOG_CMD) > $@ -- cgit v1.2.3