]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
elisp: run emacs with --no-site-file
authorMike Frysinger <vapier@gentoo.org>
Tue, 8 Feb 2022 05:39:40 +0000 (00:39 -0500)
committerMike Frysinger <vapier@gentoo.org>
Wed, 9 Feb 2022 03:44:42 +0000 (22:44 -0500)
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.

NEWS
doc/automake.texi
lib/am/lisp.am
m4/lispdir.m4

diff --git a/NEWS b/NEWS
index 29c4d8a9658866738604efbba227070dc2ad3e0e..40384264c4ab2cab28c9c41d8aba59496bf08beb 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -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.
index 4a2c17fa904407b563d5820f8521eda0d91c83c6..b6a38dc27ce5f6588d624e93574c50f8260eb598 100644 (file)
@@ -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
index 45c58a6da938b97f464766455b7323f5fcfe4588..746f01679f72a1172072af72ba120e4c4a249acf 100644 (file)
@@ -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)' \
index 525e3ee6da38d78bbe06574193231a61ac5694a7..6f9b89d2ca1a6b26946fd2e77180b24eb999eca9 100644 (file)
@@ -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;}' \