Commit e4ed201f authored by Glenn Morris's avatar Glenn Morris

Replace doc/*/Makefile.in dist rules with code in admin/admin.el

* admin/admin.el (make-manuals-dist-output-variables)
(make-manuals-dist--1, make-manuals-dist): New.
Replaces doc/*/Makefile.in `dist' rules.

* doc/emacs/Makefile.in (version): Remove variable.
(clean): No longer delete dist tarfile.
(dist): Remove rule; replace with code in admin.el.

* doc/lispintro/Makefile.in (version): Remove variable.
(clean): No longer delete dist tarfile.
(dist): Remove rule; replace with code in admin.el.

* doc/lispref/Makefile.in (version): Remove variable.
(clean): No longer delete dist tarfile.
(dist): Remove rule; replace with code in admin.el.

* doc/misc/Makefile.in (version): Remove variable.
(clean): No longer delete dist tarfile.
(dist): Remove rule; replace with code in admin.el.
parent d1036d28
2014-11-09 Glenn Morris <rgm@gnu.org>
* admin.el (make-manuals-dist-output-variables)
(make-manuals-dist--1, make-manuals-dist): New.
Replaces doc/*/Makefile.in `dist' rules.
2014-10-31 Eli Zaretskii <eliz@gnu.org>
* notes/repo (Notes): Reword the stylistic guidance for commit log
......
......@@ -609,6 +609,87 @@ style=\"text-align:left\">")
(setq done t))))
(forward-line 1)))))
(defconst make-manuals-dist-output-variables
`(("@srcdir@" . ".")
("^\\(\\(?:texinfo\\|buildinfo\\|emacs\\)dir *=\\).*" . "\\1 .")
("^\\(clean:.*\\)" . "\\1 infoclean")
("@MAKEINFO@" . "makeinfo")
("@MKDIR_P@" . "mkdir -p")
("@INFO_EXT@" . ".info")
("@INFO_OPTS@" . "")
("@SHELL@" . "/bin/bash")
("@prefix@" . "/usr/local")
("@datarootdir@" . "${prefix}/share")
("@datadir@" . "${datarootdir}")
("@PACKAGE_TARNAME@" . "emacs")
("@docdir@" . "${datarootdir}/doc/${PACKAGE_TARNAME}")
("@\\(dvi\\|html\\|pdf\\|ps\\)dir@" . "${docdir}")
("@GZIP_PROG@" . "gzip")
("@INSTALL@" . "install -c")
("@INSTALL_DATA@" . "${INSTALL} -m 644")
("@configure_input@" . ""))
"Alist of (REGEXP . REPLACEMENT) pairs for `make-manuals-dist'.")
(defun make-manuals-dist--1 (root type)
"Subroutine of `make-manuals-dist'."
(let* ((dest (expand-file-name "manual" root))
(default-directory (progn (make-directory dest t)
(file-name-as-directory dest)))
(version (with-temp-buffer
(insert-file-contents "../doc/emacs/emacsver.texi")
(re-search-forward "@set EMACSVER \\([0-9.]+\\)")
(match-string 1)))
(stem (format "emacs-%s-%s" (if (equal type "emacs") "manual" type)
version))
(tarfile (format "%s.tar" stem)))
(message "Doing %s..." type)
(if (file-directory-p stem)
(delete-directory stem t))
(make-directory stem)
(copy-file "../doc/misc/texinfo.tex" stem)
(or (equal type "emacs") (copy-file "../doc/emacs/emacsver.texi" stem))
(dolist (file (directory-files (format "../doc/%s" type) t))
(if (or (string-match-p "\\(\\.texi\\'\\|/ChangeLog\\|/README\\'\\)" file)
(and (equal type "lispintro")
(string-match-p "\\.\\(eps\\|pdf\\)\\'" file)))
(copy-file file stem)))
(with-temp-buffer
(insert-file-contents (format "../doc/%s/Makefile.in" type))
(dolist (cons make-manuals-dist-output-variables)
(while (re-search-forward (car cons) nil t)
(replace-match (cdr cons) t))
(goto-char (point-min)))
(let (ats)
(while (re-search-forward "@[a-zA-Z_]+@" nil t)
(setq ats t)
(message "Unexpanded: %s" (match-string 0)))
(if ats (error "Unexpanded configure variables in Makefile?")))
(write-region nil nil (expand-file-name (format "%s/Makefile" stem))
nil 'silent))
(call-process "tar" nil nil nil "-cf" tarfile stem)
(delete-directory stem t)
(message "...created %s" tarfile)))
;; Does anyone actually use these tarfiles?
(defun make-manuals-dist (root &optional type)
"Make the standalone manual source tarfiles for the Emacs webpage.
ROOT should be the root of an Emacs source tree.
Interactively with a prefix argument, prompt for TYPE.
Optional argument TYPE is type of output (nil means all)."
(interactive (let ((root (read-directory-name "Emacs root directory: "
source-directory nil t)))
(list root
(if current-prefix-arg
(completing-read
"Type: "
'("emacs" "lispref" "lispintro" "misc"))))))
(unless (file-exists-p (expand-file-name "src/emacs.c" root))
(user-error "%s doesn't seem to be the root of an Emacs source tree" root))
(dolist (m '("emacs" "lispref" "lispintro" "misc"))
(if (member type (list nil m))
(make-manuals-dist--1 root m))))
;; Stuff to check new `defcustom's got :version tags.
;; Adapted from check-declare.el.
......
2014-11-09 Glenn Morris <rgm@gnu.org>
* Makefile.in (version): Remove variable.
(clean): No longer delete dist tarfile.
(dist): Remove rule; replace with code in admin.el.
2014-11-01 Glenn Morris <rgm@gnu.org>
* programs.texi (Misc for Programs): Fix typo.
......
......@@ -26,9 +26,6 @@ SHELL = @SHELL@
# of the source tree. This is set by configure's `--srcdir' option.
srcdir=@srcdir@
# Only for make dist.
version=@version@
## Where the output files go.
## Note that the setfilename command in the .texi files assumes this.
## This is a bit funny. Because the info files are in the
......@@ -192,7 +189,6 @@ mostlyclean:
## Products not in the release tarfiles.
clean: mostlyclean
rm -f $(DVI_TARGETS) $(HTML_TARGETS) $(PDF_TARGETS) $(PS_TARGETS)
rm -f emacs-manual-${version}.tar*
distclean: clean
rm -f Makefile
......@@ -203,44 +199,6 @@ infoclean:
maintainer-clean: distclean infoclean
.PHONY: dist
## Make a standalone tarfile of the Emacs manual sources.
## The [c] is a dumb way to prevent configure expanding it.
## TODO this is getting increasingly lengthy; not sure it is worth keeping.
dist:
rm -rf emacs-manual-${version}
mkdir emacs-manual-${version}
cp ${srcdir}/*.texi ${texinfodir}/texinfo.tex \
${srcdir}/ChangeLog* emacs-manual-${version}/
sed -e 's/@sr[c]dir@/./' -e 's/^\(texinfodir *=\).*/\1 ./' \
-e 's/^\(buildinfodir *=\).*/\1 ./' \
-e 's/^\(clean:.*\)/\1 infoclean/' \
-e "s/@ver[s]ion@/${version}/" \
-e 's/@MAKE[I]NFO@/makeinfo/' -e 's/@MK[D]IR_P@/mkdir -p/' \
-e 's/@IN[F]O_EXT@/.info/' -e 's/@IN[F]O_OPTS@//' \
-e 's|@SH[E]LL@|/bin/bash|' \
-e 's|@[p]refix@|/usr/local|' \
-e 's|@[d]atarootdir@|$${prefix}/share|' \
-e 's|@[d]atadir@|$${datarootdir}|' \
-e 's|@[P]ACKAGE_TARNAME@|emacs|' \
-e 's|@[d]ocdir@|$${datarootdir}/doc/$${PACKAGE_TARNAME}|' \
-e 's|@[d]vidir@|$${docdir}|' \
-e 's|@[h]tmldir@|$${docdir}|' \
-e 's|@[p]dfdir@|$${docdir}|' \
-e 's|@[p]sdir@|$${docdir}|' \
-e 's|@[G]ZIP_PROG@|gzip|' \
-e 's|@IN[S]TALL@|install -c|' \
-e 's|@IN[S]TALL_DATA@|$${INSTALL} -m 644|' \
-e '/@[c]onfigure_input@/d' \
${srcdir}/Makefile.in > emacs-manual-${version}/Makefile
@if grep '@[a-zA-Z_]*@' emacs-manual-${version}/Makefile; then \
echo "Unexpanded configure variables in Makefile?" 1>&2; exit 1; \
fi
tar -cf emacs-manual-${version}.tar emacs-manual-${version}
rm -rf emacs-manual-${version}
.PHONY: install-dvi install-html install-pdf install-ps install-doc
install-dvi: dvi
......
2014-11-09 Glenn Morris <rgm@gnu.org>
* Makefile.in (version): Remove variable.
(clean): No longer delete dist tarfile.
(dist): Remove rule; replace with code in admin.el.
2014-10-20 Glenn Morris <rgm@gnu.org>
* emacs-lisp-intro.texi (Autoload): Update loaddefs.el details.
......
......@@ -19,10 +19,7 @@
SHELL = @SHELL@
# NB If you add any more configure variables,
# update the sed rules in the dist target below.
srcdir = @srcdir@
version=@version@
buildinfodir = $(srcdir)/../../info
# Directory with the (customized) texinfo.tex file.
......@@ -110,7 +107,6 @@ mostlyclean:
clean: mostlyclean
rm -f $(DVI_TARGETS) $(HTML_TARGETS) $(PDF_TARGETS) $(PS_TARGETS)
rm -f emacs-lispintro-${version}.tar*
distclean: clean
rm -f Makefile
......@@ -120,43 +116,6 @@ infoclean:
maintainer-clean: distclean infoclean
.PHONY: dist
dist:
rm -rf emacs-lispintro-${version}
mkdir emacs-lispintro-${version}
cp ${srcdir}/*.texi ${srcdir}/*.eps ${srcdir}/*.pdf \
${texinfodir}/texinfo.tex ${emacsdir}/emacsver.texi \
${srcdir}/ChangeLog* ${srcdir}/README emacs-lispintro-${version}/
sed -e 's/@sr[c]dir@/./' -e 's/^\(texinfodir *=\).*/\1 ./' \
-e 's/^\(emacsdir *=\).*/\1 ./' \
-e 's/^\(buildinfodir *=\).*/\1 ./' \
-e 's/^\(clean:.*\)/\1 infoclean/' \
-e "s/@ver[s]ion@/${version}/" \
-e 's/@MAKE[I]NFO@/makeinfo/' -e 's/@MK[D]IR_P@/mkdir -p/' \
-e 's/@IN[F]O_EXT@/.info/' -e 's/@IN[F]O_OPTS@//' \
-e 's|@SH[E]LL@|/bin/bash|' \
-e 's|@[p]refix@|/usr/local|' \
-e 's|@[d]atarootdir@|$${prefix}/share|' \
-e 's|@[d]atadir@|$${datarootdir}|' \
-e 's|@[P]ACKAGE_TARNAME@|emacs|' \
-e 's|@[d]ocdir@|$${datarootdir}/doc/$${PACKAGE_TARNAME}|' \
-e 's|@[d]vidir@|$${docdir}|' \
-e 's|@[h]tmldir@|$${docdir}|' \
-e 's|@[p]dfdir@|$${docdir}|' \
-e 's|@[p]sdir@|$${docdir}|' \
-e 's|@[G]ZIP_PROG@|gzip|' \
-e 's|@IN[S]TALL@|install -c|' \
-e 's|@IN[S]TALL_DATA@|$${INSTALL} -m 644|' \
-e '/@[c]onfigure_input@/d' \
${srcdir}/Makefile.in > emacs-lispintro-${version}/Makefile
@if grep '@[a-zA-Z_]*@' emacs-lispintro-${version}/Makefile; then \
echo "Unexpanded configure variables in Makefile?" 1>&2; exit 1; \
fi
tar -cf emacs-lispintro-${version}.tar emacs-lispintro-${version}
rm -rf emacs-lispintro-${version}
.PHONY: install-dvi install-html install-pdf install-ps install-doc
install-dvi: dvi
......
2014-11-09 Glenn Morris <rgm@gnu.org>
* Makefile.in (version): Remove variable.
(clean): No longer delete dist tarfile.
(dist): Remove rule; replace with code in admin.el.
2014-10-20 Glenn Morris <rgm@gnu.org>
* Version 24.4 released.
......
......@@ -25,8 +25,6 @@ SHELL = @SHELL@
# Standard configure variables.
srcdir = @srcdir@
version=@version@
buildinfodir = $(srcdir)/../../info
# Directory with the (customized) texinfo.tex file.
texinfodir = $(srcdir)/../misc
......@@ -165,7 +163,6 @@ mostlyclean:
clean: mostlyclean
rm -f $(DVI_TARGETS) $(HTML_TARGETS) $(PDF_TARGETS) $(PS_TARGETS)
rm -f vol[12].dvi vol[12].pdf vol[12].ps
rm -f emacs-lispref-${version}.tar*
distclean: clean
rm -f Makefile
......@@ -175,43 +172,6 @@ infoclean:
maintainer-clean: distclean infoclean
.PHONY: dist
## Note this excludes the two-volume stuff.
dist:
rm -rf emacs-lispref-${version}
mkdir emacs-lispref-${version}
cp ${srcdir}/*.texi ${texinfodir}/texinfo.tex \
$(emacsdir)/emacsver.texi ${srcdir}/ChangeLog* \
${srcdir}/README emacs-lispref-${version}/
sed -e 's/@sr[c]dir@/./' -e 's/^\(texinfodir *=\).*/\1 ./' \
-e 's/^\(emacsdir *=\).*/\1 ./' \
-e 's/^\(buildinfodir *=\).*/\1 ./' \
-e 's/^\(clean:.*\)/\1 infoclean/' \
-e "s/@ver[s]ion@/${version}/" \
-e 's/@MAKE[I]NFO@/makeinfo/' -e 's/@MK[D]IR_P@/mkdir -p/' \
-e 's/@IN[F]O_EXT@/.info/' -e 's/@IN[F]O_OPTS@//' \
-e 's|@SH[E]LL@|/bin/bash|' \
-e 's|@[p]refix@|/usr/local|' \
-e 's|@[d]atarootdir@|$${prefix}/share|' \
-e 's|@[d]atadir@|$${datarootdir}|' \
-e 's|@[P]ACKAGE_TARNAME@|emacs|' \
-e 's|@[d]ocdir@|$${datarootdir}/doc/$${PACKAGE_TARNAME}|' \
-e 's|@[d]vidir@|$${docdir}|' \
-e 's|@[h]tmldir@|$${docdir}|' \
-e 's|@[p]dfdir@|$${docdir}|' \
-e 's|@[p]sdir@|$${docdir}|' \
-e 's|@[G]ZIP_PROG@|gzip|' \
-e 's|@IN[S]TALL@|install -c|' \
-e 's|@IN[S]TALL_DATA@|$${INSTALL} -m 644|' \
-e '/@[c]onfigure_input@/d' \
${srcdir}/Makefile.in > emacs-lispref-${version}/Makefile
@if grep '@[a-zA-Z_]*@' emacs-lispref-${version}/Makefile; then \
echo "Unexpanded configure variables in Makefile?" 1>&2; exit 1; \
fi
tar -cf emacs-lispref-${version}.tar emacs-lispref-${version}
rm -rf emacs-lispref-${version}
.PHONY: install-dvi install-html install-pdf install-ps install-doc
install-dvi: dvi
......
2014-11-09 Glenn Morris <rgm@gnu.org>
* Makefile.in (version): Remove variable.
(clean): No longer delete dist tarfile.
(dist): Remove rule; replace with code in admin.el.
2014-11-08 Michael Albinus <michael.albinus@gmx.de>
Backport Tramp changes from trunk.
......
......@@ -24,8 +24,6 @@ SHELL = @SHELL@
# set by the configure script's `--srcdir' option.
srcdir=@srcdir@
version=@version@
## Where the output files go.
buildinfodir = $(srcdir)/../../info
## Directory with emacsver.texi.
......@@ -863,7 +861,6 @@ mostlyclean:
clean: mostlyclean
rm -f $(DVI_TARGETS) $(HTML_TARGETS) $(PDF_TARGETS) $(PS_TARGETS)
rm -f efaq-w32.dvi efaq-w32.html efaq-w32.pdf efaq-w32.ps
rm -f emacs-misc-${version}.tar*
distclean: clean
rm -f Makefile
......@@ -877,41 +874,6 @@ infoclean:
maintainer-clean: distclean infoclean
dist:
rm -rf emacs-misc-${version}
mkdir emacs-misc-${version}
cp ${srcdir}/*.texi ${srcdir}/texinfo.tex \
$(emacsdir)/emacsver.texi ${srcdir}/ChangeLog* \
emacs-misc-${version}/
sed -e 's/@sr[c]dir@/./' \
-e 's/^\(emacsdir *=\).*/\1 ./' \
-e 's/^\(buildinfodir *=\).*/\1 ./' \
-e 's/^\(clean:.*\)/\1 infoclean/' \
-e "s/@ver[s]ion@/${version}/" \
-e 's/@MAKE[I]NFO@/makeinfo/' -e 's/@MK[D]IR_P@/mkdir -p/' \
-e 's/@IN[F]O_EXT@/.info/' -e 's/@IN[F]O_OPTS@//' \
-e 's|@SH[E]LL@|/bin/bash|' \
-e 's|@[p]refix@|/usr/local|' \
-e 's|@[d]atarootdir@|$${prefix}/share|' \
-e 's|@[d]atadir@|$${datarootdir}|' \
-e 's|@[P]ACKAGE_TARNAME@|emacs|' \
-e 's|@[d]ocdir@|$${datarootdir}/doc/$${PACKAGE_TARNAME}|' \
-e 's|@[d]vidir@|$${docdir}|' \
-e 's|@[h]tmldir@|$${docdir}|' \
-e 's|@[p]dfdir@|$${docdir}|' \
-e 's|@[p]sdir@|$${docdir}|' \
-e 's|@[G]ZIP_PROG@|gzip|' \
-e 's|@IN[S]TALL@|install -c|' \
-e 's|@IN[S]TALL_DATA@|$${INSTALL} -m 644|' \
-e '/@[c]onfigure_input@/d' \
${srcdir}/Makefile.in > emacs-misc-${version}/Makefile
@if grep '@[a-zA-Z_]*@' emacs-misc-${version}/Makefile; then \
echo "Unexpanded configure variables in Makefile?" 1>&2; exit 1; \
fi
tar -cf emacs-misc-${version}.tar emacs-misc-${version}
rm -rf emacs-misc-${version}
.PHONY: install-dvi install-html install-pdf install-ps install-doc
install-dvi: dvi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment