summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-01-04 17:06:40 -0800
committerKarl Berry <karl@freefriends.org>2020-01-04 17:06:40 -0800
commitb87f297426c2d79494b707d0fecddaff2b6eaefd (patch)
tree80cbf972f4232f55cad00ab5146607582539ddba /t
parentcf27a3dfc64b877524bea0505fe2820d6bfe6251 (diff)
downloadautomake-b87f297426c2d79494b707d0fecddaff2b6eaefd.tar.gz
automake: Support byte compilation in older Emacsen
* lib/am/lisp.am (am__emacs_byte_compile_setup) [FIRST]: define new make variable, to use byte-compile-dest-file-function if available, else byte-compile-dest-file. (.el.elc): use it. * t/lisp-loadpath.sh: skip test if emacs version is <= 23, since their -L ordering is backwards. * NEWS: update.
Diffstat (limited to 't')
-rw-r--r--t/lisp-loadpath.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/t/lisp-loadpath.sh b/t/lisp-loadpath.sh
index 312498845..37bec19d6 100644
--- a/t/lisp-loadpath.sh
+++ b/t/lisp-loadpath.sh
@@ -20,6 +20,23 @@
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