From: Stefano Lattarini Date: Thu, 17 Mar 2011 22:18:36 +0000 (+0100) Subject: tests: add test about deprecated use of AC_INIT X-Git-Tag: ng-0.5a~225 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e57541cb67682c1eb6c8874a20a06b6aa9ef1b9d;p=thirdparty%2Fautomake.git tests: add test about deprecated use of AC_INIT * tests/deprecated-acinit.test: New test, check that automake and autoconf complain about an old-style AC_INIT call used with a new-style AM_AUTOMAKE_INIT call. * tests/Makefile.am (TESTS): Update. --- diff --git a/ChangeLog b/ChangeLog index 5b666d770..ee6c69c9b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2011-03-17 Stefano Lattarini + + tests: add test about deprecated use of AC_INIT + * tests/deprecated-acinit.test: New test, check that automake + and autoconf complain about an old-style AC_INIT call used with + a new-style AM_AUTOMAKE_INIT call. + * tests/Makefile.am (TESTS): Update. + 2011-03-04 Stefano Lattarini tests: fix bug (comments-in-var-defn.test + autoconf 2.62) diff --git a/tests/Makefile.am b/tests/Makefile.am index c0efdc37e..121d0a6a2 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -377,6 +377,7 @@ depend3.test \ depend4.test \ depend5.test \ depend6.test \ +deprecated-acinit.test \ destdir.test \ dirforbid.test \ dirlist.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 311b52402..1fe16e0ca 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -639,6 +639,7 @@ depend3.test \ depend4.test \ depend5.test \ depend6.test \ +deprecated-acinit.test \ destdir.test \ dirforbid.test \ dirlist.test \ diff --git a/tests/deprecated-acinit.test b/tests/deprecated-acinit.test new file mode 100755 index 000000000..a25d32cef --- /dev/null +++ b/tests/deprecated-acinit.test @@ -0,0 +1,52 @@ +#! /bin/sh +# Copyright (C) 2011 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 . + +# Check that automake and autoconf complain about an old-style AC_INIT +# call used with a new-style AM_AUTOMAKE_INIT call. + +. ./defs || Exit 1 + +: > Makefile.am + +# We'll need a proper aclocal.m4, but aclocal is expected to fail +# later, so get and store it now. +$ACLOCAL +mv aclocal.m4 aclocal-m4.sav + +errmsg='AC_INIT should be called with package and version argument' + +for ac_init in AC_INIT 'AC_INIT([Makefile.am])'; do + for am_init_automake in AM_INIT_AUTOMAKE 'AM_INIT_AUTOMAKE([1.11])'; do + rm -rf autom4te*.cache aclocal.m4 + unindent > configure.in <stderr && { cat stderr >&2; Exit 1; } + cat stderr >&2 + grep "^configure\\.in:.* $errmsg" stderr + cp aclocal-m4.sav aclocal.m4 + $AUTOCONF 2>stderr && { cat stderr >&2; Exit 1; } + cat stderr >&2 + grep "^configure\\.in:.* $errmsg" stderr + AUTOMAKE_fails + grep "^configure\\.in:.* $errmsg" stderr + done +done + +: