Commit Graph

128 Commits

Author SHA1 Message Date
Ralf Wildenhues
675a0c95df Update License to GPLv3+ including new Autoconf Exception.
* NEWS, README: Update licensing information.
* COPYING.EXCEPTION: New file.
* Makefile.am (EXTRA_DIST): Distribute it.
* cfg.mk (autom4te-update): Remove copyright change warning.
* lib/autoconf/autoconf.m4, lib/autoconf/autoheader.m4,
lib/autoconf/autoscan.m4, lib/autoconf/autotest.m4,
lib/autoconf/autoupdate.m4, lib/autoconf/c.m4,
lib/autoconf/erlang.m4, lib/autoconf/fortran.m4,
lib/autoconf/functions.m4, lib/autoconf/general.m4,
lib/autoconf/headers.m4, lib/autoconf/lang.m4,
lib/autoconf/libs.m4, lib/autoconf/oldnames.m4,
lib/autoconf/programs.m4, lib/autoconf/specific.m4,
lib/autoconf/status.m4, lib/autoconf/types.m4,
lib/autotest/autotest.m4, lib/autotest/general.m4,
lib/autotest/specific.m4, lib/m4sugar/foreach.m4,
lib/m4sugar/m4sh.m4, lib/m4sugar/m4sugar.m4: Update exception
statement, bump to GPLv3.
* bin/autoconf.as, bin/autoheader.in, bin/autom4te.in,
bin/autoreconf.in, bin/autoscan.in, bin/autoupdate.in,
bin/ifnames.in: Bump to GPLv3+, adjust --version output
to reflect the GPLv3+ and the Autoconf Exception.
* lib/Autom4te/C4che.pm, lib/Autom4te/ChannelDefs.pm,
lib/Autom4te/General.pm, lib/Autom4te/Request.pm,
lib/autom4te.in, lib/autoscan/autoscan.pre,
lib/emacs/autoconf-mode.el, lib/emacs/autotest-mode.el,
lib/freeze.mk, tests/atlocal.in, tests/autoscan.at,
tests/autotest.at, tests/base.at, tests/c.at,
tests/compile.at, tests/erlang.at, tests/foreign.at,
tests/fortran.at, tests/local.at, tests/m4sh.at,
tests/m4sugar.at, tests/mktests.sh, tests/semantics.at,
tests/statesave.m4, tests/suite.at, tests/tools.at,
tests/torture.at, tests/wrapper.as: Bump to GPLv3+.
2009-09-09 19:53:31 +02:00
Ralf Wildenhues
5b5d0c5842 Allow to work on systems without Fcntl::flock implementation.
* configure.ac (PERL_FLOCK): New substitution variable with test
whether Fcntl::flock is implemented by the system.
* bin/Makefile.am (edit): Substitute @PERL_FLOCK@.
* bin/autom4te.in: Call XFile::lock only if flock is
implemented.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-09 07:27:39 +02:00
Eric Blake
497a186732 Don't hide leading space in autom4te --trace output.
* bin/autom4te.in (handle_traces): Don't flatten leading and
trailing space, since tracing spacing bugs can be useful.
* tests/tools.at (autom4te --trace and whitespace): New test.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-16 06:24:21 -06:00
Paolo Bonzini
93a2679e00 use m4 -g when available
M4sugar requires GNU m4 extensions to be enabled.  Override
POSIXLY_CORRECT using -g.

* m4/m4.m4: Unset POSIXLY_CORRECT during first test.  Test for -g.
Warn user if he has POSIXLY_CORRECT set but -g is not supported.
* bin/Makefile.am: Substitute @M4_GNU@ into generated files.
* bin/autom4te.in: Pass @M4_GNU@ to m4.
2009-07-13 21:46:08 +02:00
Paolo Bonzini
877876da7c revert previous push 2009-07-13 13:39:25 +02:00
Paolo Bonzini
ca833ef9f8 use m4 -g when available
M4sugar requires GNU m4 extensions to be enabled.  Override
POSIXLY_CORRECT using -g.

2009-07-12  Paolo Bonzini  <bonzini@gnu.org>

	* m4/m4.m4: Test for -g.
	* bin/Makefile.am: Substitute @M4_GNU@ into generated files.
	* bin/autom4te.in: Pass @M4_GNU@ to m4.
