Regenerate texi-from-org if ox-texinfo.el changes

* doc/misc/Makefile.in (top_srcdir): New, set by configure.
(emacs): Set load-prefer-newer.
(org_template): Make output depend on ox-texinfo.el.
This commit is contained in:
Glenn Morris 2021-04-04 17:11:47 -07:00
parent 9cb3db0bad
commit a86edac26b

View file

@ -22,7 +22,7 @@ SHELL = @SHELL@
# Where to find the source code. $(srcdir) will be the doc/misc subdirectory
# of the source tree. This is set by configure's '--srcdir' option.
srcdir=@srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
## Where the output files go.
@ -235,14 +235,14 @@ ${buildinfodir}/tramp.info tramp.html: ${srcdir}/trampver.texi
abs_top_builddir = @abs_top_builddir@
EMACS = ${abs_top_builddir}/src/emacs
emacs = "${EMACS}" -batch --no-site-file --no-site-lisp
emacs = "${EMACS}" -batch --no-site-file --no-site-lisp --eval '(setq load-prefer-newer t)'
# Generated .texi files go in srcdir so they can be included in the
# release tarfile along with the others.
# Work in srcdir (and use abs_top_builddir) so that +setupfile and
# things like org-setup's "version" macro work. Sigh.
define org_template
$(1:.org=.texi): $(1)
$(1:.org=.texi): $(1) ${top_srcdir}/lisp/org/ox-texinfo.el
$${AM_V_GEN}cd "$${srcdir}" && $${emacs} -l ox-texinfo \
-f org-texinfo-export-to-texinfo-batch $$(notdir $$<) $$(notdir $$@)
endef