]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
AM_PROG_MKDIR_P: remove as obsolete, this time for good
authorStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 26 Oct 2012 12:00:35 +0000 (14:00 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 27 Oct 2012 12:13:32 +0000 (14:13 +0200)
This commit basically reverts v1.12.4-158-gdf23daf, re-instating
commit v1.12-20-g8a1c64f.

Support for the obsolescent 'AM_PROG_MKDIR_P' m4 macro has been
deprecated in the documentation and with runtime warnings since
Automake 1.12.1.  Still, when we released Automake 1.13, we had
to delay that macro's removal, since at the time the last released
version of GNU gettext still AC_REQUIRE's AM_PROG_MKDIR_P via its
'intl.m4' and 'po.m4' files, which are pulled into *many* projects.

But it's now time to remove AM_PROG_MKDIR_P once and for all.
Projects still needing to work with older gettext releases will
be able to do so by adding a definition like

   AC_DEFUN([AM_PROG_MKDIR_P], [AC_PROG_MKDIR_P([$@])])

to their 'acinclude.m4' file or to another local '*.m4' file.

* m4/mkdirp.m4: Delete.
* Makefile.am (dist_automake_ac_DATA): Remove it.
* automake.in (scan_autoconf_traces): Don't handle, nor warn about,
AM_PROG_MKDIR_P.
* doc/automake.texi (Obsolete Macros): Delete (it only spoke about
AM_PROG_MKDIR_P).
* t/gettext-macros.sh: Adjust.
* t/mkdirp-deprecation.sh: Delete.
* t/list-of-tests.mk: Don't list it.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Makefile.am
automake.in
doc/automake.texi
m4/mkdirp.m4 [deleted file]
t/gettext-macros.sh
t/list-of-tests.mk
t/mkdirp-deprecation.sh [deleted file]

index 0e959da8faa2e10fb38c5febf8a5b5ae3b6ac71a..e6297870a0a1076f07a9fd1cbddd6c0db82e1c21 100644 (file)
@@ -276,7 +276,6 @@ 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 \
index 32389f4ae00b81ef3c9111a9fefc448d9f5eba68..9c0c8b9cc2d19e46db5ce6d415b10ea1c860b627 100644 (file)
@@ -5128,7 +5128,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.14
                AM_CONDITIONAL => 2,
                _AM_EXTRA_RECURSIVE_TARGETS => 1,
                AM_GNU_GETTEXT => 0,
@@ -5284,14 +5283,6 @@ 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;
index 40d3fc0b7c66c849c420d72b9cd5c820c1303054..7058545ecf5da510c5f0d3c71d95408f070f8a80 100644 (file)
@@ -3880,7 +3880,6 @@ 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
 
@@ -4047,45 +4046,6 @@ define @code{WITH_DMALLOC} and add @option{-ldmalloc} to @code{LIBS}.
 @end table
 
 
-@node Obsolete Macros
-@subsection Obsolete Macros
-@cindex obsolete macros
-@cindex 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
-@file{configure.ac}, autoconf, The Autoconf Manual}).
-@emph{Do it NOW!}
-
-@table @code
-
-@item AM_PROG_MKDIR_P
-@acindex AM_PROG_MKDIR_P
-@cindex @code{mkdir -p}, macro check
-@vindex MKDIR_P
-@vindex 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
-@code{AC_PROG_MKDIR_P} (@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.
-
-@end table
-
-
 @node Private Macros
 @subsection Private Macros
 
diff --git a/m4/mkdirp.m4 b/m4/mkdirp.m4
deleted file mode 100644 (file)
index 93c12b0..0000000
+++ /dev/null
@@ -1,31 +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.
-
-# 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
-])
index f6424ae6ff25f8450d7bbf67d63224b9f12b1aac..cbc5565b3a37905fc1b45d425e9a359242530eef 100755 (executable)
@@ -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
   # 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,12 +75,12 @@ else
   fi
 fi
 
-cat >> get.sh <<'END'
+echo "ACLOCAL_PATH='$(pwd)/m4':\$ACLOCAL_PATH" >> get.sh
+echo "export ACLOCAL_PATH" >> get.sh
+
 # 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_PROG_MKDIR_P], [AC_PROG_MKDIR_P([$@])])' >> m4/mk-dirp.m4
 
 . ./get.sh
 
index 425e545d8760301cbc189a4f410f359cded9e618..f82fcbc85c99886b7314b8729ff3afc17cd5a23f 100644 (file)
@@ -683,7 +683,6 @@ 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/mkdirp-deprecation.sh b/t/mkdirp-deprecation.sh
deleted file mode 100755 (executable)
index 8482dea..0000000
+++ /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
-
-: