automake-patches
[Top][All Lists]
Advanced

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

[PATCH 2/2] AM_PROG_MKDIR_P: remove as obsolete


From: Stefano Lattarini
Subject: [PATCH 2/2] AM_PROG_MKDIR_P: remove as obsolete
Date: Sat, 28 Apr 2012 23:28:11 +0200

Support for the obsolescent 'AM_PROG_MKDIR_P' m4 macro (and its
output variable '$(mkdir_p)') has in the documentation and with
runtime warning since Automake 1.12.1.  It's now time to remove it.

* automake.in (scan_autoconf_traces): Remove special handling of
'AM_PROG_MKDIR_P'.
* m4/mkdirp.m4: Delete.
* Makefile.am (dist_automake_ac_DATA): Remove it.
* t/mkdirp-deprecation.sh: Delete.
* t/list-of-tests.mk: Remove it.
* doc/automake.texi: Remove references to the 'AM_MKDIR_P' m4 macro
and the '$(mkdir_p)' output variable.
* t/gettext-macros.sh: Ensure the gettext-requiring tests will
still see the now-removed 'AM_PROG_MKDIR_P' macro as an alias for
the 'AC_PROG_MKDIR_P' macro, since even recent versions of gettext
uses 'AM_PROG_MKDIR_P' in their '.m4' files.
* NEWS: Update.

Signed-off-by: Stefano Lattarini <address@hidden>
---
 Makefile.am             |    1 -
 NEWS                    |   11 +++++++++++
 automake.in             |    9 ---------
 doc/automake.texi       |   20 --------------------
 m4/mkdirp.m4            |   33 --------------------------------
 t/gettext-macros.sh     |   15 ++++++---------
 t/list-of-tests.mk      |    1 -
 t/mkdirp-deprecation.sh |   48 -----------------------------------------------
 8 files changed, 17 insertions(+), 121 deletions(-)
 delete mode 100644 m4/mkdirp.m4
 delete mode 100755 t/mkdirp-deprecation.sh

diff --git a/Makefile.am b/Makefile.am
index 37b44cf..f5b4e50 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -278,7 +278,6 @@ dist_automake_ac_DATA = \
   m4/make.m4 \
   m4/minuso.m4 \
   m4/missing.m4 \
-  m4/mkdirp.m4 \
   m4/obsol-gt.m4 \
   m4/obsol-lt.m4 \
   m4/obsolete.m4 \
diff --git a/NEWS b/NEWS
index b415be6..4e9d93b 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,14 @@
+New in 1.13:
+
+* Obsolete features removed:
+
+  - The automake-provided $(mkdir_p) make variable, @mkdir_p@ configure
+    time substitution and AM_PROG_MKDIR m4 macro have been removed.  They
+    had been obsolete since automake 1.10, and actively deprecated since
+    Automake 1.12.1.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
 New in 1.12.1:
 
 * Deprecated obsolescent features:
diff --git a/automake.in b/automake.in
index a993451..a454109 100644
--- a/automake.in
+++ b/automake.in
@@ -5205,7 +5205,6 @@ 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.13
                AM_CONDITIONAL => 2,
                AM_GNU_GETTEXT => 0,
                AM_GNU_GETTEXT_INTL_SUBDIR => 0,
@@ -5364,14 +5363,6 @@ sub scan_autoconf_traces ($)
 
          $seen_automake_version = 1;
        }
-      elsif ($macro eq 'AM_PROG_MKDIR_P') # FIXME: to be removed in 1.13
-       {
-         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 c21a5b7..d2cc17d 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -4101,26 +4101,6 @@ define @code{GWINSZ_IN_SYS_IOCTL}.  Otherwise 
@code{TIOCGWINSZ} can be
 found in @file{<termios.h>}.  This macro is obsolete, you should
 use Autoconf's @code{AC_HEADER_TIOCGWINSZ} instead.
 
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.
-
 @item AM_SYS_POSIX_TERMIOS
 @acindex AM_SYS_POSIX_TERMIOS
 @cindex POSIX termios headers
diff --git a/m4/mkdirp.m4 b/m4/mkdirp.m4
deleted file mode 100644
index d362b0b..0000000
--- a/m4/mkdirp.m4
+++ /dev/null
@@ -1,33 +0,0 @@
-##                                                          -*- 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.
-
-# serial 3
-
-# 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.13.
-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 416a8e5..e9a4739 100755
--- a/t/gettext-macros.sh
+++ b/t/gettext-macros.sh
@@ -61,10 +61,7 @@ AM_GNU_GETTEXT
 AM_GNU_GETTEXT_VERSION([$autopoint_version])
 END
 
-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
+if $am_gettextize_command --force && test -f m4/gettext.m4; then :; 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.
@@ -78,14 +75,14 @@ else
   fi
 fi
 
-. ./get.sh
+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.
-ACLOCAL="$ACLOCAL -Wno-obsolete"
-AUTOMAKE="$AUTOMAKE -Wno-obsolete"
-END
+echo 'AC_DEFUN([AM_MKDIR_P], [AC_MKDIR_P(address@hidden)])' >> m4/mk-dirp.m4
+
+. ./get.sh
 
 $ACLOCAL --force -I m4 || cat >> get.sh <<'END'
 # We need to use '-Wno-syntax', since we do not want our test suite
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index d692561..fef7165 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -675,7 +675,6 @@ t/missing4.sh \
 t/missing5.sh \
 t/missing6.sh \
 t/missing-auxfile-stops-makefiles-creation.sh \
-t/mkdirp-deprecation.sh \
 t/mkinstall.sh \
 t/mkinst2.sh \
 t/mkinst3.sh \
diff --git a/t/mkdirp-deprecation.sh b/t/mkdirp-deprecation.sh
deleted file mode 100755
index 7b8f67f..0000000
--- a/t/mkdirp-deprecation.sh
+++ /dev/null
@@ -1,48 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2012 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 that the AM_PROG_MKDIR_P macro is deprecated.  It will be
-# be removed in the next major Automake release.
-
-. ./defs || Exit 1
-
-echo AM_PROG_MKDIR_P >> configure.ac
-: > Makefile.am
-
-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
-}
-
-$ACLOCAL
-
-$AUTOCONF -Werror -Wobsolete 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep_err
-
-$AUTOCONF -Werror -Wno-obsolete
-
-#AUTOMAKE_fails
-#grep_err
-AUTOMAKE_fails --verbose -Wnone -Wobsolete
-grep_err
-
-$AUTOMAKE -Wno-obsolete
-
-:
-- 
1.7.9.5




reply via email to

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