(SOURCES, unlock, relock): Delete.
[bpt/emacs.git] / Makefile.in
index 7bfa790..66cc0f3 100644 (file)
@@ -2,14 +2,14 @@
 # DIST: make most of the changes to this file you might want, so try
 # DIST: that first.
 
-# Copyright (C) 1992,93,94,95,96,97,98,1999,2000,01,02,03,04,2005,2006
-#   Free Software Foundation, Inc.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+#   2001, 2002, 2003, 2004, 2005, 2006, 2007  Free Software Foundation, Inc.
 
 # This file is part of GNU Emacs.
 
 # 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,
@@ -110,6 +110,10 @@ exec_prefix=@exec_prefix@
 # run directly (like etags).
 bindir=@bindir@
 
+# The root of the directory tree for read-only architecture-independent
+# data files.  ${datadir}, ${infodir} and ${mandir} are based on this.
+datarootdir=@datarootdir@
+
 # Where to install architecture-independent data files.         ${lispdir}
 # and ${etcdir} are subdirectories of this.
 datadir=@datadir@
@@ -154,6 +158,9 @@ bitmapdir=@bitmapdir@
 # We use $(srcdir) explicitly in dependencies so as not to depend on VPATH.
 srcdir=@srcdir@
 
+# Where the manpage source files are kept.
+mansrcdir=$(srcdir)/doc/man
+
 # Tell make where to find source files; this is needed for the makefiles.
 VPATH=@srcdir@
 
@@ -246,7 +253,7 @@ EMACSFULL = `echo emacs-${version}${EXEEXT} | sed '$(TRANSFORM)'`
 SUBDIR = lib-src src
 
 # The makefiles of the directories in $SUBDIR.
-SUBDIR_MAKEFILES = lib-src/Makefile man/Makefile lispref/Makefile lispintro/Makefile src/Makefile oldXMenu/Makefile lwlib/Makefile leim/Makefile
+SUBDIR_MAKEFILES = lib-src/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispref/Makefile doc/lispintro/Makefile src/Makefile oldXMenu/Makefile lwlib/Makefile leim/Makefile
 
 # Subdirectories to install, and where they'll go.
 # lib-src's makefile knows how to install it, so we don't do that here.
@@ -307,7 +314,7 @@ blessmail: ${SUBDIR_MAKEFILES} src FRC
 Makefile: $(srcdir)/Makefile.in config.status
        ./config.status
 
-config.status: ${srcdir}/configure
+config.status: ${srcdir}/configure ${srcdir}/lisp/version.el
        ./config.status --recheck
 
 AUTOCONF_INPUTS = @MAINT@ $(srcdir)/configure.in $(srcdir)/m4/getopt.m4
@@ -332,13 +339,16 @@ src/config.stamp: $(srcdir)/src/config.in config.status
 lib-src/Makefile: $(srcdir)/lib-src/Makefile.in config.status
        ./config.status
 
-man/Makefile: $(srcdir)/man/Makefile.in config.status
+doc/emacs/Makefile: $(srcdir)/doc/emacs/Makefile.in config.status
        ./config.status
 
-lispref/Makefile: $(srcdir)/lispref/Makefile.in config.status
+doc/misc/Makefile: $(srcdir)/doc/misc/Makefile.in config.status
        ./config.status
 
-lispintro/Makefile: $(srcdir)/lispintro/Makefile.in config.status
+doc/lispref/Makefile: $(srcdir)/doc/lispref/Makefile.in config.status
+       ./config.status
+
+doc/lispintro/Makefile: $(srcdir)/doc/lispintro/Makefile.in config.status
        ./config.status
 
 oldXMenu/Makefile: $(srcdir)/oldXMenu/Makefile.in config.status
@@ -400,11 +410,14 @@ install-arch-dep: mkdir
 ### Install the files that are machine-independent.
 ### Most of them come straight from the distribution;
 ### the exception is the DOC-* files, which are copied
-## from the build directory.
+### from the build directory.
 
 ## Note that we copy DOC* and then delete DOC
 ## as a workaround for a bug in tar on Ultrix 4.2.
 
+## 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
 install-arch-indep: mkdir info
@@ -465,11 +478,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 ] \
@@ -518,12 +538,12 @@ install-arch-indep: mkdir info
             ${INSTALL_INFO} --info-dir=$(DESTDIR)${infodir} $(DESTDIR)${infodir}/$$elt); \
          done; \
        else true; fi
-       -chmod -R a+r $(DESTDIR)${datadir}/emacs ${COPYDESTS} $(DESTDIR)${infodir}
+       -chmod -R a+r $(DESTDIR)${datadir}/emacs/${version} $(DESTDIR)${datadir}/emacs/site-lisp ${COPYDESTS} $(DESTDIR)${infodir}
        thisdir=`/bin/pwd`; \
-       cd ${srcdir}/etc; \
+       cd ${mansrcdir}; \
        for page in emacs emacsclient etags ctags ; do \
          (cd $${thisdir}; \
-          ${INSTALL_DATA} ${srcdir}/etc/$${page}.1 $(DESTDIR)${man1dir}/$${page}${manext}; \
+          ${INSTALL_DATA} ${mansrcdir}/$${page}.1 $(DESTDIR)${man1dir}/$${page}${manext}; \
           chmod a+r $(DESTDIR)${man1dir}/$${page}${manext}); \
        done
 
@@ -606,9 +626,10 @@ mostlyclean: FRC
        (cd oldXMenu; $(MAKE) $(MFLAGS) mostlyclean)
        (cd lwlib;    $(MAKE) $(MFLAGS) mostlyclean)
        (cd lib-src;  $(MAKE) $(MFLAGS) mostlyclean)
-       -(cd man &&   $(MAKE) $(MFLAGS) mostlyclean)
-       -(cd lispref &&   $(MAKE) $(MFLAGS) mostlyclean)
-       -(cd lispintro &&   $(MAKE) $(MFLAGS) mostlyclean)
+       -(cd doc/emacs &&   $(MAKE) $(MFLAGS) mostlyclean)
+       -(cd doc/misc &&   $(MAKE) $(MFLAGS) mostlyclean)
+       -(cd doc/lispref &&   $(MAKE) $(MFLAGS) mostlyclean)
+       -(cd doc/lispintro &&   $(MAKE) $(MFLAGS) mostlyclean)
        (cd leim;     $(MAKE) $(MFLAGS) mostlyclean)
 
 ### `clean'
@@ -624,9 +645,10 @@ clean: FRC
        (cd oldXMenu; $(MAKE) $(MFLAGS) clean)
        (cd lwlib;    $(MAKE) $(MFLAGS) clean)
        (cd lib-src;  $(MAKE) $(MFLAGS) clean)
-       -(cd man &&   $(MAKE) $(MFLAGS) clean)
-       -(cd lispref &&   $(MAKE) $(MFLAGS) clean)
-       -(cd lispintro &&   $(MAKE) $(MFLAGS) clean)
+       -(cd doc/emacs &&   $(MAKE) $(MFLAGS) clean)
+       -(cd doc/misc &&   $(MAKE) $(MFLAGS) clean)
+       -(cd doc/lispref &&   $(MAKE) $(MFLAGS) clean)
+       -(cd doc/lispintro &&   $(MAKE) $(MFLAGS) clean)
        (cd leim;     $(MAKE) $(MFLAGS) clean)
 
 ### `distclean'
@@ -644,9 +666,10 @@ distclean: FRC
        (cd oldXMenu; $(MAKE) $(MFLAGS) distclean)
        (cd lwlib;    $(MAKE) $(MFLAGS) distclean)
        (cd lib-src;  $(MAKE) $(MFLAGS) distclean)
-       (cd man &&    $(MAKE) $(MFLAGS) distclean)
-       (cd lispref &&    $(MAKE) $(MFLAGS) distclean)
-       (cd lispintro &&    $(MAKE) $(MFLAGS) distclean)
+       (cd doc/emacs &&    $(MAKE) $(MFLAGS) distclean)
+       (cd doc/misc &&    $(MAKE) $(MFLAGS) distclean)
+       (cd doc/lispref &&    $(MAKE) $(MFLAGS) distclean)
+       (cd doc/lispintro &&    $(MAKE) $(MFLAGS) distclean)
        (cd leim;     $(MAKE) $(MFLAGS) distclean)
        (cd lisp;     $(MAKE) $(MFLAGS) distclean)
        ${top_distclean}
@@ -667,9 +690,10 @@ maintainer-clean: FRC
        (cd oldXMenu; $(MAKE) $(MFLAGS) maintainer-clean)
        (cd lwlib;    $(MAKE) $(MFLAGS) maintainer-clean)
        (cd lib-src;  $(MAKE) $(MFLAGS) maintainer-clean)
-       -(cd man &&   $(MAKE) $(MFLAGS) maintainer-clean)
-       -(cd lispref &&   $(MAKE) $(MFLAGS) maintainer-clean)
-       -(cd lispintro &&   $(MAKE) $(MFLAGS) maintainer-clean)
+       -(cd doc/emacs &&   $(MAKE) $(MFLAGS) maintainer-clean)
+       -(cd doc/misc &&   $(MAKE) $(MFLAGS) maintainer-clean)
+       -(cd doc/lispref &&   $(MAKE) $(MFLAGS) maintainer-clean)
+       -(cd doc/lispintro &&   $(MAKE) $(MFLAGS) maintainer-clean)
        (cd leim;     $(MAKE) $(MFLAGS) maintainer-clean)
        (cd lisp;     $(MAKE) $(MFLAGS) maintainer-clean)
        ${top_distclean}
@@ -706,9 +730,10 @@ unlock:
        (cd lib-src; $(MAKE) $(MFLAGS) unlock)
        (cd lisp; $(MAKE) $(MFLAGS) unlock)
        (cd lisp/term; chmod u+w README *.el)
-       (cd man; chmod u+w *texi* ChangeLog split-man)
-       (cd lispref; chmod u+w *texi* ChangeLog)
-       (cd lispintro; chmod u+w *texi* ChangeLog)
+       (cd doc/emacs; chmod u+w *.texi ChangeLog)
+       (cd doc/misc; chmod u+w *.texi ChangeLog)
+       (cd doc/lispref; chmod u+w *texi* ChangeLog)
+       (cd doc/lispintro; chmod u+w *texi* ChangeLog)
        (cd oldXMenu; chmod u+w *.[ch] Makefile README)
        (cd lwlib; chmod u+w *.[ch] Makefile README)
        (cd src; $(MAKE) $(MFLAGS) unlock)
@@ -719,12 +744,13 @@ relock:
        (cd etc; $(MAKE) $(MFLAGS) relock)
        (cd lib-src; $(MAKE) $(MFLAGS) relock)
        (cd lisp; $(MAKE) $(MFLAGS) relock)
-       (cd lisp/term; chmod u+w README *.el)
-       (cd man; chmod u+w *texi* ChangeLog split-man)
-       (cd lispref; chmod u+w *texi* ChangeLog)
-       (cd lispintro; chmod u+w *texi* ChangeLog)
-       (cd oldXMenu; chmod u+w *.[ch] Makefile README)
-       (cd lwlib; chmod u+w *.[ch] Makefile README)
+       (cd lisp/term; chmod u-w README *.el)
+       (cd doc/emacs; chmod u-w *.texi ChangeLog)
+       (cd doc/misc; chmod u-w *.texi ChangeLog)
+       (cd doc/lispref; chmod u-w *texi* ChangeLog)
+       (cd doc/lispintro; chmod u-w *texi* ChangeLog)
+       (cd oldXMenu; chmod u-w *.[ch] Makefile README)
+       (cd lwlib; chmod u-w *.[ch] Makefile README)
        (cd src; $(MAKE) $(MFLAGS) relock)
 
 # The src subdir knows how to do the right thing
@@ -744,13 +770,15 @@ force-info:
 # put the info files in $(srcdir),
 # so we can do ok running make in the build dir.
 info: force-info
-       -(cd man; $(MAKE) $(MFLAGS) info)
-       -(cd lispref; $(MAKE) $(MFLAGS) info)
-       -(cd lispintro; $(MAKE) $(MFLAGS) info)
+       -(cd doc/emacs; $(MAKE) $(MFLAGS) info)
+       -(cd doc/misc; $(MAKE) $(MFLAGS) info)
+       -(cd doc/lispref; $(MAKE) $(MFLAGS) info)
+       -(cd doc/lispintro; $(MAKE) $(MFLAGS) info)
 dvi:
-       (cd man; $(MAKE) $(MFLAGS) dvi)
-       (cd lispref; $(MAKE) $(MFLAGS) elisp.dvi)
-       (cd lispintro; $(MAKE) $(MFLAGS) emacs-lisp-intro.dvi)
+       (cd doc/emacs; $(MAKE) $(MFLAGS) dvi)
+       (cd doc/misc; $(MAKE) $(MFLAGS) dvi)
+       (cd doc/lispref; $(MAKE) $(MFLAGS) elisp.dvi)
+       (cd doc/lispintro; $(MAKE) $(MFLAGS) emacs-lisp-intro.dvi)
 
 #### Bootstrapping.
 
@@ -799,7 +827,8 @@ bootstrap-clean-before-fast: FRC
        (cd oldXMenu; $(MAKE) $(MFLAGS) clean)
        (cd lwlib;    $(MAKE) $(MFLAGS) clean)
        (cd lib-src;  $(MAKE) $(MFLAGS) clean)
-       -(cd man &&   $(MAKE) $(MFLAGS) clean)
-       -(cd lispref &&   $(MAKE) $(MFLAGS) clean)
-       -(cd lispintro &&   $(MAKE) $(MFLAGS) clean)
+       -(cd doc/emacs &&   $(MAKE) $(MFLAGS) clean)
+       -(cd doc/misc &&   $(MAKE) $(MFLAGS) clean)
+       -(cd doc/lispref &&   $(MAKE) $(MFLAGS) clean)
+       -(cd doc/lispintro &&   $(MAKE) $(MFLAGS) clean)
        (cd leim;     $(MAKE) $(MFLAGS) clean)