From: Stefano Lattarini Date: Sun, 28 Aug 2011 13:52:11 +0000 (+0200) Subject: ansi: reject attempts to use automatic de-ANSI-fication support X-Git-Tag: v1.11b~288^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=16f67b47492d97cac0866b02304b08fdde4d069e;p=platform%2Fupstream%2Fautomake.git ansi: reject attempts to use automatic de-ANSI-fication support * tests/protos.m4 (AM_C_PROTOTYPES): Error out whenever called. * lib/Automake/Options.pm (_process_option_list ): Error out with a proper error message when the `ansi2knr' option is used. Related updates to comments. * tests/depacl2.test: Update. * tests/ansi2knr-no-more.test: New test. * tests/Makefile.am (TESTS): Add it. * NEWS: Update. --- diff --git a/ChangeLog b/ChangeLog index f9a509f..0ea7ddf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,17 @@ 2011-08-28 Stefano Lattarini + ansi: reject attempts to use automatic de-ANSI-fication support + * tests/protos.m4 (AM_C_PROTOTYPES): Error out whenever called. + * lib/Automake/Options.pm (_process_option_list ): Error out + with a proper error message when the `ansi2knr' option is used. + Related updates to comments. + * tests/depacl2.test: Update. + * tests/ansi2knr-no-more.test: New test. + * tests/Makefile.am (TESTS): Add it. + * NEWS: Update. + +2011-08-28 Stefano Lattarini + tests: remove tests about obsolete de-ANSI-fication support * tests/ansi.test: Delete. * tests/ansi10.test: Likewise. diff --git a/NEWS b/NEWS index 50e702b..9e391c9 100644 --- a/NEWS +++ b/NEWS @@ -11,11 +11,6 @@ New in 1.11a: - New `cscope' target to build a cscope database for the source tree. -* WARNING: Future backward-incompatibilities! - - - The Automake support for automatic de-ANSI-fication will be removed in - the next major Automake release (1.12). - * Miscellaneous changes: - The `dist' and `dist-all' targets now can run compressors in parallel. @@ -57,6 +52,8 @@ New in 1.11a: user; still, the old Makefile.am files that used to define it should still continue to work as before. + - Support for automatic de-ANSI-fication has been removed. + Bugs fixed in 1.11a: - Lots of minor bugfixes. diff --git a/lib/Automake/Options.pm b/lib/Automake/Options.pm index e8765fd..6836157 100644 --- a/lib/Automake/Options.pm +++ b/lib/Automake/Options.pm @@ -71,8 +71,7 @@ Fs. =cut -# Values are the Automake::Location of the definition, except -# for 'ansi2knr' whose value is a pair [filename, Location]. +# Values are the Automake::Location of the definition. use vars '%_options'; # From AUTOMAKE_OPTIONS use vars '%_global_options'; # from AM_INIT_AUTOMAKE or the command line. @@ -269,14 +268,9 @@ sub _process_option_list (\%@) } elsif (/^(.*\/)?ansi2knr$/) { - # This feature is deprecated, will be removed in the next - # Automake major release. - msg 'obsolete', $where, - "automatic de-ANSI-fication support is deprecated\n"; - # An option like "../lib/ansi2knr" is allowed. With no - # path prefix, we assume the required programs are in this - # directory. We save the actual option for later. - $options->{'ansi2knr'} = [$_, $where]; + # Obsolete (and now removed) de-ANSI-fication support. + error ($where, + "automatic de-ANSI-fication support has been removed"); } elsif ($_ eq 'no-installman' || $_ eq 'no-installinfo' || $_ eq 'dist-shar' || $_ eq 'dist-zip' diff --git a/m4/protos.m4 b/m4/protos.m4 index f710293..32a5616 100644 --- a/m4/protos.m4 +++ b/m4/protos.m4 @@ -1,31 +1,16 @@ -## ------------------------------- ## -*- Autoconf -*- -## Check for function prototypes. ## -## From Franc,ois Pinard ## -## ------------------------------- ## -# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2005, 2006 +# -*- Autoconf -*- +# Obsolete (and now removed) automatic de-ANSI-fiction support. +# +# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2005, 2006, 2011 # 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. -# serial 5 +# serial 6 AC_DEFUN([AM_C_PROTOTYPES], -[AC_REQUIRE([AC_C_PROTOTYPES]) -AC_DIAGNOSE([obsolete], - [$0: automatic de-ANSI-fication support is deprecated]) -if test "$ac_cv_prog_cc_stdc" != no; then - U= ANSI2KNR= -else - U=_ ANSI2KNR=./ansi2knr -fi -# Ensure some checks needed by ansi2knr itself. -AC_REQUIRE([AC_HEADER_STDC]) -AC_CHECK_HEADERS([string.h]) -AC_SUBST([U])dnl -AC_SUBST([ANSI2KNR])dnl -_AM_SUBST_NOTMAKE([ANSI2KNR])dnl -]) + [AC_FATAL([automatic de-ANSI-fication support has been removed])]) AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES]) diff --git a/tests/Makefile.am b/tests/Makefile.am index 128ee06..ba83850 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -154,6 +154,7 @@ amopt.test \ amopts-location.test \ amopts-variable-expansion.test \ amsubst.test \ +ansi2knr-no-more.test \ ar-lib.test \ ar.test \ ar2.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index e0d2ac3..bfe8db4 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -427,6 +427,7 @@ amopt.test \ amopts-location.test \ amopts-variable-expansion.test \ amsubst.test \ +ansi2knr-no-more.test \ ar-lib.test \ ar.test \ ar2.test \ diff --git a/tests/ansi2knr-no-more.test b/tests/ansi2knr-no-more.test new file mode 100755 index 0000000..0d405fe --- /dev/null +++ b/tests/ansi2knr-no-more.test @@ -0,0 +1,56 @@ +#! /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 any attempt to use the obsolete de-ANSI-fication support +# is diagnosed. + +. ./defs || Exit 1 + +warn_rx='automatic de-ANSI-fication.*removed' + +echo AC_PROG_CC >> configure.in +$ACLOCAL +mv aclocal.m4 aclocal.sav +cp configure.in configure.sav + +echo AM_C_PROTOTYPES >> configure.in + +$ACLOCAL -Wnone 2>stderr && { cat stderr >&2; Exit 1; } +cat stderr >&2 +grep "^configure\\.in:5:.*$warn_rx" stderr + +cat aclocal.sav "$top_testsrcdir"/m4/protos.m4 > aclocal.m4 +$AUTOCONF -Wnone 2>stderr && { cat stderr >&2; Exit 1; } +cat stderr >&2 +grep "^configure\\.in:5:.*$warn_rx" stderr + +for opt in ansi2knr lib/ansi2knr; do + # ansi2knr option in Makefile.am + cp configure.sav configure.in + echo "AUTOMAKE_OPTIONS = $opt" > Makefile.am + rm -rf autom4te*.cache + AUTOMAKE_fails -Wnone + grep "^Makefile\.am:1:.*$warn_rx" stderr + # ansi2knr option in configure.in + echo > Makefile.am # `echo', not `:', for Solaris /bin/sh. + sed "s|^\\(AM_INIT_AUTOMAKE\\).*|\1([$opt])|" configure.sav >configure.in + cat configure.in # For debugging. + rm -rf autom4te*.cache + AUTOMAKE_fails -Wnone + grep "^configure\.in:2:.*$warn_rx" stderr +done + +: diff --git a/tests/depacl2.test b/tests/depacl2.test index 86af8c1..a5c3be9 100755 --- a/tests/depacl2.test +++ b/tests/depacl2.test @@ -20,14 +20,9 @@ . ./defs || Exit 1 -cat >> configure.in << 'END' -AM_C_PROTOTYPES -FOO -END +echo 'AM_FOO' >> configure.in +echo 'AC_DEFUN([AM_FOO], [AC_REQUIRE([AC_HEADER_STDC])])' > AM_FOO.m4 -cat > AM_C_PROTOTYPES.m4 << 'END' -AC_DEFUN([AM_C_PROTOTYPES], [AC_REQUIRE([AC_HEADER_STDC])]) -END - -# Our --acdir overrides the one in $ACLOCAL. $ACLOCAL -I . + +: