automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.12.3-17


From: Jim Meyering
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.12.3-175-gdf23daf
Date: Fri, 26 Oct 2012 11:05:29 +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=df23dafc30d54164035281aec1f6ce14d0f4b0fc

The branch, master has been updated
       via  df23dafc30d54164035281aec1f6ce14d0f4b0fc (commit)
      from  7411adcdad588acf2a167dd05e5a942fa752e90e (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 -----------------------------------------------------------------
commit df23dafc30d54164035281aec1f6ce14d0f4b0fc
Author: Jim Meyering <address@hidden>
Date:   Mon Oct 22 16:14:49 2012 +0200

    compat: reinstate AM_PROG_MKDIR_P, for gettext
    
    Do not remove AM_PROG_MKDIR_P just yet.
    
    gettext (latest from git) still AC_REQUIRE's AM_PROG_MKDIR_P via its
    intl.m4 and po.m4 files, which are pulled into *many* projects.
    
    When I try to build one of those projects (coreutils) using the latest
    from automake.git/master, I see this failure:
    
        $ aclocal -I m4
        configure.ac:477: warning: AM_PROG_MKDIR_P is m4_require'd \
          but not m4_defun'd
        m4/po.m4:23: AM_PO_SUBDIRS is expanded from...
        m4/gettext.m4:57: AM_GNU_GETTEXT is expanded from...
        configure.ac:477: the top level
    
    That is because AM_PROG_MKDIR_P was removed (via commit
    v1.12-20-g8a1c64f) in preparation for the next release of automake.
    
    * NEWS: Remove the paragraph that announced the removal of
    AM_PROG_MKDIR_P.
    * Makefile.am (dist_automake_ac_DATA): Add m4/mkdirp.m4.
    * m4/mkdirp.m4: Re-add file.
    * t/mkdirp-deprecation.sh: Likewise.
    * t/list-of-tests.mk: Add it.
    * automake.in: Restore removed code, and adjust comments, s/1.13/1.14/
    to reflect new plan for removal.
    * doc/automake.texi (Obsolete Macros): Restore the section, but
    now with only one entry: the one for AM_PROG_MKDIR_P.

-----------------------------------------------------------------------

Summary of changes:
 Makefile.am                                   |    1 +
 automake.in                                   |    9 +++++
 doc/automake.texi                             |   40 +++++++++++++++++++++++++
 m4/mkdirp.m4                                  |   31 +++++++++++++++++++
 t/gettext-macros.sh                           |   13 +++++---
 t/list-of-tests.mk                            |    1 +
 t/{dist-pr109765.sh => mkdirp-deprecation.sh} |   38 +++++++++++++----------
 7 files changed, 112 insertions(+), 21 deletions(-)
 create mode 100644 m4/mkdirp.m4
 copy t/{dist-pr109765.sh => mkdirp-deprecation.sh} (54%)

diff --git a/Makefile.am b/Makefile.am
index e629787..0e959da 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -276,6 +276,7 @@ dist_automake_ac_DATA = \
   m4/make.m4 \
   m4/minuso.m4 \
   m4/missing.m4 \
+  m4/mkdirp.m4 \
   m4/options.m4 \
   m4/protos.m4 \
   m4/python.m4 \
diff --git a/automake.in b/automake.in
index 9c0c8b9..32389f4 100644
--- a/automake.in
+++ b/automake.in
@@ -5128,6 +5128,7 @@ sub scan_autoconf_traces ($)
                AC_REQUIRE_AUX_FILE => 1,
                AC_SUBST_TRACE => 1,
                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_GNU_GETTEXT => 0,
@@ -5283,6 +5284,14 @@ sub scan_autoconf_traces ($)
 
          $seen_automake_version = 1;
        }
+      elsif ($macro eq 'AM_PROG_MKDIR_P') # FIXME: to be removed in 1.14
+       {
+         msg 'obsolete', $where, <<'EOF';
+The 'AM_PROG_MKDIR_P' macro is deprecated, and will soon be removed.
+You should use the Autoconf-provided 'AC_PROG_MKDIR_P' macro instead,
+and use '$(MKDIR_P)' instead of '$(mkdir_p)'in your Makefile.am files.
+EOF
+       }
       elsif ($macro eq 'AM_CONDITIONAL')
        {
          $configure_cond{$args[1]} = $where;
diff --git a/doc/automake.texi b/doc/automake.texi
index 7058545..40d3fc0 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -3880,6 +3880,7 @@ Automake ships with several Autoconf macros that you can 
use from your
 
 @menu
 * Public Macros::               Macros that you can use.
+* Obsolete Macros::             Macros that will soon be removed.
 * Private Macros::              Macros that you should not use.
 @end menu
 
@@ -4046,6 +4047,45 @@ define @code{WITH_DMALLOC} and add @option{-ldmalloc} to 
@code{LIBS}.
 @end table
 
 
address@hidden Obsolete Macros
address@hidden Obsolete Macros
address@hidden obsolete macros
address@hidden autoupdate
+
+Although using some of the following macros was required in past
+releases, you should not use any of them in new code.  @emph{All
+these macros will be removed in the next major Automake version};
+if you are still using them, running @command{autoupdate} should
+adjust your @file{configure.ac} automatically (@pxref{autoupdate
+Invocation, , Using @command{autoupdate} to Modernize
address@hidden, autoconf, The Autoconf Manual}).
address@hidden it NOW!}
+
address@hidden @code
+
address@hidden AM_PROG_MKDIR_P
address@hidden AM_PROG_MKDIR_P
address@hidden @code{mkdir -p}, macro check
address@hidden MKDIR_P
address@hidden mkdir_p
+
+From Automake 1.8 to 1.9.6 this macro used to define the output
+variable @code{mkdir_p} to one of @code{mkdir -p}, @code{install-sh
+-d}, or @code{mkinstalldirs}.
+
+Nowadays Autoconf provides a similar functionality with
address@hidden (@pxref{Particular Programs, , Particular
+Program Checks, autoconf, The Autoconf Manual}), however this defines
+the output variable @code{MKDIR_P} instead.  In case you are still
+using the @code{AM_PROG_MKDIR_P} macro in your @file{configure.ac},
+or its provided variable @code{$(mkdir_p)} in your @file{Makefile.am},
+you are advised to switch ASAP to the more modern Autoconf-provided
+interface instead; both the macro and the variable @emph{will be
+removed} in the next major Automake release.
+
address@hidden table
+
+
 @node Private Macros
 @subsection Private Macros
 
diff --git a/m4/mkdirp.m4 b/m4/mkdirp.m4
new file mode 100644
index 0000000..93c12b0
--- /dev/null
+++ b/m4/mkdirp.m4
@@ -0,0 +1,31 @@
+##                                                          -*- Autoconf -*-
+# Copyright (C) 2003-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.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for 'mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl FIXME to be removed in Automake 1.14.
+AC_DIAGNOSE([obsolete],
+[$0: this macro is deprecated, and will soon be removed.
+You should use the Autoconf-provided 'AC][_PROG_MKDIR_P' macro instead,
+and use '$(MKDIR_P)' instead of '$(mkdir_p)'in your Makefile.am files.])
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+  [[\\/$]]* | ?:[[\\/]]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
diff --git a/t/gettext-macros.sh b/t/gettext-macros.sh
index cbc5565..f6424ae 100755
--- a/t/gettext-macros.sh
+++ b/t/gettext-macros.sh
@@ -61,7 +61,10 @@ AM_GNU_GETTEXT
 AM_GNU_GETTEXT_VERSION([$autopoint_version])
 END
 
