- The automake test txinfo-vtexi4.sh no longer fails when localtime
and UTC cross a day boundary.
+ - Emacsen older than version 25, which require use of
+ byte-compile-dest-file, are supported again.
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
New in 1.16.1:
$(EMACS) --batch \
$(AM_ELCFLAGS) $(ELCFLAGS) \
$$am__subdir_includes -L $(builddir) -L $(srcdir) \
- --eval '(setq byte-compile-dest-file-function (lambda (_) "$@"))' \
+ --eval '$(am__emacs_byte_compile_setup)' \
-f batch-byte-compile '$<'; \
else :; fi
+if %?FIRST%
+## In Automake 1.16, byte compilation was changed to use
+## byte-compile-dest-file-function, but that doesn't exist in Emacs
+## versions earlier than 25, which are still widespread (likely
+## permanently). There's no harm in supporting the older versions, which
+## require defining the byte-compile-file defun, so do so.
+## Otherwise, various of our lisp-related tests fail with the older
+## Emacsen, since they would try to byte-compile into a read-only srcdir.
+##
+## This is used, single-quoted, in the shell sequence above.
+## So use (quote) instead of another single quote in the Lisp.
+##
+am__emacs_byte_compile_setup = \
+ (if (boundp (quote byte-compile-dest-file-function)) \
+ (setq byte-compile-dest-file-function (lambda (_) "$@")) \
+ (defun byte-compile-dest-file (_) "$@") \
+ )
+## Just to be clear: that "$@" above is an Elisp string of the make target.
+endif %?FIRST%
## ------------ ##
## Installing. ##
required=emacs
. test-init.sh
+# The story here is that at least in Emacs 21, -L foo -L bar ends up
+# with bar before foo in load-path. The invocation in the .el.elc rule
+# in lisp.am correctly uses -L $(builddir) -L $(srcdir), and thus the
+# test below ends up failing. So skip the test on such old Emacs; no
+# need to work around in the code.
+#
+# At least as of Emacs 24, -L foo -L bar preserves command line order,
+# so foo is before bar in load-path, and all is well.
+#
+# Situation with Emacs 22 and 23 is unknown, so play it safe and skip
+# the test for them too.
+#
+emacs_major=$(${EMACS-emacs} --version | sed -e 's/.* //;s/\..*$//;1q')
+if test -z "$emacs_major" || test "$emacs_major" -le 23; then
+ exit 77
+fi
+
cat >> configure.ac << 'END'
AM_PATH_LISPDIR
AC_OUTPUT