Commit Graph

479 Commits

Author SHA1 Message Date
Akim Demaille
358bc50517 Output stack traces in warnings.
* lib/m4sugar/m4sugar.m4 (_m4_warn): New.
Replace the former...
(m4_warn): Pass the call stack to _m4_warn.
* bin/autom4te.in: Adjust to output the call stack.
* tests/m4sugar.at (m4@&t@_warn): Adjust.
2003-08-22 13:38:33 +00:00
Akim Demaille
b9d97d70dc * lib/Autom4te/Request.pm, lib/Autom4te/C4che.pm: New.
* bin/autom4te.in: Adjust.
2003-08-22 08:09:12 +00:00
Akim Demaille
a5b49f45d6 * lib/Autom4te/General.pm (&file_name_is_absolute): Remove.
(&verbose): Remove.
(&getopt): Adjust the note and verb channels, depending upon
--verbose.
* bin/autoheader.in, bin/autom4te.in, bin/autoscan.in,
* bin/autoupdate.in: Adjust.
Use &verb, not &verbose.
2003-08-21 17:50:11 +00:00
Akim Demaille
cf2308cf7b * bin/autoheader.in (&parse_args): Use &parse_warnings and
&parse_WARNINGS.
($help): Use Autom4te::ChannelDefs::usage.
* bin/autoscan.in: Use Autom4te::ChannelDefs.
* lib/Autom4te/General.pm: Don't export error: you don't own it.
2003-08-21 17:31:25 +00:00
Akim Demaille
e491f83180 First stab at preserving warnings between calls to autom4te,
including when the cache is used.
There are still several issues: (i) there are too many runs of m4
(one for include, one for warnings, and some more), (ii) warnings
spreading on several lines are not handled gracefully, (iii) the
code meant to have the call stack display for errors does not work
(its handling should move from m4 to autom4te).
* bin/autom4te.in Autom4te::Channels, Autom4te::ChannelDefs):
Use them.
(@preselect): Add m4_warn.
($exit_status): Remove, use $exit_code.
($help): Use Autom4te::ChannelDefs::usage.
(&handle_m4): No longer define the m4_warnings.
At each run, extract and report the warnings.
Always cache the result, including if the exit status is on
failure, since if nothing changes, we should result in the same
failure, hence we can use the cache.
* lib/m4sugar/m4sugar.m4 (m4_warning_ifelse, _m4_warning_ifelse)
(_m4_warning_error_ifelse, __m4_warning_error_ifelse, _m4_warn):
Remove.
(m4_warn): Redefine as a do-nothing: it is its invocation that
matters, as warnings are now reported via traces.
* lib/autoconf/general.m4 (AC_DIAGNOSE): Don't make it a copy of
the contents of m4_warn: make it _call_ m4_warn, so that tracing
the latter reveals calls to the former.
Adjust the tests.
* tests/m4sugar.at (m4@&t@_warn): Use existing warning categories.
2003-08-21 17:25:28 +00:00
Akim Demaille
6a7d12b98f * bin/autoreconf.pm (Autom4te::Channels, Autom4te::ChannelDefs):
Use them.
2003-08-21 16:17:32 +00:00
Akim Demaille
59b8e13699 * lib/Autom4te/Configure_ac.pm (&find_configure_ac)
(&require_configure_ac): Accept an optional directory argument.
($configure_ac): Remove.
* lib/Autom4te/General.pm (&find_configure_ac, &canonfile)
(&catfile): Remove.
* bin/autoheader.in, bin/autoreconf.in, bin/autoupdate.in,
* bin/autoscan.in: Adjust.
2003-08-21 06:55:41 +00:00
Akim Demaille
cadfc16c0b * bin/autoheader.in: Remove duplicate 'use Autom4te::FileUtils'.
Reported by Alexandre Duret-Lutz.
2003-08-20 17:22:06 +00:00
Akim Demaille
c99bf18b5c * bin/autoupdate.in, bin/auheader.in, bin/autoreconf.in,
* bin/autom4te: Adjust.
In particular, be Autoconf tools are really silent when properly
working, bind the verbosity of the 'note' channel to $verbose.
* lib/Autom4te/General.pm (&find_file, &mtime, &update_file)
(&xsystem, &contents): Remove, since they are exported by...
* lib/Autom4te/FileUtils.pm: this.
More perldoc.
* lib/Autom4te/General.pm (&up_to_date_p): Move to...
* lib/Autom4te/FileUtils.pm: here.
2003-08-20 12:52:18 +00:00
Akim Demaille
1649ca79e6 * Makefile.am (automake_cvsweb, automake_cvsargs, autom4te_files)
(autom4te-update): New.
* Makefile.cfg (update): Bind autom4te-update.
2003-08-20 06:29:54 +00:00
Akim Demaille
9c4ac634f9 Regen. 2003-06-23 08:39:09 +00:00
Akim Demaille
97df4a3e31 Regen with fixed Automake. 2003-06-20 08:18:15 +00:00
Akim Demaille
456b9c0a6f * bin/autom4te.in: Don't rely on $HOME being defined.
Reported by Marc Espie as PR/233.
2003-06-20 07:55:35 +00:00
Akim Demaille
2e52204a16 Regen. 2003-06-20 07:34:29 +00:00
Akim Demaille
ff9230c146 * bin/autom4te.in, bin/autoscan.in, bin/autoheader.in: White space
changes.
* lib/Autom4te/General.pm (&backname): Remove, no longer used by
Autoconf nor Automake.
(&contents): New, from Automake.
PODify.
* lib/autoconf/c.m4 (_AC_PROG_CXX_EXIT_DECLARATION):
Remove `#include <stdlib.h>' from the list; we should never
2003-06-02 06:55:03 +00:00
Akim Demaille
4c64440ba1 * Makefile.am, bin/Makefile.am, config/Makefile.am,
* doc/Makefile.am, lib/autoconf/Makefile.am, tests/Makefile.am:
White spaces cleanup.
2003-05-23 13:09:28 +00:00
Akim Demaille
3cb00cdb8b * aclocal.m4, bin/autoconf.as, lib/autoconf/autoconf.m4,
* lib/autoconf/autoheader.m4, lib/autoconf/autoupdate.m4,
* lib/autoconf/c.m4, lib/autoconf/fortran.m4,
* lib/autoconf/general.m4, lib/autoconf/headers.m4,
* lib/autoconf/lang.m4, lib/autoconf/libs.m4,
* lib/autoconf/programs.m4, lib/autoconf/specific.m4,
* lib/autoconf/status.m4, lib/autoconf/types.m4,
* lib/autotest/general.m4, lib/m4sugar/m4sugar.m4,
* tests/atspecific.m4, tests/base.at, tests/compile.at,
* tests/foreign.at, tests/m4sh.at, tests/semantics.at,
* tests/tools.at, tests/torture.at:
Whitespace clean up.
Suggested by Jim Meyering.
2003-05-22 13:24:04 +00:00
Akim Demaille
e808ba2ea7 * bin/autoupdate.in ($m4): Fix quotation.
Reported by Martin Mokrejs.
2003-05-21 09:46:59 +00:00
Akim Demaille
62930d7b99 * bin/autoheader.in, bin/autom4te.in, bin/autoreconf.in,
* bin/autoscan.in, bin/autoupdate.in, bin/ifnames.in (BEGIN): Make
them uniform, and more robust to Perl special characters.
Reported by Martin Mokrej.
2003-05-16 09:54:46 +00:00
Akim Demaille
d2869a3180 Don't try to be smart with aclocal 1.8+ because (i) aclocal no
longer updates aclocal.m4 if useless, (ii) if a file m4_included
by aclocal.m4 is changed it might require the importing of another
m4 extension file, i.e., aclocal must be run.
* bin/autoreconf.in (&run_aclocal, $aclocal_supports_force): New.
(&parse_args): Use --force with aclocal if required and supported.
(&autoreconf_current_directory): Use &run_aclocal.
2003-05-06 15:07:59 +00:00
Akim Demaille
db4f0f52c0 Lock autom4te's cache.
* lib/Autom4te/XFile.pm ($me, &name, &lock, &truncate, &seek): New.
* bin/autom4te.in (&Request::save, &Request::load): Use an IO::File
argument instead of a file name, so that the request file remains
open during the whole autom4te run.
($icache_file): New.
(&freeze): Lock the $icache_file.
2003-05-06 08:51:21 +00:00
Akim Demaille
f2da1c1ca5 Regen. 2003-05-06 07:17:42 +00:00
Akim Demaille
830fd374fe Regen. 2003-04-01 07:24:38 +00:00
Akim Demaille
f6f77d7b72 * bin/autoheader.in (BEGIN): For DJGPP SHELL may not be set
to a shell that can handle redirection or quoting correctly.
Override SHELL with the shell detected by configure.
Use of $^O suggested by Tim van Holder.
* bin/autom4te.in (BEGIN): Likewise.
* bin/autoreconf.in (BEGIN): Likewise.
* bin/autoscan.in (BEGIN): Likewise.
* bin/autoupdate.in (BEGIN): Likewise.
* bin/ifnames.in (BEGIN): Likewise.
* bin/ifnames.in: Add final newline to help and version messages.
* lib/autoconf/programs.m4 (AC_PROG_MAKE_SET): Translate colons,
to cope with DOS-style absolute paths, when constructing
${ac_make}.
* lib/autoconf/status.m4 (_AC_OUTPUT_HEADERS, _AC_OUTPUT_FILES):
When constructing paths with IFS=:, quote the path. If we're
constructing a DOS-style absolute path, we don't want to split it
on the colon.
* tests/atspecific.m4 (AT_CHECK_CONFIGURE): Fix typo
in description.
2003-02-28 10:11:07 +00:00
Pavel Roskin
5e7f0f99ed * bin/autoheader.in: Add missing newline when printing
suggestion how change AC_DEFINE call.
2003-02-25 23:20:21 +00:00
Akim Demaille
9bbb516751 * bin/autoreconf.in (autoreconf_current_directory): Properly
handle an empty aclocal.m4.
2003-02-20 17:04:10 +00:00
Akim Demaille
94a099a5ff Regen. 2003-02-20 16:57:46 +00:00
Paul Eggert
689196647b (at_flatten): rewritten to avoid M4 problem when
\(.*\) match is too long and there is something more to be checked.
<http://mail.gnu.org/pipermail/autoconf/2002-November/014524.html>

This also undoes the previous patch.
2002-12-03 08:30:12 +00:00
Paul Eggert
1ebbbb55ff (handle_traces): [^ *\(.*\) *$] ->
[^ *\(.*[^ ]\)? *].  The old regular expression was obviously wrong,
and it blunders into a GNU m4 bug as noted by Martin Frydl in
<http://mail.gnu.org/pipermail/autoconf/2002-November/014524.html>.
2002-12-03 06:51:15 +00:00
Akim Demaille
9ac168dc89 Use Automake 1.7.1. 2002-11-14 17:37:45 +00:00
Alexandre Duret-Lutz
020483fc8e * bin/autoscan.in (scan_file): Scan Makefile.am too. Ignore
Makefile.in if Makefile.am exists.
(output): Strip `.am' from Makefiles.  Don't
output AC_CONFIG_FILES if no Makefiles were found.
2002-11-07 14:11:31 +00:00
Paul Eggert
3497f1fb5c Regenerate. 2002-11-05 07:16:59 +00:00
Akim Demaille
5c74899ef9 * bin/autoreconf.in (&autoreconf_current_directory): New, extracted
from...
(&autoreconf): here.
($help, $make, &parse_args, &autoreconf_current_directory):
Support -m/--make.
* doc/autoconf.texi (autoreconf Invocation): Adjust.
2002-11-03 17:39:29 +00:00
Akim Demaille
fad4a1fa3c * bin/autom4te.in (load_configuration): Reject #args out of any
language.
2002-10-31 08:37:20 +00:00
Akim Demaille
8429b06424 * bin/autom4te.in (&parse_args, $help): Support --no-cache.
* doc/autoconf.texi (autom4te Invocation): Adjust.
Suggested by Tim van Holder.
2002-10-30 09:00:23 +00:00
Akim Demaille
e17454b662 * bin/autoreconf.in (&parse_args, $help): Support --warnings.
* doc/autoconf.texi (Invoking autom4te): Rename as...
(autom4te Invocation): this, for consistency with the other nodes.
2002-10-29 08:09:05 +00:00
Akim Demaille
701557402c * tests/atspecific.m4 (AT_CHECK_AUTOM4TE): Be robust to different
m4 executable names, and different GNU M4 version.
Reported by Ezra Peisach and Paul Jarc.
2002-10-28 07:15:05 +00:00
Akim Demaille
017a1dc5e5 * lib/freeze.mk ($(AUTOM4TE_CFG)): Add a missing dependency on
autom4te.in that resulted in the need for two `make' runs.
2002-10-27 18:16:06 +00:00
Akim Demaille
c54fb7e2e7 * configure.ac: Bump to 2.54b. 2002-10-27 18:14:58 +00:00
Akim Demaille
85f7faa898 Regen. 2002-10-25 15:34:28 +00:00
Akim Demaille
c9f4d136c9 Neutralize the dependency on current sources. 2002-10-25 15:15:56 +00:00
Akim Demaille
47dcd42876 * lib/autoscan/Makefile.am (autoscan.list): Disable the cache.
* bin/Makefile.am: Include freeze.mk.
2002-10-25 15:12:59 +00:00
Akim Demaille
da6caf35ba * bin/autom4te.in (&load_configuration): Take the file as
argument.
(&parse_args): Handle -C, --cache.
($help): Adjust.
(MAIN): Load ~/.autom4te.cfg and ./.autom4te.cfg.
* lib/autom4te.in (Autoconf): Pass --cache=autom4te.cache.
* doc/autoconf.texi (Invoking autom4te): Document --cache.
Now a subsection of...
(Using autom4te): This new section.
(Customizing autom4te): New.
(autom4te.cache): Adjust.
2002-10-25 11:52:37 +00:00
Akim Demaille
eb898adee6 * bin/autoconf.as, bin/autoconf.in, bin/autoupdate.in ($help):
Space changes.
2002-10-25 08:24:16 +00:00
Akim Demaille
bd71c86380 * bin/autoscan.in (output): Output AC_PREREQ.
(%needed_macros): Add AC_PREREQ so that configure.ac without one
be reported.
2002-10-25 08:22:52 +00:00
Akim Demaille
3c17011eec * bin/autom4te.in (handle_traces): Handle @&t@ in traces.
Reported by Peter Eisentraut.
2002-10-23 07:37:38 +00:00
Akim Demaille
cba40759dd * tests/foreign.at (Libtool): Don't check autoconf's stderr: there
are a few warnings.
* lib/autoconf/autoheader.m4 (AH_VERBATIM, _AH_VERBATIM_OLD):
Quote for Perl '' strings, not "".
* bin/autoheader.in: Invoke autoconf to get '' strings, not ""
strings.
2002-10-22 11:14:44 +00:00
Akim Demaille
33c894c0bf * lib/m4sugar/m4sh.m4 (_AS_QUOTE): The warning about quoted
characters is a syntax warning now.
(_AS_QUOTE): Accept $2 as list of characters to quote.
* lib/autoconf/autoheader.m4 (AH_VERBATIM, _AH_VERBATIM_OLD):
Quote for Perl, not sh.
* bin/autoheader.in: When $debug, report the file which is
`do'ne.
* tests/tools.at (autom4te, autoheader): Exercise @bar, not merely
`@', to tickle Perl's lists.
Reported by Carlos Velasco.
2002-10-22 08:20:19 +00:00
Akim Demaille
a6cc487161 * bin/autom4te.in (handle_m4): Pass --fatal-warning to m4, so that
missing included files _are_ errors.
Thanks to Alexandre Duret-Lutz.
* tests/tools.at (autom4te cache): Adjust.
* tests/atspecific.m4 (AT_CHECK_AUTOM4TE): New.
(AT_CHECK_M4SUGAR): Use it.
* tests/m4sugar.at (m4_warn, m4_require: circular dependencies):
Adjust.
* tests/tools.at (autom4te): Now it does exit 1.
2002-10-18 15:20:46 +00:00
Akim Demaille
aef93a0d75 Because of caching, some files that no longer exist and are no
longer required can still cause errors.
Reported by Alexandre Duret-Lutz.
* bin/autom4te.in (&parse_args): Do not prepend `--reload-state'
to frozen files in @ARGV, as @ARGV must remain being a list of
files.  Rather, at M4 call sites, use this...
(&files_to_options): New function.
(&freeze): Use &error.
(&up_to_date): If a file that was included according to the cache
is no longer there, then the output is out dated.
(&main): Don't even check whether a file is up to date is anyway
--force is given.
* tests/tools.at (autom4te cache): New.
2002-10-16 17:06:57 +00:00