From 283bf6a53641355f879c4cbf528a07b22787805f Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Wed, 15 Aug 2001 07:49:59 +0000 Subject: [PATCH] * bin/autom4te.in (@m4_warning): New. (&handle_m4): Use it. * tests/m4sugar.at (m4_warn): Pass `-f' to autom4te to ensure the warnings are issued at each run. * tests/atspecific.m4 (AT_CHECK_M4SUGAR, AT_CHECK_M4SH): M4sugar is in the src tree. --- ChangeLog | 9 +++++++++ TODO | 26 +++++++++++++++++++------- bin/autom4te.in | 6 +++++- tests/Makefile.am | 2 +- tests/Makefile.in | 2 +- tests/atspecific.m4 | 4 ++-- tests/m4sugar.at | 9 ++++++--- 7 files changed, 43 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 481b5475..cc7514f4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2001-08-15 Akim Demaille + + * bin/autom4te.in (@m4_warning): New. + (&handle_m4): Use it. + * tests/m4sugar.at (m4_warn): Pass `-f' to autom4te to ensure the + warnings are issued at each run. + * tests/atspecific.m4 (AT_CHECK_M4SUGAR, AT_CHECK_M4SH): M4sugar + is in the src tree. + 2001-08-15 Akim Demaille * tests/atspecific.m4 (AT_CHECK_AUTOUPDATE): Perl is now required: diff --git a/TODO b/TODO index fb89605c..037f58bb 100644 --- a/TODO +++ b/TODO @@ -20,6 +20,25 @@ should be removed. ** AC_CHECK_TOOL... Write a test that checks that it honors the values set by the user. +** ifnames +Rewrite in Perl. Drop the AWK dependency. Remove the AWK portability +tests. Add ifnames to the Perl sanity checks. + +** autom4te and warnings. +Decide what must be done. + +** Automake 1.6 +*** AC_LIBOBJ_DECL +Decide with the Automake team whether this macro should list only `.c' +files, or it should include the `.h' too. For instance the +AC_FUNC_GNU_GETOPT macro could provide the three files, likewise for +the macro which allows to choose a regex engine. + +*** Auxiliary files +It is AC_PROG_LIBTOOL that should tell Automake what are the files to +ship. We need something similar to AC_LIBOBJ_DECL for all these +situations. + * Later @@ -98,13 +117,6 @@ be opened to user macros, i.e., for instance libtool itself must be able to say that AM_PROG_LIBTOOL is now AC_PROG_LIBTOOL, and have autoupdate do its job on old configure.ac. -** AC_LIBOBJ_DECL -Decide with the Automake team whether this macro should list only `.c' -files, or it should include the `.h' too. For instance the -AC_FUNC_GNU_GETOPT macro could provide the three files, likewise for -the macro which allows to choose a regex engine. - - * Even later ** Autoscan macros diff --git a/bin/autom4te.in b/bin/autom4te.in index 464edf5e..f40b7af1 100644 --- a/bin/autom4te.in +++ b/bin/autom4te.in @@ -254,6 +254,9 @@ my %trace; my @preselect = ('include', 'm4_pattern_allow', 'm4_pattern_forbid'); my $output = '-'; + +# Autom4te's default warnings, and the actual list of warnings. +my @my_warning = ('syntax'); my @warning; # M4 include path. @@ -516,7 +519,8 @@ sub handle_m4 ($@) # 2. $WARNINGS, $3 command line options, in that order. # Set them in the order expected by the M4 macros: the converse. my $m4_warnings = - lc join (',', reverse (split (',', ($ENV{'WARNINGS'} || '')), + lc join (',', reverse (@my_warning, + split (',', ($ENV{'WARNINGS'} || '')), map { split /,/ } @warning)); # GNU m4 appends when using --error-output. diff --git a/tests/Makefile.am b/tests/Makefile.am index f234132c..cab09710 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -97,7 +97,7 @@ CLEANFILES = \ expr \ libtool ltconfig ltmain.sh -DISTCLEANFILES = atconfig testsuite +DISTCLEANFILES = atconfig testsuite testsuite.log ## ------------------ ## diff --git a/tests/Makefile.in b/tests/Makefile.in index 95e9acb7..2d9be9d8 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -87,7 +87,7 @@ MACRO_FILES = $(top_srcdir)/lib/autoconf/general.m4 $(top_srcdir)/ CLEANFILES = debug-*.sh state-* at-* stderr stdout autom4te.cache script.s4g script.as script configure configure.in configure.ac config.status config.cache config.log config.h.in config.hin config.h config.guess config.sub install-sh expr libtool ltconfig ltmain.sh -DISTCLEANFILES = atconfig testsuite +DISTCLEANFILES = atconfig testsuite testsuite.log mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_CLEAN_FILES = atconfig DIST_COMMON = README Makefile.am Makefile.in atconfig.in diff --git a/tests/atspecific.m4 b/tests/atspecific.m4 index f4d950e9..ad0251e8 100644 --- a/tests/atspecific.m4 +++ b/tests/atspecific.m4 @@ -28,7 +28,7 @@ changequote()changequote([, ])include(autotest/general.m4)# -*- Autoconf -*- # ---------------------------------------------------------- m4_define([AT_CHECK_M4SUGAR], [AT_CLEANUP_FILES([script.4s script autom4te.cache])dnl -AT_CHECK([autom4te -I ../lib m4sugar/m4sugar.m4 script.s4g -o script $1], +AT_CHECK([autom4te -I $top_srcdir/lib m4sugar/m4sugar.m4 script.s4g -o script $1], m4_default([$2], [0]), [$3], [$4])]) @@ -36,7 +36,7 @@ AT_CHECK([autom4te -I ../lib m4sugar/m4sugar.m4 script.s4g -o script $1], # ------------------------------------------------------- m4_define([AT_CHECK_M4SH], [AT_CLEANUP_FILES([script.as script autom4te.cache])dnl -AT_CHECK([autom4te -I ../lib m4sugar/m4sh.m4 script.as -o script $1], +AT_CHECK([autom4te -I $top_srcdir/lib m4sugar/m4sh.m4 script.as -o script $1], m4_default([$2], [0]), [$3], [$4])]) diff --git a/tests/m4sugar.at b/tests/m4sugar.at index 02a02222..7e46d0c9 100644 --- a/tests/m4sugar.at +++ b/tests/m4sugar.at @@ -38,6 +38,9 @@ AT_SETUP([[m4_warn]]) # commas are not swallowed. This can easily happen because of # m4-listification. +# FIXME: For the time being we use -f to make sure we do issue the +# warnings. But maybe autom4te should handle that by itself? + AT_DATA([script.s4g], [[m4_warn([foo], [foo]) m4_warn([bar], [bar]) @@ -48,17 +51,17 @@ AT_CHECK_M4SUGAR([-o-], 0, [], [script.s4g:3: warning: syntax ]) -AT_CHECK_M4SUGAR([-o- -Wall], 0, [], +AT_CHECK_M4SUGAR([-o- -Wall -f], 0, [], [script.s4g:1: warning: foo script.s4g:2: warning: bar script.s4g:3: warning: syntax ]) -AT_CHECK_M4SUGAR([-o- -Wnone,bar], 0, [], +AT_CHECK_M4SUGAR([-o- -Wnone,bar -f], 0, [], [script.s4g:2: warning: bar ]) -AT_CHECK_M4SUGAR([-o- -Wnone,bar,error], 1, [], +AT_CHECK_M4SUGAR([-o- -Wnone,bar,error -f], 1, [], [script.s4g:2: error: bar script.s4g:2: the top level ])