[slime-cvs] CVS update: slime/doc/Makefile

Luke Gorrie lgorrie at common-lisp.net
Fri Apr 16 19:31:11 UTC 2004


Update of /project/slime/cvsroot/slime/doc
In directory common-lisp.net:/tmp/cvs-serv5572/doc

Modified Files:
	Makefile 
Log Message:
Added 'install' and 'uninstall' targets for the Info manual. It may be
necessary to tweak `infodir' in the Makefile to suit the local system
before installing. (Patch from from Richard M Kreuter.)

Date: Fri Apr 16 15:31:11 2004
Author: lgorrie

Index: slime/doc/Makefile
diff -u slime/doc/Makefile:1.2 slime/doc/Makefile:1.3
--- slime/doc/Makefile:1.2	Fri Mar 26 09:39:55 2004
+++ slime/doc/Makefile	Fri Apr 16 15:31:11 2004
@@ -1,5 +1,23 @@
+# Where to put the info file(s). NB: the GNU Coding Standards (GCS)
+# and the Filesystem Hierarchy Standard (FHS) differ on where info
+# files belong. The GCS says /usr/local/info; the FHS says
+# /usr/local/share/info. Many distros obey the FHS, but people who
+# installed their emacs from source probably have a GCS-ish file
+# hierarchy.
+infodir=/usr/local/info
+
+# What command to use to install info file(s)
+INSTALL_CMD=install -m 644
+
+# Info files generated here.
+infofiles=slime.info
+
 all: slime.ps slime.info
 
+install: install-info
+
+uninstall: uninstall-info
+
 slime.ps: slime.dvi
 	dvips -o $@ $<
 
@@ -34,3 +52,25 @@
 
 .INTERMEDIATE: contributors.texi
 
+# Debian's install-info wants a --section argument.
+section := $(shell grep INFO-DIR-SECTION $(infofiles) | sed 's/INFO-DIR-SECTION //')
+install-info: slime.info
+	mkdir -p $(infodir)
+	$(INSTALL_CMD) $(infofiles) $(infodir)/$(infofiles)
+	@if (install-info --version && \
+		install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
+		echo "install-info --info-dir=$(infodir) $(infodir)/$(infofiles)";\
+		install-info --info-dir="$(infodir)" "$(infodir)/$(infofiles)" || :;\
+	else \
+		echo "install-info --infodir=$(infodir) --section $(section) $(section) $(infodir)/$(infofiles)" && \
+		install-info --infodir="$(infodir)" --section $(section) ${section} "$(infodir)/$(infofiles)" || :; fi
+
+uninstall-info:
+	@if (install-info --version && \
+		install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
+		echo "install-info --info-dir=$(infodir) --remove $(infodir)/$(infofiles)";\
+		install-info --info-dir="$(infodir)" --remove "$(infodir)/$(infofiles)" || :;\
+	else \
+		echo "install-info --infodir=$(infodir) --remove $(infodir)/$(infofiles)";\
+		install-info --infodir="$(infodir)" --remove "$(infodir)/$(infofiles)" || :; fi
+	rm -f $(infodir)/$(infofiles)





More information about the slime-cvs mailing list