+New in 1.12.1:
+
+* Deprecated obsolescent features:
+
+ - The long-obsolete (since 1.10) automake-provided $(mkdir_p) make
+ variable, @mkdir_p@ configure-time substitution and AM_PROG_MKDIR
+ m4 macro are deprecated, eliciting a warning in the 'obsolete'
+ category. They will be removed in the next major version (1.13).
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
New in 1.12:
* WARNING: Future backward-incompatibilities!
AM_INIT_AUTOMAKE macro will be deprecated in the next minor version
of Automake (1.12.1) and removed in the next major version (1.13).
- - The long-obsolete (since 1.10) automake-provided $(mkdir_p) make
- variable, @mkdir_p@ substitution and AM_PROG_MKDIR m4 macro will
- all be deprecated in the next minor version of Automake (1.12.1)
- and removed in the next major version (1.13).
-
- The '--acdir' option of aclocal is deprecated, and will probably
be removed in the next major Automake release (1.13). You should
use the options '--automake-acdir' and '--system-acdir' instead
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,
$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;
AM_MISSING_PROG([MAKEINFO], [makeinfo])
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
-AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
AC_REQUIRE([AC_PROG_AWK])dnl
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 2
+# serial 3
# AM_PROG_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.
sc_tests_PATH_SEPARATOR \
sc_tests_logs_duplicate_prefixes \
sc_tests_makefile_variable_order \
-sc_mkdir_p \
sc_perl_at_substs \
sc_unquoted_DESTDIR \
sc_tabs_in_texi \
exit 1; \
fi
-sc_mkdir_p:
- @if grep 'mkdir_p' $(srcdir)/automake.in $(ams) $(xtests); then \
- echo 'Do not use mkdir_p in the above files, use MKDIR_P.' 1>&2; \
- exit 1; \
- fi
-
## Try to make sure all @...@ substitutions are covered by our
## substitution rule.
sc_perl_at_substs:
. ./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
+
$ACLOCAL --force -I m4 || cat >> get.sh <<'END'
# We need to use '-Wno-syntax', since we do not want our test suite
# to fail merely because some third-party '.m4' file is underquoted.
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 \
--- /dev/null
+#! /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
+
+: