diff doc/emacs/Makefile.in @ 110781:664402ada542

Misc cleanup for doc/*/Makefiles. * doc/misc/Makefile.in (SHELL): Set it. (info): Move the mkdir dependency to the individual info files. (mostlyclean): Tidy up. (clean): Only delete the specific dvi and pdf files. (maintainer-clean): Be more restrictive in what we delete. * doc/lispref/Makefile.in: Rearrange to more closely resemble doc/emacs/Makefile. (INSTALL_INFO): Remove unused variable. (mostlyclean, infoclean, dist): New rules. (clean): Delete dvi and pdf files. (maintainer-clean): Remove elisp.oaux, use infoclean. * doc/lispintro/Makefile.in (SHELL): Use /bin/sh, like every other Makefile.in. (INFO_SOURCES, INFO_TARGETS, DVI_TARGETS): Remove variables. ($(infodir), html, pdf, infoclean, dist): New rules. (${infodir}/eintr): Ensure $infodir exists. Use $@. (emacs-lisp-intro.dvi, emacs-lisp-intro.pdf, emacs-lisp-intro.html): Use $^. (.PHONY): Declare clean rules. (mostlyclean): Delete more temp files. (clean): Delete specific dvi, pdf and html files. (maintainer-clean): Use infoclean. (.NOEXPORT): Remove, unused by any other Makefile.in. * doc/emacs/Makefile.in (EMACS_XTRA): Add the main source file. (emacs-xtra.dvi, emacs-xtra.pdf): Remove explicit emacs-xtra.texi. (mostlyclean): No core files, reorder other files. (clean): Delete specific dvi and pdf files. (infoclean, dist): New rules. (maintainer-clean): Use infoclean.
author Glenn Morris <rgm@gnu.org>
date Tue, 05 Oct 2010 19:26:38 -0700
parents cad6890bb825
children 9a3ce1aa9d45
line wrap: on
line diff
--- a/doc/emacs/Makefile.in	Wed Oct 06 01:38:26 2010 +0000
+++ b/doc/emacs/Makefile.in	Tue Oct 05 19:26:38 2010 -0700
@@ -21,9 +21,8 @@
 
 SHELL = /bin/sh
 
-# Where to find the source code.  $(srcdir) will be the man
-# subdirectory of the source tree.  This is
-# set by the configure script's `--srcdir' option.
+# Where to find the source code.  $(srcdir) will be the doc/emacs subdirectory
+# of the source tree.  This is set by configure's `--srcdir' option.
 srcdir=@srcdir@
 
 # Tell make where to find source files; this is needed for the makefiles.
@@ -50,7 +49,8 @@
 ENVADD = TEXINPUTS="$(srcdir):$(texinfodir):$(TEXINPUTS)" MAKEINFO="$(MAKEINFO) -I$(srcdir)"
 
 
-EMACS_XTRA=\
+EMACS_XTRA= \
+	${srcdir}/emacs-xtra.texi \
 	$(srcdir)/arevert-xtra.texi \
 	$(srcdir)/cal-xtra.texi \
 	$(srcdir)/dired-xtra.texi \
@@ -132,26 +132,44 @@
 	$(ENVADD) $(TEXI2PDF) ${srcdir}/emacs.texi
 
 
-emacs-xtra.dvi: emacs-xtra.texi $(EMACS_XTRA)
+emacs-xtra.dvi: $(EMACS_XTRA)
 	$(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-xtra.texi
 
-emacs-xtra.pdf: emacs-xtra.texi $(EMACS_XTRA)
+emacs-xtra.pdf: $(EMACS_XTRA)
 	$(ENVADD) $(TEXI2PDF) ${srcdir}/emacs-xtra.texi
 
-.PHONY: mostlyclean clean distclean maintainer-clean
+.PHONY: mostlyclean clean distclean maintainer-clean infoclean
 
+## Temp files.
 mostlyclean:
-	rm -f *.log *.cp *.fn *.ky *.op *.ops *.pg *.vr core *.tp *.core
-	rm -f *.aux *.cps *.fns *.kys *.pgs *.vrs *.toc
+	rm -f *.aux *.log *.toc *.cp *.cps *.fn *.fns *.ky *.kys \
+	  *.op *.ops *.pg *.pgs *.tp *.tps *.vr *.vrs
 
+## Products not in the release tarfiles.
 clean: mostlyclean
-	rm -f *.dvi
+	rm -f emacs.dvi emacs-xtra.dvi emacs.pdf emacs-xtra.pdf
 
 distclean: clean
-#	rm -f Makefile
 
-maintainer-clean: distclean
-	rm -f emacs.dvi emacs.pdf
+## In the standalone tarfile, the clean rule runs this.
+infoclean:
 	-cd $(infodir) && rm -f emacs emacs-[1-9] emacs-[1-9][0-9]
 
+maintainer-clean: distclean infoclean
+
+## Make a standalone tarfile of the Emacs manual sources.
+## The [c] is a dumb way to prevent configure expanding it.
+## The emacs: rule becomes circular when we change infodir to ".".
+dist:
+	rm -rf emacs
+	mkdir emacs
+	cp ${srcdir}/*.texi ${texinfodir}/texinfo.tex \
+	  ${srcdir}/ChangeLog* emacs/
+	sed -e 's/@sr[c]dir@/./' -e 's/\(texinfodir *=\).*/\1 ./' \
+	  -e 's/\(infodir *=\).*/\1 ./' -e '/^emacs *:/d' \
+	  -e 's/^\(clean:.*\)/\1 infoclean/' \
+	  ${srcdir}/Makefile.in > emacs/Makefile
+	tar -cf emacs-texi.tar emacs
+	rm -rf emacs
+
 ### Makefile ends here