2009-07-13 13:33:24 +02:00
Ralf Wildenhues
cafdba3139 Fix concurrent autom4te.cache directory creation race.
* bin/autom4te.in: Do not error out if another `autom4te'
instance created the cache directory before we could.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-06-12 13:38:57 +02:00
Eric Blake
b35598a688 Use pkgdatadir consistently.
* bin/Makefile.am (edit): Substitute pkgdatadir, not datadir.
* lib/Makefile.am (edit): Likewise.
* lib/autom4te.in (Autoconf-without-aclocal-m4, Autotest, M4sh)
(M4sugar): Use @pkgdatadir@, not @datadir@.
* bin/autoheader.in ($datadir): Likewise.
* bin/autom4te.in ($datadir): Likewise.
* bin/autoreconf.in ($datadir): Likewise.
* bin/autoscan.in ($datadir): Likewise.
* bin/autoupdate.in ($datadir): Likewise.
* bin/ifnames.in ($datadir): Likewise.
* doc/autoconf.texi (Installation Directory Variables): Update
example to be consistent; focus on $(bindir) as an autoconf
variable, and mention that $(pkgdatadir) comes from automake.
Reported by Reuben Thomas.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-02-24 09:38:01 -07:00
Eric Blake
c875bf7a97 Use URLs in --help output, part 1: autoconf executables.
* bin/autoconf.as (usage): Make output consistent with recent
change in gnulib version-etc module.
* bin/autoheader.in ($help): Likewise.
* bin/autom4te.in ($help): Likewise.
* bin/autoreconf.in ($help): Likewise.
* bin/autoscan.in ($help): Likewise.
* bin/autoupdate.in ($help): Likewise.
* bin/ifnames.in ($help): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-01-27 14:13:50 -07:00
Peter Breitenlohner
9f28c6e656 Quote traced macros passed from autom4te to M4.
* bin/autom4te (handle_m4): Apply shell_quote to macro names.
* tests/tools.at (autom4te --trace and unusual macro names): New
test.
* THANKS: Update.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-01-27 09:28:27 -07:00
Eric Blake
f4df9b9b40 Update invocation documentation.
* doc/autoconf.texi (autoscan Invocation): Mention --debug.
(autoreconf Invocation): Mention -v.
(autom4te Invocation): Tie --freeze to -F, not -f.
(autoupdate Invocation): Mention --prepend-include.
* doc/install.texi (configure Invocation): Mention --help=short,
--help=recursive, -n/--no-create, --prefix.  Avoid TABs.
* bin/autoscan.in ($help): Omit space before `...'.
* bin/ifnames.in ($help): Likewise.
* bin/autoconf.as (Usage): Likewise.
* bin/autoreconf.in ($help): Likewise.
* bin/autoheader.in ($help): Likewise.
* bin/autom4te.in ($help): Likewise.
* bin/autoupdate.in ($help): Likewise.
* lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Use
`[OPTION]...', rather than `[OPTIONS]'.  Mention --silent.  Indent
--file correctly.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-08-26 09:28:15 -06:00
Eric Blake
d2dd4ed1ca Don't let frozen __m4_version__ break downgrade to m4 1.4.x.
* bin/autom4te.in: Adjust comments, now that we rely on 1.4.5+.
(files_to_options): Avoid inheriting __m4_version__ from frozen
file if current M4 does not support it.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-08-26 09:07:01 -06:00
Eric Blake
c60735fbb8 Support unbalanced () in AT_SETUP by adding two new quadrigraphs.
* bin/autom4te.in (handle_output): Substitute @{:@ and @:}@.
(handle_traces): Likewise.
* lib/m4sugar/m4sugar.m4 (m4_qlen): Account for new quadrigraphs.
* tests/autotest.at (AT_CHECK_AT_TITLE_CHAR): Add new tests.
* doc/autoconf.texi (Quadrigraphs): Document them.
(Evaluation Macros) <m4_expand>: Enhance documentation.
(Text processing Macros) <m4_text_box>: Document cases where
quadrigraphs can help for problemetic unbalanced parentheses.
(Pretty Help Strings) <AS_HELP_STRING>: Likewise.
(Writing Testsuites) <AT_SETUP>: Likewise.
(Limitations of Builtins) <case>: Consolidate text on unbalanced
parentheses, and add an example of creative comments.
* NEWS: Document the addition.
Reported by Joel E. Denny.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-04-22 16:28:14 -06:00
Slava Sysoltsev
1ee48b2c8b Flush buffered output before exit.
* bin/autom4te.in (handle_output): Explicitly close file.
* THANKS: Update.
See http://lists.gnu.org/archive/html/autoconf/2008-04/msg00026.html.
2008-04-09 10:46:08 -06:00
Eric Blake
a91e2a71d2 Use GPLv2+ plus exception as license for release.
Return back to GPLv2+, until the text of the exceptions is
finalized, reverting the change from 2007-07-03 and the first
part of the change from 2007-07-20.

Also:
* COPYING: Revert to GPLv2.
* COPYINGv3: New file, since some auxiliary build tools, used for
building autoconf and not installed, are GPLv3.
* Makefile.am (EXTRA_DIST): Distribute COPYINGv3.
* NEWS: Remove mention of GPLv3.
* README: Clarify situation regarding GPLv3.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-04-05 17:04:48 -06:00
Eric Blake
b866676a24 Document --trace=macro:format in --help output.
* bin/autom4te.in (help): Mention optional trace format.
* bin/autoconf.as (usage): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-03-26 06:18:17 -06:00
Ralf Wildenhues
449317f7ee Proper file name escaping in Autoconf programs and Perl modules.
This includes escaping of characters special to the shell
as well as special to Perl, e.g., leading `<' or `>'.
For example, when $file starts with `>', `open ">$file"'
wrongly tries to append to a different file.

* bin/autoconf.as: Fix quoting for autom4te options.
* lib/Autom4te/General.pm (shell_quote): New function, taken
from coreutils, written by Jim Meyering.
(mktmpdir): Use it.
* bin/autom4te.in (files_to_options, handle_m4): Use shell_quote
and open_quote.
* bin/autoreconf.in (parse_args): Likewise.
* bin/autoscan.in (main): Likewise.
* bin/autoupdate.in (main): Likewise.
* bin/autoheader.in: Likewise, fixing old insufficient escaping.
* bin/ifnames.in: Likewise, XFile usage fixes.
* tests/tools.at (autom4te and whitespace in file names): Extend
test.  Test twice, with special characters allowed on w32, and the
rest.  Test leading and trailing whitespace, for `open_quote'.
(autotools and whitespace in file names): New, analogous test.
Reported by Paul Eggert and Benoit Sigoure, additional suggestions
by Russ Allbery and Eric Blake.
2007-12-08 11:46:43 +01:00
Ralf Wildenhues
952adbf389 Fix autom4te for unusual characters in input file names.
* bin/autom4te.in (files_to_options): Quote active characters
for the shell.
* tests/tools.at (autom4te and white space in file names):
New test.
2007-11-26 19:40:50 +01:00
Ralf Wildenhues
ff8db57440 * bin/autoconf.as: Update --version output to match current GCS.
* bin/autoheader.in: Likewise.
* bin/autom4te.in: Likewise.
* bin/autoreconf.in: Likewise.
* bin/autoscan.in: Likewise.
* bin/autoupdate.in: Likewise.
* bin/ifnames.in: Likewise.
2007-08-20 21:12:33 +00:00
Paul Eggert
b411b77358 Reword the copyright notices to match what's suggested in GPLv3. 2007-07-20 23:11:49 +00:00
Paul Eggert
f448ac9647 Update to GPLv3. 2007-07-03 20:28:58 +00:00
Ralf Wildenhues
08c188963a * bin/autom4te.in: Fix typos. 2007-05-17 08:20:31 +00:00
Noah Misch
d95fafd9bf * bin/autoconf.as: Handle `-' just like other input files.
* bin/autom4te.in (parse_args): Pass `-' through.
(handle_output): Skip the forbidden token search if we read from stdin.
(up_to_date): Always treat stdin as out of date.
* tests/tools.at (autoconf: input from stdin): New test.
(autoconf: forbidden tokens, basic): Check a second `autoconf' run.
2007-05-17 02:43:12 +00:00
Eric Blake
c78eaa47a9 * bin/Makefile.am (RELEASE_YEAR): New macro.
(edit): Use it to supply correct copyright year to scripts.
* bin/autoconf.as (version): Use it.
* bin/autoheader.in ($version): Likewise.
* bin/autom4te.in ($version): Likewise.
* bin/autoreconf.in ($version): Likewise.
* bin/autoscan.in ($version): Likewise.
* bin/autoupdate.in ($version): Likewise.
* bin/ifnames.in ($version): Likewise.
2007-01-04 16:43:06 +00:00
Stepan Kasal
6f3e11dfb1 * bin/autom4te.in (handle_m4): Do not redirect stdin to
/dev/null since the heuristics for interactive behaviour was
fixed in CVS m4.
2006-10-24 18:25:30 +00:00
Stepan Kasal
1a02d1057d * bin/autom4te.in: With --force, always refresh the output
file.
2006-10-24 15:57:57 +00:00
Eric Blake
c94a138300 * bin/autoconf.as (version): Reword to match GNU Coding
Standards.
* bin/autoheader.in (version): Likewise.
* bin/autom4te.in (version): Likewise.
* bin/autoreconf.in (version): Likewise.
* bin/autoscan.in (version): Likewise.
* bin/autoupdate.in (version): Likewise.
* bin/ifnames.in (version): Likewise.
2006-10-16 20:58:44 +00:00
Eric Blake
8dc951191c * m4/m4.m4 (AC_PROG_GNU_M4): Check for m4 --debugfile support.
* bin/Makefile.am (edit): Substitute M4_DEBUGFILE.
* bin/autom4te.in (handle_m4): Favor --debugfile over misnamed
--error-output, to avoid warnings with M4 2.0.
2006-09-20 02:44:51 +00:00
Ralf Wildenhues
7c45d0ff4e * bin/autom4te.in (handle_traces): Transform the `@S|@'
quadrigraph correctly in traces.
2006-06-23 15:19:34 +00:00
Ralf Wildenhues
472aafe0f5 * bin/autom4te.in (handle_output): Do not forbid the empty
pattern.
* tests/tools.at (autoconf: the empty token): New test.
2006-06-20 05:37:43 +00:00
Paul Eggert
8eaa3f01d0 * bin/autoreconf.in (help): Document M4 environment variable.
* bin/autoconf.as (Usage): Likewise.
* bin/autom4te.in (help): Likewise.
* doc/autoconf.texi (autom4te Invocation): Likewise.
2006-06-04 19:56:27 +00:00
Paul Eggert
1fabda990f * bin/autoconf.as, bin/autoheader.in, bin/autom4te.in
* bin/autoreconf.in, bin/autoscan.in, bin/autoupdate.in, bin/ifnames.in:
* lib/autoconf/general.m4, lib/autoconf/status.m4:
* lib/autotest/general.m4:
Update copyright year to 2006.
2006-01-06 00:10:37 +00:00
Paul Eggert
23fa1ecf22 * bin/autom4te.in ($m4): Catch usages like --nesting-limit=2048. 2005-07-05 06:48:56 +00:00
Paul Eggert
681d17dce2 Update FSF postal mail address. 2005-05-14 07:00:38 +00:00
Paul Eggert
23ddc41052 Update --version copyright output to 2005. 2005-01-03 07:38:01 +00:00
Paul Eggert
97050d1a3c Update copyright from 2003 to 2004. 2004-01-27 19:02:51 +00:00
Akim Demaille
61cf467820 * bin/autom4te.in (&freeze): Use a less likely warning separator
than `nn', so that `nnn' is valid in warnings.
Reported by Steve Huston.
2003-10-31 08:43:39 +00:00
Akim Demaille
254863003e * lib/Autom4te/FileUtils.pm (&update_file): s/cannot not/cannot/g.
Reported by Gary Vaughan.
* bin/autom4te.in (handle_m4): Likewise.
2003-09-09 15:44:56 +00:00
Akim Demaille
29be1600df * bin/autom4te.in: Use &fatal where more appropriate than &error.
(freeze): When exiting, use $exit_code.
* lib/autoconf/fortran.m4: Comment changes.
2003-09-04 13:01:09 +00:00
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
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
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
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
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
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
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
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
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