Commit Graph

6378 Commits

Author SHA1 Message Date
Stefano Lattarini
0383261176 getopt: sync from Automake repository
* lib/Autom4te/Getopt.am: The master copy of this file has
been moved to the  Automake repository (see Automake commit
'v1.11-662-g52246cc' 2012-01-18, "cmdline parsing: move into
a dedicated perl module").  So we now we sync it from there,
by listing it ...
* cfg.mk (autom4te_files): ... in this variable.
2012-01-20 18:14:51 +01:00
Stefano Lattarini
ff2060231a build: fix automake error due to missing ChangeLog
Apparently, Automake does not accept the '$(srcdir)/ChangeLog'
target in Makefile.am as a declaration that ChangeLog is
automatically generated (and thus does not need to exist at
automake time).  One has to use a *literal* 'ChangeLog' target.

Problem introduced in commit v2.68-118-g6ed5195 of 2012-01-17,
"maint: generate ChangeLog from git log".

* Makefile.ma ($(srcdir)/ChangeLog): Renamed ...
(ChangeLog): ... to this.
2012-01-20 18:03:37 +01:00
Stefano Lattarini
f4be358c2b getopt: new Autom4te::Getopt module
* lib/Autom4te/General.pm (getopt): Move the guts of its
implementation ...
* lib/Autom4te/Getopt.pm (parse_options): .. into this function
in the new Autom4te::Getopt module.  This will make it simpler
for the implementation to be shared with other projects (right
now, Automake).
* lib/Automake/Makefile.am (dist_perllib_DATA): Add the new
module.
2012-01-17 21:24:04 +01:00
Jim Meyering
7137156eec tests: avoid spurious failure for each gnu-fortran-using test
The tests compare pre- and post-run lists of envvars, which must
be the same, modulo a list of known, filtered-out exceptions.
However, when running fortran-checking tests with GNU fortran, each
would fail due to the post-run addition of the GFC symbol added in
v2.68-97-gbd962ac.
* tests/local.at (AT_CHECK_ENV): Add GFC to the list of symbols
that we ignore in pre-/post-run environment diffs.
2012-01-17 13:26:05 +01:00
Stefano Lattarini
6ed5195ee1 maint: generate ChangeLog from git log
Following the practice set by various other GNU projects, we start
to automatically generate the ChangeLog file from the git commit
messages.  This will avoid duplication (as the ChangeLog entries
were always inserted both in the git commit message and in the
version-controlled ChangeLog file), and potential problems with
spurious merge conflicts (which, although greatly mitigated by
Bruno Haible's `git-merge-changelog' helper program, have never
been completely solved).

* ChangeLog: Moved ...
* ChangeLog.3: ... to this.
* build-aux/gitlog-to-changelog: New script, synced from gnulib.
* cfg.mk (gnulib-update): Also sync gitlog-to-changelog.
* Makefile.am (gen-ChangeLog): New .PHONY rule, generate the
ChangeLog for distribution.
(dist-hook): Depend on it.
($(srcdir)/ChangeLog): New dummy rule, to pacify automake "gnu"
strictness.  Creates a dummy ChangeLog, that will be overridden
by the proper one at distribution time.
(gen_start_date): New variable, the date starting from which the
git log entries are to be copied in the generated ChangeLog.
(EXTRA_DIST): Add ChangeLog.3 and gitlog-to-changelog.
* configure.ac (AC_CONFIG_SRCDIR): Use 'lib/autoconf/autoconf.m4'
instead of 'ChangeLog' as the sentinel file.
* .gitignore: Add ChangeLog.
2012-01-17 09:18:58 +01:00
Stefano Lattarini
46c04f8009 cosmetics: fix some typos in ChangeLog 2012-01-15 19:11:41 +01:00
Jim Meyering
e2816169d5 getopt: refine syntax of previous change
* lib/Autom4te/General.pm (getopt): Use a more concise test.
2012-01-15 18:51:02 +01:00
Stefano Lattarini
c3797b86cc getopt: remove hack for special handling of "-" argument
Older versions of Getopt::Long acted bogusly and died when they
where configured with the 'bundling' flag and an argument '-' was
seen on the command line they were parsing.  That is no longer
the case though, and has not been for quite a long time: the bug
is no longer present in the 5.6.2 version of perl and the 2.25
version of Getopt::Long (and today, the latest versions of perl
and Getopt::Long are respectively 5.14.2 and 2.38).  The obsolete
workaround for that Getopt::Long bug can thus be removed from our
'getopt' function.

It is also worth noting that such a workaround was quite buggy
and brittle itself; for example, a command like this:
  "autom4te --output -"
would have caused the incorrect diagnostic:
  "autom4te: option `--output' requires an argument"
Much worse, a command like this:
  "autom4te --language=autoconf --output - configure.ac"
would have caused the standard input of autom4te to be processed
and copied into the 'configure.ac' file, deleting its pre-existing
content!  Surely not what a user would have expected.

After this change, a command like this:
  autom4te --language=autoconf --output - - <configure.ac >out
works as expected, processing the input from 'configure.ac' and
writing it to the 'out' file.

* lib/Autom4te/General.pm (use): Require perl version 5.6.2.
(getopt): Remove the old workaround.
2012-01-15 18:07:04 +01:00
Jim Meyering
75a5ef5c88 avoid new warning about undefined $ARGV[0]
* lib/Autom4te/General.pm (getopt): Avoid warning induced by
yesterday's change: $ARGV[0] may not be defined, e.g., when
invoked via autoreconf.
2012-01-15 17:16:52 +01:00
Stefano Lattarini
5bc3e85e91 getopt: fix diagnostic for missing mandatory option argument
Before this change, an incorrect command line usage:
  "autom4te --output"
triggered broken diagnostic like:
  "autom4te: unrecognized option `--output'"
instead of the expected and correct:
  "autom4te: option `--output' requires an argument"

* lib/Autom4te/General.pm (getopt): Give correct diagnostic in
case of usage errors due to missing arguments for options for
which they are mandatory.  Code basically copied from automake's
'parse_arguments' private subroutine.
2012-01-14 19:04:32 +01:00
Paul Eggert
28fd1f4aa4 doc: mention Bash 2.03 bug with backslash-newline
* doc/autoconf.texi (Invoking the Shell): New section.
(Backslash-Newline-Empty): Rename from Backslash-Newline-Newline.
Mention problem with Bash 2.03.
2012-01-05 12:33:05 -08:00
Paul Eggert
3b4b3ee585 doc: clarify sed buffer limit
* doc/autoconf.texi (Limitations of Usual Tools):
That 4000-byte limit applies to output and internal buffers, too.
2012-01-05 12:33:05 -08:00
Paul Eggert
b69f4c2834 maint: update copyright year
All files changed to add 2012, via 'make update-copyright'.
2012-01-04 00:20:24 -08:00
Paul Eggert
9b939481e6 maint: resync upstream files
* ChangeLog, GNUmakefile, build-aux/announce-gen:
* build-aux/config.guess, build-aux/config.sub, build-aux/gendocs.sh:
* build-aux/git-version-gen, build-aux/move-if-change:
* build-aux/texinfo.tex, build-aux/update-copyright:
* build-aux/vc-list-files, doc/fdl.texi, doc/gendocs_template:
* doc/standards.texi, lib/Autom4te/XFile.pm, m4/autobuild.m4:
Regenerated by 'make fetch'.
2012-01-04 00:20:24 -08:00
Paul Eggert
afd2a0d7f3 autoconf: remove " -link" and ")" from xlf output
* lib/autoconf/fortran.m4 (_AC_PROG_FC_V_OUTPUT):
Also remove " -link" and trailing ")" from xlf output.
Problem and fix reported by Thomas Jahns in
<http://lists.gnu.org/archive/html/bug-autoconf/2012-01/msg00000.html>.
2012-01-02 11:22:46 -08:00
Paul Eggert
9663eea509 Do not use "win" to refer to Microsoft Windows. 2012-01-01 15:26:39 -08:00
Stefano Lattarini
b5832028b6 configure: will re-execute with $CONFIG_SHELL, if it's set
* lib/m4sugar/general.m4 (_AS_DETECT_BETTER_SHELL): Define the macro
`_AS_FORCE_REEXEC_WITH_CONFIG_SHELL' to `yes', so that the code in
`_AS_DETECT_BETTER_SHELL' will cause autoconf-generated configure
scripts to always re-execute themselves with $CONFIG_SHELL, if it's
set in the environment.
* doc/autoconf.texi (config.status Invocation): Update.
* doc/install.texi (Defining Variables): Likewise.
* NEWS: Likewise.
* tests/m4sh.at: Add tests for the new semantics in ...
(Configure re-execs self with CONFIG_SHELL): ... this new
test group.
2011-12-26 22:17:54 +01:00
Stefano Lattarini
eee6c2224d m4sh: allow forced re-execution with $CONFIG_SHELL, if it's set
* lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): If the m4sh client
has defined the macro `_AS_FORCE_REEXEC_WITH_CONFIG_SHELL' to
"yes", emit code to always re-execute the current script with
$CONFIG_SHELL, if that's set.
* tests/m4sh.at: Add tests for the new and old semantics, in ...
(Re-exec with CONFIG_SHELL, Forced re-exec with CONFIG_SHELL): ...
these new test groups.
2011-12-26 22:15:38 +01:00
Stefano Lattarini
8fb1aafa0d m4sh: refactor _AS_DETECT_BETTER_SHELL, for future changes
* lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Move code to
handle the re-execution of the shell ...
(_AS_REEXEC_WITH_SHELL): ... in this new macro.
2011-12-26 22:09:34 +01:00
Stefano Lattarini
d1b31ac57c docs: issue with shell functions and here-documents on Solaris
* doc/autoconf.texi (Here-Documents): Using a command substitution
in a here-documents being fed to a shell function is unportable.

Problem revealed by the automake testsuite:
<http://lists.gnu.org/archive/html/automake-patches/2011-12/msg00149.html>
2011-12-26 11:33:41 +01:00
Paul Eggert
17ea0df46f AS_LN_S: fall back on 'cp -pR' (not 'cp -p') if 'ln -s' fails
This works better for symlinks to directories.
Problem reported by Eli Zaretskii via Werner Lemberg in
<http://lists.gnu.org/archive/html/bug-autoconf/2011-12/msg00006.html>.
* NEWS:
* doc/autoconf.texi (Particular Programs): Document this.
* lib/m4sugar/m4sh.m4 (_AS_LN_S_PREPARE): Implement this.
2011-12-26 00:35:06 -08:00
Paul Eggert
b854606885 AC_LANG_BOOL_COMPILE_TRY(C): port to g++ with warnings
* lib/autoconf/c.m4 (AC_LANG_BOOL_COMPILE_TRY(C)): Use the
array as well as setting it, to pacify g++.  Reported by
Werner Lemberg in
<http://lists.gnu.org/archive/html/autoconf/2011-12/msg00005.html>.
2011-12-07 22:41:36 -08:00
Paul Eggert
a8942db4d7 doc: document GNU make's \#
* doc/autoconf.texi (Comments in Make Macros): Also mention \#
in the right hand side of a macro, as an unportable usage.
2011-12-05 14:21:44 -08:00
Eric Blake
7aae67fbef doc: tweak previous commit
* doc/autoconf.texi (Limitations of Builtins) <export>: Give
concrete example of offender, and drop redundant text.
Reported by Stefano Lattarini.

Signed-off-by: Eric Blake <eblake@redhat.com>
2011-11-11 14:19:04 -07:00
Eric Blake
2f3cec7dfc doc: mention export portability hint
* doc/autoconf.texi (Limitations of Builtins) <export>: Document
export limitation.
Suggested by Bruno Haible.

Signed-off-by: Eric Blake <eblake@redhat.com>
2011-11-11 13:51:33 -07:00
Stefano Lattarini
bd962acf3e fortran: define $GFC to "yes" if $FC is a GNU compiler
* lib/autoconf/fortran.m4 (AC_PROG_FC): Define `$GFC' to "yes" if
the detected fortran compiler is a GNU compiler, define it to the
empty string otherwise.
This is mostly for consistency for what is done for the C, C++
and Fortran 77 compilers.
* doc/automake.texi: Update.
2011-10-21 14:00:36 +02:00
Eric Blake
48a51ddb08 admin: mention recent copyright assignments
* AUTHORS: Update list.

Signed-off-by: Eric Blake <eblake@redhat.com>
2011-10-13 14:51:29 -06:00
Stefano Lattarini
e0cb97afda docs: we prefer US English spelling over British one
* doc/autoconf.texi (Parallel Make): Prefer `behavior' over
`behaviour' in a couple of places.
2011-10-06 10:40:23 +02:00
Stefano Lattarini
f60916593d docs: some fixlets in section about shell signal handling
* doc/autoconf.texi (Signal handling): Rename ...
(Signal Handling): ... to this, for consistency with other node
names.  Fix some typos and grammaros.  Add more URL references
in comments.
2011-10-06 10:35:48 +02:00
Stefano Lattarini
124d6e9d96 docs: korn shells can have $? > 256 for signal-terminated children
Some Korn shells, when a child process dies due to signal number
n, can leave in $? an exit status of 256+n, instead of the more
common 128+n.  See also Austin Group issue 0000051:
  <http://www.austingroupbugs.net/view.php?id=51>

* doc/autoconf.texi (Signal handling): Document the described Korn
Shell behaviour, and some of its possible shortcomings.

Suggestion by Eric Blake.
2011-10-06 10:34:14 +02:00
Eric Blake
00f569ae0c docs: relax documentation license by dropping cover text
See https://lists.gnu.org/archive/html/bug-diffutils/2011-08/msg00022.html
for precedence in diffutils.  The autoconf manual, as of this commit,
was still barely below 400 pages.

* doc/autoconf.texi (copying): Drop front- and back-cover texts.
* NEWS: Document this.
Reported by Brian Gough.

Signed-off-by: Eric Blake <eblake@redhat.com>
2011-09-26 12:02:35 -06:00
Stefano Lattarini
cff03ec71f docs: signal-related bugs and incompatibilities for the shells
* doc/autoconf.texi (Signal handling): New paragraph.
(@menu at "Portable Shell", @detailmenu): Update.

Motivated by recent discussion on the bug-autoconf list, as well
as work in the automake testsuite:
 <https://lists.gnu.org/archive/html/bug-autoconf/2011-09/msg00003.html>
 <https://lists.gnu.org/archive/html/bug-autoconf/2011-09/msg00004.html>
 <http://lists.gnu.org/archive/html/automake-patches/2011-09/msg00066.html>
2011-09-20 18:10:19 +02:00
Eric Blake
f37c5e315c docs: refer to correct AC_RUN_IFELSE parameter name
The docs referred to @var{program}, which did not exist.

* doc/autoconf.texi (Runtime) <AC_RUN_IFELSE>: Fix wording.
Reported by Reuben Thomas.

Signed-off-by: Eric Blake <eblake@redhat.com>
2011-09-19 10:59:14 -06:00
Eric Blake
2a9b772222 docs: fix typo in shell example
* doc/autoconf.texi (Shell Substitutions): Fix typo.
* THANKS: Update.
Reported by Nick Bowler.

Signed-off-by: Eric Blake <eblake@redhat.com>
2011-09-16 13:37:38 -06:00
Stefano Lattarini
19951ff75b docs: more details about make VPATH rewriting woes
* doc/autoconf.texi (Automatic Rule Rewriting): Solaris make
VPATH rewriting applies to any whitespace-separated word in a
rule, so it might apply also to shell variables, functions
and keywords (and automake has already tripped on this once);
document this, with an example.  Since we are at it, do some
minor reformatting of existing text.
2011-09-16 10:21:14 +02:00
Stefano Lattarini
7b49187003 docs: document Solaris 10 /bin/ksh and XPG4 sh 'unset' bug
* doc/autoconf.texi (Limitations of Builtins): Solaris 10 ksh
and XPG4 sh also fails upon `unset' of a variable that is not
set.
2011-09-13 16:24:41 +02:00
Jim Meyering
7a615729c9 docs: improve the prose describing _AC_CHECK_TYPE_NEW_BODY
* lib/autoconf/types.m4 (_AC_CHECK_TYPE_NEW_BODY): Improve prose.
2011-09-01 20:25:32 +02:00
Paul Eggert
54c726aa5c AC_C_CONST: don't reject gcc -Werror -Wall
* lib/autoconf/c.m4 (AC_C_CONST): Don't reject gcc when it is used
with -Werror -Wall during configuring.  It's unwise to use GCC
that way, but apparently enough people do it nowadays that it's an
issue.  These days nobody uses the old compilers that the old
tests reject, so we can't test this fix against them, but it's
more important to work with modern GCC (even when misused) than to
work with no-longer-used compilers.  Problem reported by Shevek in
<http://lists.gnu.org/archive/html/bug-autoconf/2008-11/msg00007.html>
and raised again by Dan Kegel in
<http://lists.gnu.org/archive/html/bug-autoconf/2011-08/msg00020.html>.
2011-08-31 23:16:41 -07:00
Stefano Lattarini
96cdf32954 docs: other issues with parallel BSD make
Motivated by automake bug#9245:
 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9245>
and FreeBSD PR bin/159730:
 <http://www.freebsd.org/cgi/query-pr.cgi?pr=159730>

* doc/autoconf.texi (Parallel Make): Document other BSD make
incompatibilities.  Reorganize the existing related documentation
accordingly.
2011-08-18 21:08:13 +02:00
Stefano Lattarini
f36755ebbb docs: fix minor typos
* doc/autoconf.texi (Shell Functions): Fix a couple of minor typos.
2011-08-08 22:19:19 +02:00
Stefano Lattarini
4b75742acc docs: another Solaris sh bug with redirected `:'
* doc/autoconf.texi (File Descriptors): Solaris 10 /bin/sh
"optimizes" away redirected `:' commands in a shell function
after the first call.
2011-08-04 15:13:26 +02:00
Paul Eggert
0ff6eaebd9 docs: modernize treatment of ns-resolution timestamps
* doc/autoconf.texi (Limitations of Usual Tools): ns-resolution time
stamps are now routinely supported by coreutils 'cp' etc.
2011-07-31 00:54:52 -07:00
Paul Eggert
db2f2e0b6b * lib/autoconf/specific.m4 (AC_SYS_LARGEFILE): Port to Mac OS X 10.5
by defining _DARWIN_USE_64_BIT_INODE.  Imported from gnulib.
2011-07-30 13:01:47 -07:00
Paul Eggert
c35cade05f * lib/autoconf/specific.m4 (AC_USE_SYSTEM_EXTENSIONS): Quote cleanly.
This is imported from gnulib.  gnulib also has an HP-UX 11.11 fix, but
let's see if we can do that another way, as it's pretty heaviweight.
2011-07-30 13:01:46 -07:00
Eric Blake
4d2efc4563 docs: fix minor doc problems
* doc/autoconf.texi (Why Not Imake): Fix grammar.
(autoreconf Invocation): Fix short option for --version.
* THANKS: Update.
Reported by Christophe Jarry and Russ Allbery.

Signed-off-by: Eric Blake <eblake@redhat.com>
2011-07-22 07:04:21 -06:00
Mike Frysinger
5285ea8c1a AC_REQUIRE: include FAQ URL when warning about duplicate expansion
Signed-off-by: Mike Frysinger <vapier@gentoo.org>

2011-07-11  Mike Frysinger  <vapier@gentoo.org>

	* lib/m4sugar/m4sugar.m4 (_m4_require_check): Add URL to warning.
2011-07-15 14:30:18 -06:00
Benoit Sigoure
855ce07e29 docs: fix typo in AC_PATH_PROG
* doc/autoconf.texi (Erlang Compiler and Interpreter):
s/AC_PROG_PATH/AC_PATH_PROG/.
* THANKS: Update.

Signed-off-by: Eric Blake <eblake@redhat.com>
2011-07-12 15:17:09 -06:00
Paul Eggert
52581e00dc * tests/semantics.at (AC_REPLACE_FUNCS): Test for just-fixed bug. 2011-06-30 09:14:43 -07:00
Timo Kamph
8c18ccff3a * lib/autoconf/functions.m4 (_AC_REPLACE_FUNCS): Fix tr-cpp problem.
See http://lists.gnu.org/archive/html/bug-autoconf/2011-06/msg00058.html
2011-06-30 09:14:42 -07:00
Paul Eggert
6cd9f12520 * lib/autoconf/functions.m4 (_AC_LIBOBJ_ALLOCA): Be even smarter.
GCC was too smart for the previous patch.  See
<http://lists.gnu.org/archive/html/bug-autoconf/2011-06/msg00035.html>.
2011-06-19 22:33:29 -07:00