[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.12.4-22
From: |
Stefano Lattarini |
Subject: |
[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.12.4-227-g92bd5d2 |
Date: |
Thu, 15 Nov 2012 15:56:18 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".
http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=92bd5d25c2ba94b8664202990d0152e68d440632
The branch, master has been updated
via 92bd5d25c2ba94b8664202990d0152e68d440632 (commit)
via 60fe7d3d124f9b3f3b580432f44acbc6f4bcd7b7 (commit)
via 26432142c64229f6c11c833aa8019e672593d2c1 (commit)
via 33c836b2ad72c1384ba0a8983989322b88e6bfa2 (commit)
via f0dd2dee9e4cebdc2ef1c5a9875728185bfd60eb (commit)
via 326cd5f0797b32616a7a6caaa854b04c4ebd53f7 (commit)
from b7c507eadfa7b9ef40ba433dee0d231432ab7c39 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
Makefile.am | 3 ++
aclocal.in | 58 +++++++++++++++++++++++++------
automake.in | 9 +++--
doc/automake.texi | 6 ++--
m4/extra-recurs.m4 | 3 +-
m4/internal/ac-config-macro-dirs.m4 | 15 ++++++++
t/aclocal-acdir.sh | 3 ++
t/aclocal-macrodir.tap | 46 +++++++++++++++----------
t/aclocal-macrodirs.tap | 64 ++++++++++++++++++----------------
t/subpkg-macrodir.sh | 6 ---
10 files changed, 139 insertions(+), 74 deletions(-)
create mode 100644 m4/internal/ac-config-macro-dirs.m4
diff --git a/Makefile.am b/Makefile.am
index 065500f..8e27cd7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -289,6 +289,9 @@ dist_automake_ac_DATA = \
m4/upc.m4 \
m4/vala.m4
+automake_internal_acdir = $(automake_acdir)/internal
+dist_automake_internal_ac_DATA = m4/internal/ac-config-macro-dirs.m4
+
dist_system_ac_DATA = m4/acdir/README
# We build amversion.m4 here, instead of from config.status,
diff --git a/aclocal.in b/aclocal.in
index d4e7000..76b556a 100644
--- a/aclocal.in
+++ b/aclocal.in
@@ -45,6 +45,16 @@ use File::Path ();
# Some globals.
+# Support AC_CONFIG_MACRO_DIRS also with older autoconf.
+# FIXME: To be removed in Automake 1.14, once we can assume autoconf
+# 2.70 or later.
+# FIXME: keep in sync with 'internal/ac-config-macro-dirs.m4'.
+my $ac_config_macro_dirs_fallback =
+ 'm4_ifndef([AC_CONFIG_MACRO_DIRS], [' .
+ 'm4_defun([_AM_CONFIG_MACRO_DIRS], [])' .
+ 'm4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])' .
+ '])';
+
# We do not operate in threaded mode.
$perl_threads = 0;
@@ -716,16 +726,27 @@ sub trace_used_macros ()
my %files = map { $map{$_} => 1 } keys %macro_seen;
%files = strip_redundant_includes %files;
- my $traces = ($ENV{AUTOM4TE} || '@am_AUTOM4TE@');
- $traces .= " --language Autoconf-without-aclocal-m4 ";
# When AC_CONFIG_MACRO_DIRS is used, avoid possible spurious warnings
# from autom4te about macros being "m4_require'd but not m4_defun'd";
# for more background, see:
# http://lists.gnu.org/archive/html/autoconf-patches/2012-11/msg00004.html
# as well as autoconf commit 'v2.69-44-g1ed0548', "warn: allow aclocal
# to silence m4_require warnings".
- $traces = "echo 'm4_define([m4_require_silent_probe], [-])' | " .
- "$traces - ";
+ my $early_m4_code .= "m4_define([m4_require_silent_probe], [-])";
+
+ my $traces = ($ENV{AUTOM4TE} || '@am_AUTOM4TE@');
+ $traces .= " --language Autoconf-without-aclocal-m4 ";
+ $traces = "echo '$early_m4_code' | $traces - ";
+
+ # Support AC_CONFIG_MACRO_DIRS also with older autoconf.
+ # Note that we can't use '$ac_config_macro_dirs_fallback' here, because
+ # a bug in option parsing code of autom4te 2.68 and earlier will cause
+ # it to read standard input last, even if the "-" argument is specified
+ # early.
+ # FIXME: To be removed in Automake 1.14, once we can assume autoconf
+ # 2.70 or later.
+ $traces .= "$automake_includes[0]/internal/ac-config-macro-dirs.m4 ";
+
# All candidate files.
$traces .= join (' ',
(map { "'$_'" }
@@ -738,11 +759,13 @@ sub trace_used_macros ()
'AC_DEFUN_ONCE',
'AU_DEFUN',
'_AM_AUTOCONF_VERSION',
- # FIXME: We still need to trace AC_CONFIG_MACRO_DIR
- # for compatibility with older autoconf. Remove this
- # when we can assume Autoconf 2.70 or later.
+ 'AC_CONFIG_MACRO_DIR_TRACE',
+ # FIXME: Tracing the next two macros is a hack for
+ # compatibility with older autoconf. Remove this in
+ # Automake 1.14, when we can assume Autoconf 2.70 or
+ # later.
'AC_CONFIG_MACRO_DIR',
- 'AC_CONFIG_MACRO_DIR_TRACE')),
+ '_AM_CONFIG_MACRO_DIRS')),
# Do not trace $1 for all other macros as we do
# not need it and it might contains harmful
# characters (like newlines).
@@ -776,18 +799,28 @@ sub trace_used_macros ()
{
push @ac_config_macro_dirs, $arg1;
}
- # FIXME: We still need to trace AC_CONFIG_MACRO_DIR
- # for compatibility with older autoconf. Remove this
- # when we can assume Autoconf 2.70 or later.
- elsif ($macro eq 'AC_CONFIG_MACRO_DIR')
+ # FIXME: We still need to trace AC_CONFIG_MACRO_DIR
+ # for compatibility with older autoconf. Remove this
+ # once we can assume Autoconf 2.70 or later.
+ elsif ($macro eq 'AC_CONFIG_MACRO_DIR')
{
@ac_config_macro_dirs = ($arg1);
}
+ # FIXME:This is an hack for compatibility with older autoconf.
+ # Remove this once we can assume Autoconf 2.70 or later.
+ elsif ($macro eq '_AM_CONFIG_MACRO_DIRS')
+ {
+ # Empty leading/trailing fields might be produced by split,
+ # hence the grep is really needed.
+ push @ac_config_macro_dirs, grep (/./, (split /\s+/, $arg1));
+ }
}
# FIXME: in Autoconf >= 2.70, AC_CONFIG_MACRO_DIR calls
# AC_CONFIG_MACRO_DIR_TRACE behind the scenes, which could
# leave unwanted duplicates in @ac_config_macro_dirs.
+ # Remove this in Automake 1.14, when we'll stop tracing
+ # AC_CONFIG_MACRO_DIR explicitly.
@ac_config_macro_dirs = uniq @ac_config_macro_dirs;
$tracefh->close;
@@ -915,6 +948,7 @@ $output";
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
+$ac_config_macro_dirs_fallback
$output";
# We try not to update $output_file unless necessary, because
diff --git a/automake.in b/automake.in
index 32389f4..3a401d8 100644
--- a/automake.in
+++ b/automake.in
@@ -5130,7 +5130,7 @@ sub scan_autoconf_traces ($)
AM_AUTOMAKE_VERSION => 1,
AM_PROG_MKDIR_P => 0, # FIXME: to be removed in 1.14
AM_CONDITIONAL => 2,
- _AM_EXTRA_RECURSIVE_TARGETS => 1,
+ AM_EXTRA_RECURSIVE_TARGETS => 1,
AM_GNU_GETTEXT => 0,
AM_GNU_GETTEXT_INTL_SUBDIR => 0,
AM_INIT_AUTOMAKE => 0,
@@ -5296,9 +5296,12 @@ EOF
{
$configure_cond{$args[1]} = $where;
}
- elsif ($macro eq '_AM_EXTRA_RECURSIVE_TARGETS')
+ elsif ($macro eq 'AM_EXTRA_RECURSIVE_TARGETS')
{
- push @extra_recursive_targets, split (' ', $args[1]);
+ # Empty leading/trailing fields might be produced by split,
+ # hence the grep is really needed.
+ push @extra_recursive_targets,
+ grep (/./, (split /\s+/, $args[1]));
}
elsif ($macro eq 'AM_GNU_GETTEXT')
{
diff --git a/doc/automake.texi b/doc/automake.texi
index 0118a21..c0b1abf 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -3605,10 +3605,10 @@ will be almost impossible to share macros between
packages.
The second possibility, which we do recommend, is to write each macro
in its own file and gather all these files in a directory. This
directory is usually called @file{m4/}. Then it's enough to update
address@hidden by adding a proper call to @code{AC_CONFIG_MACRO_DIR}:
address@hidden by adding a proper call to @code{AC_CONFIG_MACRO_DIRS}:
@example
-AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_MACRO_DIRS([m4])
@end example
@command{aclocal} will then take care of automatically adding @file{m4/}
@@ -3731,7 +3731,7 @@ MyPackage uses an @file{m4/} directory to store local
macros as
explained in @ref{Local Macros}, and has
@example
-AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_MACRO_DIRS([m4])
@end example
@noindent
diff --git a/m4/extra-recurs.m4 b/m4/extra-recurs.m4
index 7b7ecc7..68d575a 100644
--- a/m4/extra-recurs.m4
+++ b/m4/extra-recurs.m4
@@ -12,6 +12,5 @@
# be traced by Automake, which will ensure that a proper definition of
# user-defined recursive targets (and associated rules) is propagated
# into all the generated Makefiles.
-AC_DEFUN([AM_EXTRA_RECURSIVE_TARGETS], [_$0(m4_flatten([$1]))])
# TODO: We should really reject non-literal arguments here...
-m4_define([_AM_EXTRA_RECURSIVE_TARGETS], [])
+AC_DEFUN([AM_EXTRA_RECURSIVE_TARGETS], [])
diff --git a/m4/internal/ac-config-macro-dirs.m4
b/m4/internal/ac-config-macro-dirs.m4
new file mode 100644
index 0000000..530e655
--- /dev/null
+++ b/m4/internal/ac-config-macro-dirs.m4
@@ -0,0 +1,15 @@
+# Support AC_CONFIG_MACRO_DIRS with older autoconf. -*- Autoconf -*-
+# FIXME: To be removed in Automake 1.14, once we can assume autoconf
+# 2.70 or later.
+# FIXME: keep in sync with the contents of the variable
+# '$ac_config_macro_dirs_fallback' in aclocal.in.
+
+# Copyright (C) 2012 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.
+
+m4_ifndef([AC_CONFIG_MACRO_DIRS],
+[m4_defun([_AM_CONFIG_MACRO_DIRS],[])]dnl
+[m4_defun([AC_CONFIG_MACRO_DIRS],[_AM_CONFIG_MACRO_DIRS($@)])])
diff --git a/t/aclocal-acdir.sh b/t/aclocal-acdir.sh
index 59182bb..944604b 100755
--- a/t/aclocal-acdir.sh
+++ b/t/aclocal-acdir.sh
@@ -21,6 +21,9 @@
. test-init.sh
mkdir am sys
+# FIXME: remove in Automake 1.14.
+mkdir am/internal
+: > am/internal/ac-config-macro-dirs.m4
cat >> configure.ac <<'END'
MY_MACRO
diff --git a/t/aclocal-macrodir.tap b/t/aclocal-macrodir.tap
index 63ede71..2d3b0d6 100755
--- a/t/aclocal-macrodir.tap
+++ b/t/aclocal-macrodir.tap
@@ -173,29 +173,39 @@ test_end
#---------------------------------------------------------------------------
-test_begin "AC_CONFIG_MACRO_DIR interaction with AC_REQUIRE"
+# Avoid spurious failures with pre-2.70 autoconf.
+# FIXME: remove this in automake 1.14, once we require Autoconf 2.70.
+if echo 'AC_INIT AC_CONFIG_MACRO_DIRS' | $AUTOCONF -o/dev/null -; then
-cat > configure.ac <<'END'
-AC_INIT([req], [1.0])
-AC_CONFIG_MACRO_DIR([macro-dir])
-AC_DEFUN([MY_FOO], [AC_REQUIRE([MY_BAR])])
-MY_FOO
+ test_begin "AC_CONFIG_MACRO_DIR interaction with AC_REQUIRE"
+
+ unindent > configure.ac <<'END'
+ AC_INIT([req], [1.0])
+ AC_CONFIG_MACRO_DIR([macro-dir])
+ AC_DEFUN([MY_FOO], [AC_REQUIRE([MY_BAR])])
+ MY_FOO
END
-mkdir macro-dir
-echo 'AC_DEFUN([MY_BAR], [//my//bar//])' > macro-dir/x.m4
+ mkdir macro-dir
+ echo 'AC_DEFUN([MY_BAR], [//my//bar//])' > macro-dir/x.m4
-st=0; $ACLOCAL 2>stderr || st=$?
-cat stderr >&2
+ st=0; $ACLOCAL 2>stderr || st=$?
+ cat stderr >&2
-test $st -eq 0 \
- && test ! -s stderr \
- && $FGREP 'm4_include([macro-dir/x.m4])' aclocal.m4 \
- && $AUTOCONF \
- && not $EGREP 'MY_(FOO|BAR)' configure \
- && $FGREP '//my//bar//' configure \
- || r='not ok'
+ test $st -eq 0 \
+ && test ! -s stderr \
+ && $FGREP 'm4_include([macro-dir/x.m4])' aclocal.m4 \
+ && $AUTOCONF \
+ && not $EGREP 'MY_(FOO|BAR)' configure \
+ && $FGREP '//my//bar//' configure \
+ || r='not ok'
-test_end
+ test_end
+
+else
+
+ skip_ -r "autoconf is too old (AC_CONFIG_MACRO_DIRS not defined)"
+
+fi
:
diff --git a/t/aclocal-macrodirs.tap b/t/aclocal-macrodirs.tap
index 28abb7c..10256fd 100755
--- a/t/aclocal-macrodirs.tap
+++ b/t/aclocal-macrodirs.tap
@@ -20,12 +20,6 @@
am_create_testdir=empty
. test-init.sh
-{ $AUTOCONF -o /dev/null - <<END
- AC_INIT([x], [0])
- AC_CONFIG_MACRO_DIRS([.])
-END
-} || skip_all_ "autoconf doesn't define the AC_CONFIG_MACRO_DIRS macro"
-
plan_ 14
ocwd=$(pwd) || fatal_ "getting current working directory"
@@ -378,35 +372,45 @@ test_end
#---------------------------------------------------------------------------
-test_begin "AC_CONFIG_MACRO_DIRS interaction with AC_REQUIRE"
+# Avoid spurious failures with pre-2.70 autoconf.
+# FIXME: remove this in automake 1.14, once we require Autoconf 2.70.
+if echo 'AC_INIT AC_CONFIG_MACRO_DIRS' | $AUTOCONF -o/dev/null -; then
-cat > configure.ac <<'END'
-AC_INIT([req], [1.0])
-AC_CONFIG_MACRO_DIRS([m1 m2])
-AC_DEFUN([MY_FOO], [
- AC_REQUIRE([MY_BAR])
- AC_REQUIRE([MY_BAZ])
-])
-MY_FOO
+ test_begin "AC_CONFIG_MACRO_DIRS interaction with AC_REQUIRE"
+
+ unindent > configure.ac <<'END'
+ AC_INIT([req], [1.0])
+ AC_CONFIG_MACRO_DIRS([m1 m2])
+ AC_DEFUN([MY_FOO], [
+ AC_REQUIRE([MY_BAR])
+ AC_REQUIRE([MY_BAZ])
+ ])
+ MY_FOO
END
-mkdir m1 m2
-echo 'AC_DEFUN([MY_BAR], [^^my^^bar^^])' > m1/x.m4
-echo 'AC_DEFUN([MY_BAZ], [~~my~~baz~~])' > m2/x.m4
+ mkdir m1 m2
+ echo 'AC_DEFUN([MY_BAR], [^^my^^bar^^])' > m1/x.m4
+ echo 'AC_DEFUN([MY_BAZ], [~~my~~baz~~])' > m2/x.m4
-st=0; $ACLOCAL 2>stderr || st=$?
-cat stderr >&2
+ st=0; $ACLOCAL 2>stderr || st=$?
+ cat stderr >&2
-test $st -eq 0 \
- && test ! -s stderr \
- && $FGREP 'm4_include([m1/x.m4])' aclocal.m4 \
- && $FGREP 'm4_include([m2/x.m4])' aclocal.m4 \
- && $AUTOCONF \
- && not $EGREP 'MY_(FOO|BAR|BAZ)' configure \
- && $FGREP '^^my^^bar^^' configure \
- && $FGREP '~~my~~baz~~' configure \
- || r='not ok'
+ test $st -eq 0 \
+ && test ! -s stderr \
+ && $FGREP 'm4_include([m1/x.m4])' aclocal.m4 \
+ && $FGREP 'm4_include([m2/x.m4])' aclocal.m4 \
+ && $AUTOCONF \
+ && not $EGREP 'MY_(FOO|BAR|BAZ)' configure \
+ && $FGREP '^^my^^bar^^' configure \
+ && $FGREP '~~my~~baz~~' configure \
+ || r='not ok'
-test_end
+ test_end
+
+else
+
+ skip_ -r "autoconf is too old (AC_CONFIG_MACRO_DIRS not defined)"
+
+fi
:
diff --git a/t/subpkg-macrodir.sh b/t/subpkg-macrodir.sh
index 275af0d..a16f42b 100755
--- a/t/subpkg-macrodir.sh
+++ b/t/subpkg-macrodir.sh
@@ -19,12 +19,6 @@
. test-init.sh
-{ $AUTOCONF -o /dev/null - <<END
- AC_INIT([x], [0])
- AC_CONFIG_MACRO_DIRS([.])
-END
-} || skip_ "autoconf doesn't define the AC_CONFIG_MACRO_DIRS macro"
-
cat > configure.ac <<'END'
AC_INIT([super], [1.0])
AM_INIT_AUTOMAKE
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.12.4-227-g92bd5d2,
Stefano Lattarini <=