From bb50ef0271243b5635f46492cd4354e14892f5be Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Thu, 13 Jan 2005 20:00:58 +0000 Subject: [PATCH] * m4/amversion.in (AM_AUTOMAKE_VERSION): Point users to AM_INIT_AUTOMAKE if the version passed is incorrect. * tests/version8.test: New file. * tests/Makefile.am (TESTS): Add version8.test. --- ChangeLog | 7 +++++++ m4/amversion.in | 9 ++++++++- m4/amversion.m4 | 9 ++++++++- tests/Makefile.am | 1 + tests/Makefile.in | 1 + tests/version8.test | 28 ++++++++++++++++++++++++++++ 6 files changed, 53 insertions(+), 2 deletions(-) create mode 100755 tests/version8.test diff --git a/ChangeLog b/ChangeLog index 228f1dd2..3332d245 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-01-13 Alexandre Duret-Lutz + + * m4/amversion.in (AM_AUTOMAKE_VERSION): Point users to + AM_INIT_AUTOMAKE if the version passed is incorrect. + * tests/version8.test: New file. + * tests/Makefile.am (TESTS): Add version8.test. + 2005-01-09 Alexandre Duret-Lutz * m4/amversion.in, m4/as.m4, m4/auxdir.m4, m4/ccstdc.m4, diff --git a/m4/amversion.in b/m4/amversion.in index 23bc00cf..155c80ba 100644 --- a/m4/amversion.in +++ b/m4/amversion.in @@ -10,7 +10,14 @@ # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. -AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="@APIVERSION@"]) +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='@APIVERSION@' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [@VERSION@], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- diff --git a/m4/amversion.m4 b/m4/amversion.m4 index 5358e50a..c70d5ea2 100644 --- a/m4/amversion.m4 +++ b/m4/amversion.m4 @@ -10,7 +10,14 @@ # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. -AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9a"]) +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.9a' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.9a], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- diff --git a/tests/Makefile.am b/tests/Makefile.am index 2f138273..5f3727e3 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -547,6 +547,7 @@ version3.test \ version4.test \ version6.test \ version7.test \ +version8.test \ vpath.test \ vtexi.test \ vtexi2.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index ed4c3cf8..06255b72 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -667,6 +667,7 @@ version3.test \ version4.test \ version6.test \ version7.test \ +version8.test \ vpath.test \ vtexi.test \ vtexi2.test \ diff --git a/tests/version8.test b/tests/version8.test new file mode 100755 index 00000000..ee07ac46 --- /dev/null +++ b/tests/version8.test @@ -0,0 +1,28 @@ +#! /bin/sh +# Copyright (C) 2005 Free Software Foundation, Inc. +# +# This file is part of GNU Automake. +# +# GNU Automake 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. +# +# GNU Automake 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 Automake; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +# Calling AM_AUTOMAKE_VERSION by hand is a bug. + +. ./defs || exit 1 + +set -e +echo 'AM_AUTOMAKE_VERSION([1.9])' >>configure.in +$ACLOCAL 2>stderr && exit 0 +$FGREP 'AM_INIT_AUTOMAKE([1.9])' stderr -- 2.43.5