]> git.eshelyaron.com Git - emacs.git/commitdiff
Adjust better to Autoconf quoting style change
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 6 Jul 2022 04:25:44 +0000 (23:25 -0500)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 6 Jul 2022 04:27:17 +0000 (23:27 -0500)
* admin/gitmerge.el (gitmerge-emacs-version):
* admin/nt/dist-build/build-zips.sh (ACTUAL_VERSION):
* admin/quick-install-emacs (VERSION):
* lisp/cedet/ede/emacs.el (ede-emacs-version):
Adjust to change in configure.ac’s Autoconf quoting style.
* etc/srecode/ede-autoconf.srt:
* test/lisp/progmodes/autoconf-tests.el:
(autoconf-tests-current-defun-function-define)
(autoconf-tests-current-defun-function-subst):
Use better Autoconf quoting.
* make-dist (version): Simplify.

admin/gitmerge.el
admin/nt/dist-build/build-zips.sh
admin/quick-install-emacs
etc/srecode/ede-autoconf.srt
lisp/cedet/ede/emacs.el
make-dist
src/xterm.c
test/lisp/progmodes/autoconf-tests.el

index 5da70a402851c5ca44e1b4b41a9ec79dce6a4a47..a214dcbcb744ade1d79acfe17314dd1e4d73ea31 100644 (file)
@@ -124,7 +124,7 @@ If nil, the function `gitmerge-default-branch' guesses.")
       (let ((coding-system-for-read vc-git-log-output-coding-system))
        (call-process "git" nil t nil "show" (format "%s:configure.ac" branch)))
       (goto-char (point-min)))
-    (re-search-forward "^AC_INIT([^,]+, \\([0-9]+\\)\\.")
+    (re-search-forward "^AC_INIT([^,]+, \\[?\\([0-9]+\\)\\.")
     (string-to-number (match-string 1))))
 
 (defun gitmerge-default-branch ()
index 77d20a5a7b985f3af3c2c67ba98f348c5e66052c..39ac1fde6044aec323ddfb681b60fa1cc58b73a8 100755 (executable)
@@ -148,7 +148,7 @@ done
 if [ -z $ACTUAL_VERSION ];
 then
     ACTUAL_VERSION=`
-  sed -n 's/^AC_INIT(GNU Emacs,[        ]*\([^  ,)]*\).*/\1/p' < ../../../configure.ac
+  sed -n 's/^AC_INIT(\[*GNU Emacs]*,[   ]*\[*\([^]      ,)]*\).*/\1/p' < ../../../configure.ac
 `
 fi
 
index 9a73cf5a401f186dc3d19fbe1d8fce5cf7ce0ed8..b0a1d34251848a912e604957da45c068f3e47036 100755 (executable)
@@ -172,10 +172,10 @@ test x"$prefix" = x && { prefix="`get_config_var prefix`" || exit 4 ; }
 test x"$ARCH" = x && { ARCH="`get_config_var host`" || exit 4 ; }
 
 VERSION=`
-  sed -n 's/^AC_INIT([  ]*emacs[        ]*,[    ]*\([^  ),]*\).*/\1/p' <$SRC/configure.ac
+  sed -n 's/^AC_INIT([  ]*\[*emacs]*[   ]*,[    ]*\[*\([^]      ),]*\).*/\1/p' <$SRC/configure.ac
 ` || exit 4
 test -n "$VERSION" || VERSION=`
