emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lispref installation is broken


From: Tim Van Holder
Subject: lispref installation is broken
Date: Tue, 16 Nov 2004 09:13:58 +0100

Currently, the lispref Makefile is a bit inconsistent in its behaviour,
and installation is downright broken.

The inconsistency lies in the fact that the DVI is built locally, and
the info file in $srcdir/../info (which, being part of the source tree,
may be read-only).
The brokenness lies in the fact that the `install' target then copies
the info files from the local directory (where they don't exist) to
the $infodir directory (= $srcdir/../info) where they already are. In
addition, both `install' and `dist' depend on 'elisp' which has no rule
associated with it (the existing rule is `$(srcdir)/elisp').

The patch below adjusts the Makefile so that:
* the info file is built locally
* the install target copies the info file to both $srcdir/../info
  and the 'real' infodir ($prefix/info) and installs it there.
  I assume this is what was intended; if not, installing only in
  $prefix/info is probably enough.

Issues remaining:
* The Makefile has no rule to update itself from Makefile.in, so changes
  to Makefile.in do not propagate unless config.status is run manually.
* The Makefile runs 'install-info' - on some systems, this file is in
  /sbin, which may not be in the path by default for non-root users.
  Optimally, both makeinfo and install-info should be located at
  configure time.

Index: Makefile.in
===================================================================
RCS file: /cvsroot/emacs/emacs/lispref/Makefile.in,v
retrieving revision 1.29
diff -u -u -p -d -r1.29 Makefile.in
--- Makefile.in 6 Nov 2004 16:17:45 -0000       1.29
+++ Makefile.in 8 Nov 2004 07:17:08 -0000
@@ -26,7 +26,11 @@ srcdir = @srcdir@
 # Tell make where to find source files; this is needed for the makefiles.
 address@hidden@
 
-infodir = $(srcdir)/../info
+# FIXME: This requires a writable $srcdir...
+srcinfodir = $(srcdir)/../info
+
+prefix = @prefix@
+infodir = @infodir@
 
 TEXI2DVI = texi2dvi
 SHELL = /bin/sh
@@ -98,18 +102,20 @@ srcs = \
 .PHONY: clean
 
 # The info file is named `elisp'.
-info: $(infodir)/elisp
+info: elisp
 
-$(infodir)/elisp: $(srcs)
-       $(MAKEINFO) -I. -I$(srcdir) $(srcdir)/elisp.texi -o $(infodir)/elisp
+elisp: $(srcs)
+       $(MAKEINFO) -I. -I$(srcdir) $(srcdir)/elisp.texi
 
 elisp.dvi: $(srcs)
        $(TEXI2DVI) -I $(srcdir) $(srcdir)/elisp.texi
 
 install: elisp
-       $(srcdir)/mkinstalldirs $(infodir)
-       cp elisp elisp-[1-9] elisp-[1-9][0-9] $(infodir)
-       ${INSTALL_INFO} --info-dir=${infodir} ${infodir}/elisp
+       for DIR in "$(srcinfodir)" "$(infodir)"; do \
+         $(srcdir)/mkinstalldirs "$$DIR"; \
+         cp elisp elisp-[1-9] elisp-[1-9][0-9] "$$DIR"; \
+         $(INSTALL_INFO) --info-dir="$$DIR" "$$DIR/elisp"; \
+       done
 
 clean:
        rm -f *.toc *.aux *.log *.cp *.cps *.fn *.fns *.tp *.tps \




reply via email to

[Prev in Thread] Current Thread [Next in Thread]