]> code.delx.au - gnu-emacs/blobdiff - Makefile.in
(create-file-buffer): If the filename sans directory starts with spaces,
[gnu-emacs] / Makefile.in
index 10fedcce82e98fe98e41e5e68862dca97d8ec815..ec93805a0e9ebbee40c9b41339b005afa34d4439 100644 (file)
@@ -9,7 +9,7 @@
 
 # GNU Emacs is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
+# the Free Software Foundation; either version 3, or (at your option)
 # any later version.
 
 # GNU Emacs is distributed in the hope that it will be useful,
@@ -409,10 +409,8 @@ install-arch-dep: mkdir
 ## Note that we copy DOC* and then delete DOC
 ## as a workaround for a bug in tar on Ultrix 4.2.
 
-## FIXME
-## Should only install the DOC- file appropriate to this build, not DOC-*.
-## http://lists.gnu.org/archive/html/emacs-pretest-bug/2007-01/msg00417.html
-## (fix available for consideration post-release).
+## We install only the relevant DOC file if possible
+## (ie DOC-${version}.buildnumber), otherwise DOC-${version}*.
 
 ## If people complain about the h flag in tar command, take that out.
 ## That flag is also used in leim/Makefile.in
@@ -474,11 +472,18 @@ install-arch-indep: mkdir info
        -unset CDPATH; \
        if [ `(cd ./etc; /bin/pwd)` != `(cd $(DESTDIR)${docdir}; /bin/pwd)` ]; \
        then \
-          echo "Copying etc/DOC-* to $(DESTDIR)${docdir} ..." ; \
-          (cd ./etc; tar -chf - DOC*) \
+          fullversion=`./src/emacs --version | sed -n '1 s/GNU Emacs *//p'`; \
+          if [ -f "./etc/DOC-$${fullversion}" ]; \
+          then \
+            docfile="DOC-$${fullversion}"; \
+          else \
+            docfile="DOC-${version}*"; \
+          fi; \
+          echo "Copying etc/$${docfile} to $(DESTDIR)${docdir} ..." ; \
+          (cd ./etc; tar -chf - $${docfile}) \
             |(cd $(DESTDIR)${docdir}; umask 022; tar -xvf - && cat > /dev/null) || exit 1; \
           (cd $(DESTDIR)$(docdir); chown $${LOGNAME:-$$USERNAME} DOC*; chmod a+r DOC*; \
-           if test "`echo DOC-*`" != "DOC-*"; then rm DOC; fi); \
+           if test "`echo DOC-*`" != "DOC-*"; then rm -f DOC; fi); \
        else true; fi
        -unset CDPATH; \
        if [ -r ./lisp ] \