diff options
author | Mike Frysinger <vapier@gentoo.org> | 2022-02-08 00:39:40 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2022-02-08 22:44:42 -0500 |
commit | 5c9e117c5f1366a301a62ff70c33405a9aa23921 (patch) | |
tree | d70cf65232de09c4045d11f7c65764fdec79027b | |
parent | 24a28a24e32b1195ca5fc9f2d1303bc0368fe18b (diff) | |
download | automake-5c9e117c5f1366a301a62ff70c33405a9aa23921.tar.gz |
elisp: run emacs with --no-site-file
Fixes automake bug https://bugs.gnu.org/21547.
If users have interactive site file logic, the lispdir probing can
hang, as can the compilation of elisp files. Use --no-site-file to
disable loading any of that possible user logic.
* NEWS: Note emacs --no-site-file change.
* doc/automake.texi: Run emacs with --no-site-file.
* lib/am/lisp.am: Likewise.
* m4/lispdir.m4: Likewise.
-rw-r--r-- | NEWS | 5 | ||||
-rw-r--r-- | doc/automake.texi | 2 | ||||
-rw-r--r-- | lib/am/lisp.am | 2 | ||||
-rw-r--r-- | m4/lispdir.m4 | 2 |
4 files changed, 8 insertions, 3 deletions
@@ -5,6 +5,11 @@ please see NEWS-2.0 and start following the advice there now. New in 1.17: +* Bugs fixed + + - When compiling emacs lisp files, emacs is run with --no-site-file to + disable user config files that might hang or access the terminal. + * New features added - RANLIB may be overridden on a per-target basis. diff --git a/doc/automake.texi b/doc/automake.texi index 4a2c17fa9..b6a38dc27 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -13349,7 +13349,7 @@ instance, here is how @code{AM_PATH_LISPDIR} (@pxref{Emacs Lisp}) computes @samp{$(lispdir)}: @example -$EMACS -batch -Q -eval '(while load-path +$EMACS -batch -Q --no-site-file -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' >conftest.out lispdir=`sed -n diff --git a/lib/am/lisp.am b/lib/am/lisp.am index 45c58a6da..746f01679 100644 --- a/lib/am/lisp.am +++ b/lib/am/lisp.am @@ -38,7 +38,7 @@ endif %?INSTALL% esac; \ ## Emacs byte-compilation won't create this automatically, sadly. test -d "$$am__dir" || $(MKDIR_P) "$$am__dir" || exit 1; \ - $(EMACS) --batch \ + $(EMACS) --batch --no-site-file \ $(AM_ELCFLAGS) $(ELCFLAGS) \ $$am__subdir_includes -L $(builddir) -L $(srcdir) \ --eval '$(am__emacs_byte_compile_setup)' \ diff --git a/m4/lispdir.m4 b/m4/lispdir.m4 index 525e3ee6d..6f9b89d2c 100644 --- a/m4/lispdir.m4 +++ b/m4/lispdir.m4 @@ -34,7 +34,7 @@ AC_DEFUN([AM_PATH_LISPDIR], # which is non-obvious for non-emacs users. # Redirecting /dev/null should help a bit; pity we can't detect "broken" # emacsen earlier and avoid running this altogether. - AC_RUN_LOG([$EMACS -batch -Q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' </dev/null >conftest.out]) + AC_RUN_LOG([$EMACS -batch -Q --no-site-file -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' </dev/null >conftest.out]) am_cv_lispdir=`sed -n \ -e 's,/$,,' \ -e '/.*\/lib\/x*emacs\/site-lisp$/{s,.*/lib/\(x*emacs/site-lisp\)$,${libdir}/\1,;p;q;}' \ |