Hi Diego. On 07/06/2012 12:10 AM, Diego Elio Pettenò wrote: > Il 05/07/2012 11:26, Stefano Lattarini ha scritto: >> How so? Removal of $(mkdir_p) is only planned for Automake 1.13, that is >> still unreleased. > > Ehm Stefano, that's definitely not the case, I've been hitting that > issue in Gentoo in many packages. > > https://bugs.gentoo.org/show_bug.cgi?id=automake-1.12 > > mkdir_p is gone in automake-1.12.1 for what we're concerned — I also > listed it in the 1.12 instead of "planned for 1.13" in my own guide > http://goo.gl/bda6l as I thought it was intentional. > Ouch, I can reproduce this :-/ The issue is that the call to AM_PROG_MKDIR_P in AM_INIT_AUTOMAKE has been substituted by a call to AC_PROG_MKDIR_P, which doesn't define $(mkdir_p). This was an unintended regression.
I will soon push the attached patches to take care of the problem. Note that they only re-introduce the $(mkdir_p) variable (because is very easy to do so), but not the @mkdir_p@ substitution. Anyone knows if this can create problems in practice? At this point, I plan to release Automake 1.12.2 in a week or so, so that the packages affected the $(mkdir_p) regression should be buildable again. Thanks, Stefano
>From 6742d313363aac2573164411cebf6424318c333f Mon Sep 17 00:00:00 2001 Message-Id: <6742d313363aac2573164411cebf6424318c333f.1341563027.git.stefano.lattar...@gmail.com> From: Stefano Lattarini <stefano.lattar...@gmail.com> Date: Fri, 6 Jul 2012 09:59:23 +0200 Subject: [PATCH 1/2] coverage: test that AM_PROG_MKDIR_P and $(mkdir_p) still works MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They are deprecated, but should continue to work in the 1.12.x release series. Report from Benoit Sigoure and Diego Elio Pattenò: <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> * t/mkdirp-deprecation.sh: Enhance. * t/mkdir_p.sh: New test, check that AM_INIT_AUTOMAKE still defines the $(mkdir_p) make variable. Currently xfailing. * t/list-of-tests.mk (handwritten_TESTS, XFAIL_TESTS): Add the new test. Signed-off-by: Stefano Lattarini <stefano.lattar...@gmail.com> --- t/list-of-tests.mk | 2 ++ t/mkdir_p.sh | 44 ++++++++++++++++++++++++++++++++++++++++++++ t/mkdirp-deprecation.sh | 31 +++++++++++++++++++++++++------ 3 files changed, 71 insertions(+), 6 deletions(-) create mode 100755 t/mkdir_p.sh diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk index 852b87a..61ac5c1 100644 --- a/t/list-of-tests.mk +++ b/t/list-of-tests.mk @@ -38,6 +38,7 @@ t/override-conditional-2.sh \ t/dist-pr109765.sh \ t/instdir-cond2.sh \ t/java-nobase.sh \ +t/mkdir_p.sh \ t/objext-pr10128.sh \ t/parallel-tests-many.sh \ t/pr8365-remake-timing.sh \ @@ -688,6 +689,7 @@ t/missing5.sh \ t/missing6.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 \ diff --git a/t/mkdir_p.sh b/t/mkdir_p.sh new file mode 100755 index 0000000..9f03cf5 --- /dev/null +++ b/t/mkdir_p.sh @@ -0,0 +1,44 @@ +#! /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/>. + +# AM_INIT_AUTOMAKE should still define $(mkdir_p), for backward +# compatibility. + +. ./defs || exit 1 + +echo AC_OUTPUT >> configure.ac + +cat > Makefile.am << 'END' +.PHONY: test +check-local: test +test: + $(mkdir_p) . dir1/dir2 +## $(mkdir_p) should continue to work even if we chdir around. + (mkdir x && cd x && $(mkdir_p) .. y/z ../foo) + test -d foo + test -d dir1/dir2 + test -d x/y/z +END + +$ACLOCAL +$AUTOCONF -Werror -Wobsolete +$AUTOMAKE + +./configure +$MAKE test +$MAKE distcheck + +: diff --git a/t/mkdirp-deprecation.sh b/t/mkdirp-deprecation.sh index 8482dea..9f41250 100755 --- a/t/mkdirp-deprecation.sh +++ b/t/mkdirp-deprecation.sh @@ -14,13 +14,28 @@ # 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. +# Check that the AM_PROG_MKDIR_P macro is deprecated; it will be +# be removed in the next major Automake release. But also check +# that it still works as expected in the current release series. . ./defs || exit 1 -echo AM_PROG_MKDIR_P >> configure.ac -: > Makefile.am +cat >> configure.ac << 'END' +AM_PROG_MKDIR_P +AC_OUTPUT +END + +cat > Makefile.am << 'END' +.PHONY: test +check-local: test +test: + $(mkdir_p) . dir1/dir2 +## $(mkdir_p) should continue to work even if we chdir around. + (mkdir x && cd x && $(mkdir_p) .. y/z ../foo) + test -d foo + test -d dir1/dir2 + test -d x/y/z +END grep_err () { @@ -38,11 +53,15 @@ grep_err $AUTOCONF -Werror -Wno-obsolete -#AUTOMAKE_fails -#grep_err +AUTOMAKE_fails +grep_err AUTOMAKE_fails --verbose -Wnone -Wobsolete grep_err $AUTOMAKE -Wno-obsolete +./configure +$MAKE test +$MAKE distcheck + : -- 1.7.9.5
>From 7cffda4be4e467d3de1b5abacfa1c80f49c8069f Mon Sep 17 00:00:00 2001 Message-Id: <7cffda4be4e467d3de1b5abacfa1c80f49c8069f.1341563027.git.stefano.lattar...@gmail.com> In-Reply-To: <6742d313363aac2573164411cebf6424318c333f.1341563027.git.stefano.lattar...@gmail.com> References: <6742d313363aac2573164411cebf6424318c333f.1341563027.git.stefano.lattar...@gmail.com> From: Stefano Lattarini <stefano.lattar...@gmail.com> Date: Fri, 6 Jul 2012 10:12:30 +0200 Subject: [PATCH 2/2] compat: automake should define $(mkdir_p), for backward compatibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit That has been unwittingly broken by commit 'v1.12-19-g7a1eb9f' of 2012-04-28, "AM_PROG_MKDIR_P: deprecate, to be removed in Automake 1.13". Report from Benoit Sigoure and Diego Elio Pattenò: <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> * lib/am/header-vars.am (mkdir_p): Define as an alias for $(MKDIR_P). * t/list-of-tests.mk (XFAIL_TESTS): Remove 't/mkdir_p.sh'. * NEWS: Update. Signed-off-by: Stefano Lattarini <stefano.lattar...@gmail.com> --- NEWS | 17 ++++++++++++++++- lib/am/header-vars.am | 5 +++++ t/list-of-tests.mk | 1 - 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index ee16961..d38554d 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,11 @@ New in 1.12.2: long-deprecated 'configure.in' name for the Autoconf input file. You are advised to use the recommended name 'configure.ac' instead. + - The long-obsolete (since automake 1.10) @mkdir_p@ configure-time + substitution and AM_PROG_MKDIR m4 macro will be removed in Automake + 1.13. The $(mkdir_p) should still remain available for the moment + though. + - Autoconf 2.65 or later will be required by the next major Automake version (1.13). Until now, Automake has required Autoconf version 2.62 or later. @@ -100,6 +105,16 @@ Bugs fixed in 1.12.2: compilation fails, it will still be rerun by further "make recheck" invocations. See automake bug#11791. +* Bugs introduced by 1.12.1: + + - Automake generated Makefiles define once again the $(mkdir_p) make + variable (simple ans an alias for $(MKDIR_P)), for better backward + compatibility. The '@mkdir_p@' substitution is however not enabled + by default anymore; anyone needing it should call the AM_PROG_MKDIR + m4 macro explicitly (beware that this macro has been deprecated since + the previous Automake release 1.12.1, and will be removed in Automake + 1.13). + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ New in 1.12.1: @@ -123,7 +138,7 @@ New in 1.12.1: - 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). + category. * Miscellaneous changes: diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am index ba4aa0b..c65e08c 100644 --- a/lib/am/header-vars.am +++ b/lib/am/header-vars.am @@ -77,6 +77,11 @@ NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> +mkdir_p = $(MKDIR_P) + ## dejagnu.am uses these variables. Some users might rely on them too. ?BUILD?build_triplet = @build@ ?HOST?host_triplet = @host@ diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk index 61ac5c1..73c4127 100644 --- a/t/list-of-tests.mk +++ b/t/list-of-tests.mk @@ -38,7 +38,6 @@ t/override-conditional-2.sh \ t/dist-pr109765.sh \ t/instdir-cond2.sh \ t/java-nobase.sh \ -t/mkdir_p.sh \ t/objext-pr10128.sh \ t/parallel-tests-many.sh \ t/pr8365-remake-timing.sh \ -- 1.7.9.5