-  sed -n 's/^AC_INIT([  ]*GNU Emacs[    ]*,[    ]*\([^  ),]*\).*/\1/p' <$SRC/configure.ac
+  sed -n 's/^AC_INIT([  ]*\[*GNU Emacs]*[       ]*,[    ]*\[*\([^]      ),]*\).*/\1/p' <$SRC/configure.ac
 ` || exit 4
 test -n "$VERSION" || { printf '%s\n' >&2 "$me: no version in configure.ac"; exit 4; }
 
index 19dc14202de78eecf03858e44ac8e99545a455ea..ecca7afd007cb2d69d83f5ee594807883aa8e0aa 100644 (file)
@@ -44,10 +44,10 @@ template ede-empty :project
 
 AC_INIT({{PROJECT_NAME}}, {{PROJECT_VERSION}})
 AM_INIT_AUTOMAKE([{{PROGRAM}}], 0)
-AM_CONFIG_HEADER(config.h)
+AM_CONFIG_HEADER([config.h])
 
 {{comment_prefix}} End the configure script.
-AC_OUTPUT(Makefile, [date > stamp-h] )
+AC_OUTPUT([Makefile], [date > stamp-h] )
 ----
 
 
index 5a23f504f785346eb7c9a0f69da56c7bd90ed9bb..cbe766cedb6d5ca88a2007cbb5443ca014ee17bd 100644 (file)
@@ -59,7 +59,7 @@ Return a tuple of ( EMACSNAME . VERSION )."
            (file-exists-p (setq configure_ac "configure.in")))
        (insert-file-contents configure_ac)
        (goto-char (point-min))
-       (re-search-forward "AC_INIT(\\(?:GNU \\)?[eE]macs,\\s-*\\([0-9.]+\\)\\s-*[,)]")
+       (re-search-forward "AC_INIT(\\[?\\(?:GNU \\)?[eE]macs]?,\\s-*\\[?\\([0-9.]+\\)]?\\s-*[,)]")
        (setq ver (match-string 1))
        )
        )
index c1e7942d6013b3f6ee8633cfd0d90a8c63bab753..4646a2809bf6634645f4da53d2757c5c8d72e73b 100755 (executable)
--- a/make-dist
+++ b/make-dist
@@ -174,7 +174,7 @@ fi
 
 ### Find out which version of Emacs this is.
 version=`
-  sed -n 's/^AC_INIT(\[GNU Emacs],[     ]*\[\([^        ,)]*\)].*/\1/p' <configure.ac
+  sed -n 's/^AC_INIT(\[GNU Emacs],[     ]*\[\([^]]*\).*/\1/p' <configure.ac
 ` || version=
 if [ ! "${version}" ]; then
   printf '%s\n' \
index 45aef51ecb3a6d5c775ff7a6050af0abcef7c007..996a441fda3f7ac2e24148cfc151ed5a63e472e2 100644 (file)
@@ -233,18 +233,19 @@ along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
        EMACS_CHECK_MODULES([XFIXES], [$XFIXES_MODULES])
        if test $HAVE_XFIXES = no; then
         # Test old way in case pkg-config doesn't have it (older machines).
-        AC_CHECK_HEADER(X11/extensions/Xfixes.h,
-          [AC_CHECK_LIB(Xfixes, XFixesHideCursor, HAVE_XFIXES=yes)])
+        AC_CHECK_HEADER([X11/extensions/Xfixes.h],
+          [AC_CHECK_LIB([Xfixes], [XFixesHideCursor], [HAVE_XFIXES=yes])])
         if test $HAVE_XFIXES = yes; then
           XFIXES_LIBS=-lXfixes
         fi
        fi
        if test $HAVE_XFIXES = yes; then
-        AC_DEFINE(HAVE_XFIXES, 1, [Define to 1 if you have the Xfixes extension.])
+        AC_DEFINE([HAVE_XFIXES], [1],
+          [Define to 1 if you have the Xfixes extension.])
        fi
      fi
-     AC_SUBST(XFIXES_CFLAGS)
-     AC_SUBST(XFIXES_LIBS)
+     AC_SUBST([XFIXES_CFLAGS])
+     AC_SUBST([XFIXES_LIBS])
 
   Then, make sure to adjust CFLAGS and LIBES in src/Makefile.in and
   add the new XFIXES_CFLAGS and XFIXES_LIBS variables to
index e383b4bb6c416b6886d41a42da7fc62c04d814c6..7c609f3c2a710c3ba44ff5fa203dbc4bc74fa500 100644 (file)
 
 (ert-deftest autoconf-tests-current-defun-function-define ()
   (with-temp-buffer
-    (insert "AC_DEFINE(HAVE_RSVG, 1, [Define to 1 if using librsvg.])")
+    (insert "AC_DEFINE([HAVE_RSVG], [1], [Define to 1 if using librsvg.])")
     (goto-char (point-min))
     (should-not (autoconf-current-defun-function))
-    (forward-char 10)
+    (forward-char 11)
     (should (equal (autoconf-current-defun-function) "HAVE_RSVG"))))
 
 (ert-deftest autoconf-tests-current-defun-function-subst ()
   (with-temp-buffer
-    (insert "AC_SUBST(srcdir)")
+    (insert "AC_SUBST([srcdir])")
     (goto-char (point-min))
     (should-not (autoconf-current-defun-function))
-    (forward-char 9)
+    (forward-char 10)
     (should (equal (autoconf-current-defun-function) "srcdir"))))
 
 (ert-deftest autoconf-tests-autoconf-mode-comment-syntax ()