[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[FYI] {maint} regex: deprecate the obsolete macro AM_WITH_REGEX
From: |
Stefano Lattarini |
Subject: |
[FYI] {maint} regex: deprecate the obsolete macro AM_WITH_REGEX |
Date: |
Thu, 22 Dec 2011 21:37:31 +0100 |
This is a backport of commit v1.11-433-g37b0aee.
Today, practically nobody uses the GNU rx library, which, according
to its own website <http://www.gnu.org/software/rx/rx.html>, has
been "decommissioned". Consequently, the automake-provided macro
AM_WITH_REGEX is not used nor required anymore. Deprecate it, so
that it will be possible to safely remove it in the next major
automake version.
* m4/regex.m4 (AM_WITH_REGEX): Give a warning of the class
`obsolete' when this macro is used.
* doc/automake.texi (Public Macros): Move description of
`AM_WITH_REGEX' from here ...
(Obsolete Macros): ... to here, and declare it as obsolete
and "to be removed in a future version".
* tests/regex-obsolete.test: New test.
* tests/Makefile.am (TESTS): Add it.
* NEWS: Update.
See also:
<http://lists.gnu.org/archive/html/automake-patches/2010-11/msg00131.html>
---
ChangeLog | 22 ++++++++++++++++++++++
NEWS | 4 ++++
doc/automake.texi | 28 +++++++++++++++-------------
m4/regex.m4 | 13 ++++++++-----
tests/Makefile.am | 1 +
tests/regex-obsolete.test | 32 ++++++++++++++++++++++++++++++++
6 files changed, 82 insertions(+), 18 deletions(-)
create mode 100755 tests/regex-obsolete.test
diff --git a/ChangeLog b/ChangeLog
index 5646f79..6255aa0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,27 @@
2011-12-22 Stefano Lattarini <address@hidden>
+ regex: deprecate the obsolete macro AM_WITH_REGEX
+ This is a backport of commit v1.11-433-g37b0aee.
+ Today, practically nobody uses the GNU rx library, which, according
+ to its own website <http://www.gnu.org/software/rx/rx.html>, has
+ been "decommissioned". Consequently, the automake-provided macro
+ AM_WITH_REGEX is not used nor required anymore. Deprecate it, so
+ that it will be possible to safely remove it in the next major
+ automake version.
+ * m4/regex.m4 (AM_WITH_REGEX): Give a warning of the class
+ `obsolete' when this macro is used.
+ * doc/automake.texi (Public Macros): Move description of
+ `AM_WITH_REGEX' from here ...
+ (Obsolete Macros): ... to here, and declare it as obsolete
+ and "to be removed in a future version".
+ * tests/regex-obsolete.test: New test.
+ * tests/Makefile.am (TESTS): Add it.
+ * NEWS: Update.
+ See also:
+
<http://lists.gnu.org/archive/html/automake-patches/2010-11/msg00131.html>
+
+2011-12-22 Stefano Lattarini <address@hidden>
+
maint: distribute .xz tarballs, not .bz2 ones
Many GNU packages are moving towards xz-compressed tarballs, so
let's follow suit, by dropping the creation and distribution of
diff --git a/NEWS b/NEWS
index a162140..db448a9 100644
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,10 @@ New in 1.11.0a:
search path are looked up is probably going to be changed in the
next Automake release (1.12).
+ - The obsolescent AM_WITH_REGEX macro has been deprecated (since the
+ GNU rx library has been decommissioned), and will be removed in the
+ next major Automake release (1.12).
+
* Changes to aclocal:
- The `--acdir' option is deprecated. Now you should use the new options
diff --git a/doc/automake.texi b/doc/automake.texi
index a5f857d..ced1b72 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -4037,19 +4037,6 @@ Add support for the @uref{http://dmalloc.com/, Dmalloc
package}. If
the user runs @command{configure} with @option{--with-dmalloc}, then
define @code{WITH_DMALLOC} and add @option{-ldmalloc} to @code{LIBS}.
address@hidden AM_WITH_REGEX
address@hidden AM_WITH_REGEX
address@hidden WITH_REGEX
address@hidden --with-regex
address@hidden regex package
address@hidden rx package
-Adds @option{--with-regex} to the @command{configure} command line. If
-specified (the default), then the @samp{regex} regular expression
-library is used, @file{regex.o} is put into @code{LIBOBJS}, and
address@hidden is defined. If @option{--without-regex} is given, then
-the @code{rx} regular expression library is used, and @file{rx.o} is put
-into @code{LIBOBJS}.
-
@end table
@@ -4127,6 +4114,21 @@ system. If so, set the shell variable
@code{am_cv_sys_posix_termios} to
@samp{yes}. If not, set the variable to @samp{no}. This macro is obsolete,
you should use Autoconf's @code{AC_SYS_POSIX_TERMIOS} instead.
address@hidden AM_WITH_REGEX
address@hidden AM_WITH_REGEX
address@hidden WITH_REGEX
address@hidden --with-regex
address@hidden regex package
address@hidden rx package
+Adds @option{--with-regex} to the @command{configure} command line. If
+specified (the default), then the @samp{regex} regular expression
+library is used, @file{regex.o} is put into @code{LIBOBJS}, and
address@hidden is defined. If @option{--without-regex} is given, then
+the @samp{rx} regular expression library is used, and @file{rx.o} is put
+into @code{LIBOBJS}. This macro is obsolete now (since @samp{rx} doesn't
+seem to be maintained), and @emph{will be removed the next major version
+of Automake}. Consider using gnulib if you need regex functionality.
+
@end table
diff --git a/m4/regex.m4 b/m4/regex.m4
index c05bb38..9355840 100644
--- a/m4/regex.m4
+++ b/m4/regex.m4
@@ -1,18 +1,22 @@
## --------------------------------- ## -*- Autoconf -*-
## Check if --with-regex was given. ##
## --------------------------------- ##
-# Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+# 2010, 2011 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 7
+# serial 10
# AM_WITH_REGEX
# -------------
#
+# THIS MACRO IS OBSOLETE now, since rx doesn't seem to be maintained,
+# while regex is. This macro should be removed in the next major
+# automake version (1.12).
+#
# The idea is to distribute rx.[hc] and regex.[hc] together, for a
# while. The WITH_REGEX symbol is used to decide which of regex.h or
# rx.h should be included in the application. If `./configure
@@ -23,10 +27,9 @@
# package will use the system's rx which, on Linux at least, will
# result in a smaller executable file.
#
-# FIXME: This macro seems quite obsolete now since rx doesn't seem to
-# be maintained, while regex is.
AC_DEFUN([AM_WITH_REGEX],
[AC_PREREQ(2.50)dnl
+m4_warn([obsolete], [$0 is obsolete, since GNU rx is unmantained now])dnl
AC_LIBSOURCES([rx.h, rx.c, regex.c, regex.h])dnl
AC_MSG_CHECKING([which of GNU rx or gawk's regex is wanted])
AC_ARG_WITH([regex],
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 7097ff7..5ac0e48 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -737,6 +737,7 @@ remake-deleted-am-subdir.test \
remake-renamed-am.test \
pr8365-remake-timing.test \
regex.test \
+regex-obsolete.test \
req.test \
reqd.test \
reqd2.test \
diff --git a/tests/regex-obsolete.test b/tests/regex-obsolete.test
new file mode 100755
index 0000000..c283025
--- /dev/null
+++ b/tests/regex-obsolete.test
@@ -0,0 +1,32 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check tha the AM_WITH_REGEX macro is reported as obsolete.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AM_WITH_REGEX
+END
+
+$ACLOCAL
+$AUTOCONF -Werror -Wobsolete 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+grep '^configure\.in:.*AM_WITH_REGEX.*obsolete' stderr
+
+:
--
1.7.7.3
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [FYI] {maint} regex: deprecate the obsolete macro AM_WITH_REGEX,
Stefano Lattarini <=