[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: Autoconf internals
From: |
Akim Demaille |
Subject: |
FYI: Autoconf internals |
Date: |
10 Oct 2001 15:15:51 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Artificial Intelligence) |
Do not use m4_patsubst and m4_regexp, as they are reserved for future
use with ERE macros in M4 1.5. patsubst and regexp have always been
kept.
AC_PLAIN_SCRIPT is an internal detail, it has never been published.
BTW, note that AM_DIRNAME is typically something which will be moved
to Autoconf.
Index: ChangeLog
from Akim Demaille <address@hidden>
Do not use Autoconf internals.
* tests/dirname.test: Don't use AC_PLAIN_SCRIPT.
* m4/header.m4 (_AM_DIRNAME): Use regexp and patsubst, not
m4_regexp and m4_patsubst, since the latter are reserved for ERE
macro in GNU M4 1.5.
Index: m4/header.m4
===================================================================
RCS file: /cvs/automake/automake/m4/header.m4,v
retrieving revision 1.10
diff -u -u -r1.10 header.m4
--- m4/header.m4 2001/09/27 09:01:05 1.10
+++ m4/header.m4 2001/10/10 13:01:01
@@ -47,11 +47,11 @@
# -----------------
# Like AS_DIRNAME, only do it during macro expansion
AC_DEFUN([_AM_DIRNAME],
- [m4_if(m4_regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
- m4_if(m4_regexp([$1], [^//\([^/]\|$\)]), -1,
- m4_if(m4_regexp([$1], [^/.*]), -1,
+ [m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
+ m4_if(regexp([$1], [^//\([^/]\|$\)]), -1,
+ m4_if(regexp([$1], [^/.*]), -1,
[.],
- m4_patsubst([$1], [^\(/\).*], [\1])),
- m4_patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
- m4_patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
+ patsubst([$1], [^\(/\).*], [\1])),
+ patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
+ patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
]) # _AM_DIRNAME
Index: tests/dirname.test
===================================================================
RCS file: /cvs/automake/automake/tests/dirname.test,v
retrieving revision 1.3
diff -u -u -r1.3 dirname.test
--- tests/dirname.test 2001/07/25 15:27:36 1.3
+++ tests/dirname.test 2001/10/10 13:01:01
@@ -5,7 +5,7 @@
. $srcdir/defs || exit 1
cat > configure.in << 'END'
-AC_PLAIN_SCRIPT
+AC_INIT
echo "1 /a/path/to/a/file = _AM_DIRNAME([/a/path/to/a/file])"
echo "2 another/path/to/a/file = _AM_DIRNAME([another/path/to/a/file])"
echo "3 file = _AM_DIRNAME([file])"
@@ -19,12 +19,9 @@
$needs_autoconf
$ACLOCAL || exit 1
-$AUTOCONF || exit 1
+# fail gracefully if autoconf didn't support support our regexps anyhow
+$AUTOCONF || exit 77
-# fail gracefully if autoconf didn't support AC_PLAIN_SCRIPT, because it won't
-# support our regexps anyhow
-test -s configure || exit 77
-
$SHELL ./configure >got || exit 1
cat >wanted <<EOF
@@ -40,4 +37,3 @@
diff wanted got || exit 1
exit 0
-
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: Autoconf internals,
Akim Demaille <=