-if ! ($am_gettextize_command --force && test -f m4/gettext.m4); then
+if $am_gettextize_command --force && test -f m4/gettext.m4; then
+  echo "ACLOCAL_PATH='$(pwd)/m4':\$ACLOCAL_PATH" >> get.sh
+  echo "export ACLOCAL_PATH" >> get.sh
+else
   # Older versions of gettext might not have a gettextize program
   # available, but this doesn't mean the user hasn't made the gettext
   # macros available, e.g., by properly setting ACLOCAL_PATH.
@@ -75,12 +78,12 @@ if ! ($am_gettextize_command --force && test -f 
m4/gettext.m4); then
   fi
 fi
 
-echo "ACLOCAL_PATH='$(pwd)/m4':\$ACLOCAL_PATH" >> get.sh
-echo "export ACLOCAL_PATH" >> get.sh
-
+cat >> get.sh <<'END'
 # Even recent versions of gettext used the now-obsolete 'AM_PROG_MKDIR_P'
 # m4 macro.  So we need the following to avoid spurious errors.
-echo 'AC_DEFUN([AM_PROG_MKDIR_P], [AC_PROG_MKDIR_P(address@hidden)])' >> 
m4/mk-dirp.m4
+ACLOCAL="$ACLOCAL -Wno-obsolete"
+AUTOMAKE="$AUTOMAKE -Wno-obsolete"
+END
 
 . ./get.sh
 
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index c3b8cf4..72f737b 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -683,6 +683,7 @@ t/missing3.sh \
 t/am-missing-prog.sh \
 t/missing-auxfile-stops-makefiles-creation.sh \
 t/mkdir_p.sh \
+t/mkdirp-deprecation.sh \
 t/mkinstall.sh \
 t/mkinst2.sh \
 t/mkinst3.sh \
diff --git a/t/dist-pr109765.sh b/t/mkdirp-deprecation.sh
similarity index 54%
copy from t/dist-pr109765.sh
copy to t/mkdirp-deprecation.sh
index 50085a6..8482dea 100755
--- a/t/dist-pr109765.sh
+++ b/t/mkdirp-deprecation.sh
@@ -14,29 +14,35 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Expose automake bug#10975: when several "dist-*" targets are invoked
-# on the make command line, the first one ends up removing the distdir,
-# so that the latter ones fail.
+# Check that the AM_PROG_MKDIR_P macro is deprecated.  It will be
+# be removed in the next major Automake release.
 
-required=bzip2
 . ./defs || exit 1
 
-echo AC_OUTPUT >> configure.ac
+echo AM_PROG_MKDIR_P >> configure.ac
 : > Makefile.am
 
-$ACLOCAL  || fatal_ "aclocal failed"
-$AUTOCONF || fatal_ "autoconf failed"
-$AUTOMAKE || fatal_ "automake failed"
+grep_err ()
+{
+  loc='^configure.ac:4:'
+  grep "$loc.*AM_PROG_MKDIR_P.*deprecated" stderr
+  grep "$loc.* use .*AC_PROG_MKDIR_P" stderr
+  grep "$loc.* use '\$(MKDIR_P)' instead of '\$(mkdir_p)'.*Makefile" stderr
+}
 
-./configure
-$MAKE dist-gzip dist-bzip2
+$ACLOCAL
 
-gzip -dc $distdir.tar.gz | tar tf - > one || { cat one; exit 1; }
-cat one
-bzip2 -dc $distdir.tar.gz | tar tf - > two || { cat two; exit 1; }
-cat two
+$AUTOCONF -Werror -Wobsolete 2>stderr && { cat stderr >&2; exit 1; }
+cat stderr >&2
+grep_err
 
-$FGREP "$distdir/Makefile.am" one
-diff one two
+$AUTOCONF -Werror -Wno-obsolete
+
+#AUTOMAKE_fails
+#grep_err
+AUTOMAKE_fails --verbose -Wnone -Wobsolete
+grep_err
+
+$AUTOMAKE -Wno-obsolete
 
 :


hooks/post-receive
-- 
GNU Automake



reply via email to

[Prev in Thread] Current Thread [Next in Thread]