Commit Graph

332 Commits

Author SHA1 Message Date
Paul Eggert
ef27f692a0 make update-copyright 2022-05-19 13:57:38 -07:00
Zack Weinberg
f060c7e5fd
Rewrite bin/autoconf in Perl.
Of all the installed programs (autoconf, autoheader, autom4te,
autoreconf, autoscan, autoupdate, ifnames) autoconf is the only one
that is a shell script instead of a Perl script.  This means it has to
do a lot of fiddly quoting and requoting to assemble an autom4te
command line, it doesn’t get to use the shared option handling code in
Autom4te/{General,Getopt}.pm, and it has to duplicate usage text that
properly should only be in Autom4te/ChannelDefs.pm.  It also means
there’s extra code in build-aux/help-extract.pl just for it, and a
special two-phase generation process in bin/local.mk.

This also paves the way for the bootstrap script mentioned in the
previous commit; it will only have to know how to deal with
substitution variables, not generation of m4sh scripts.

The new script winds up being slightly longer on disk but that’s
because our boilerplate for Perl scripts is quite long.  The code is
visibly simpler.

* bin/autoconf.as: Rename to bin/autoconf.in and rewrite in Perl.
* bin/local.mk (EXTRA_DIST): Change autoconf.as to autoconf.in.
  (MOSTLYCLEANFILES): Don’t delete autoconf.in.
  (bin/autoconf.in): Delete rule.
  (ETAGS_PERL): Add autoconf.in and sort list.
  (ETAGS_SH): Delete, no longer needed.
* tests/tools.at: Syntax-check autoconf as a Perl script.

* build-aux/help-extract.pl: Remove all code for extracting usage text
  from shell scripts.
* man/autoconf.w, man/local.mk: Refer to autoconf.in, not autoconf.as.
2021-09-15 14:02:41 -04:00
Zack Weinberg
300349c84b
make update-copyright 2021-01-28 15:19:21 -05:00
Zack Weinberg
9b5c0f1774
Generate manpages directly from source code.
We generate manpages for autoconf’s installed programs (autoconf,
autoheader, etc.) using help2man, which runs each program in order to
learn its --help output.  Each manpage therefore has a dependency on
the existence of the corresponding program, but this dependency is
intentionally left out of the Makefile so that one can build from a
tarball release (which will include prebuilt manpages) without having
help2man installed.

But when building from a git checkout with high levels of
parallelism (-j20 or so), the missing dependency can lead to build
failures, because help2man will try to run the program before it
exists.  In an earlier patch I tried to work around this with a
recursive make invocation in the ‘.x.1’ rule, to ensure the existence
of the program.  That only traded one concurrency bug for another, now
we could have two jobs trying to build the same program simultaneously
and they would clobber each other’s work and the build would still
fail.

Instead, this patch introduces a utility script ‘help-extract.pl’ that
reads --help and --version information directly from the source code
for each program.  This utility, wrapped appropriately for each
program, is what help2man now runs.  Usage is a little weird because
help2man doesn’t let you specify any arguments to the “executable”
that it runs, but it works, and lets us write all of the true
dependencies of each manpage into the Makefile without naming any file
that would be created during a build from a tarball.  help-extract.pl
is a Perl script, so it introduces no new build-time requirements.

A downside is that we have to make sure each of the script sources in
bin/, and also part of lib/Autom4te/ChannelDefs.pm, are parseable by
help-extract.  The most important constraints are that the text output
by --help must be defined in a global variable named ‘help’, and its
definition has to be formatted just the way these definitions are
currently formatted.  Similarly for --version.  Furthermore, only some
non-literal substitutions are possible in these texts; each has to be
explicitly supported in help-extract.pl.  The current list of supported
substitutions is $0, @PACKAGE_NAME@, @VERSION@, @RELEASE_YEAR@, and
Autom4te::ChannelDefs::usage.

The generated manpages themselves are character-for-character
identical before and after this patch.

 * build-aux/help-extract.pl: New build script that extracts --help
  and --version output from manpages.

 * man/autoconf.w, man/autoheader.w, man/autom4te.w, man/autoreconf.w
 * man/autoscan.w, man/autoupdate.w, man/ifnames.w: New shell scripts
   which wrap build-aux/help-extract.pl.

 * man/local.mk: Generate each manpage by running help2man on the
   corresponding .w script, not on the built utility itself.
   Revise all dependencies to match.

 * bin/autoconf.as: Rename ‘usage’ variable to ‘help’ and
   ‘help’ variable to ‘usage_err’.
 * bin/autoheader.in: Call Autom4te::ChannelDefs::usage with no
   function-call parentheses, matching all the other scripts.
 * bin/autom4te.in: Initialize $version with a regular double-quoted
   string, not a heredoc, matching all the other scripts.
 * bin/autoscan.in: Remove global variable $configure_scan.
2020-08-21 16:23:32 -04:00
Zack Weinberg
acf6fb022b
Fix ‘make distcheck’ failure due to generated manpages in build dir.
If we are doing a VPATH build and we generate the manpages,
they will be written to the build directory, and should be
deleted by ‘make distclean’; ‘make distcheck’ fails if this
is not done.  However, if we are doing a build in the source
directory, the manpages might have been shipped to us and we
should *not* delete them in ‘make distclean’.

Correction to 5d3c99e562.

* man/local.mk (distclean-local-man): New rule.  Delete $(dist_man_MANS)
  in VPATH builds only.
  (MOSTLYCLEANFILES, .x.1): Don’t use globs to decide what to delete.
2020-08-21 13:53:18 -04:00
Zack Weinberg
5d3c99e562
Generate manpages in build directory.
It is not necessary to generate the manpages in the source directory
during a split build; ‘make dist’ can still find them in the build
directory and put them in the tarball.

Also add some defensive logic to the .x.1 rule to ensure that
bin/command and tests/command exist before generating man/command.1.
Without this, if you do a sufficiently parallel build, help2man may
generate the manpage from an older installed copy of ‘command’.
(Ideally, we wouldn’t have to run ‘command’ at all and this would not
be an issue, but ‘help2man’ doesn’t appear to support that.)

After this patch, the only files written to the source directory
during the ‘make’ phase of a split build (starting from a clean Git
checkout) are

doc/version.texi
doc/stamp-vti
doc/autoconf.info
doc/standards.info

These are not under our control, they’re being created by automake’s
built-in rules for Texinfo documentation.

* man/local.mk: Replace all instances of $(mansrcdir) with literal ‘man’.
  (.x.1): Ensure that bin/command, tests/command, and the man
  directory exist before creating man/command.1.
2020-08-18 16:32:33 -04:00
Jim Meyering
d78a7dd95f maint: make update-copyright 2020-01-01 11:45:50 -08:00
Paul Eggert
d3dcd5895d Prefer HTTPS to FTP and HTTP 2017-09-16 17:48:51 -07:00
Jim Meyering
60460b91d0 maint: update copyright dates for 2017
* all files: Run "make update-copyright".
* doc/autoconf.texi: Update manually.
2017-01-01 05:18:32 -08:00
Paul Eggert
04be2b7a29 Move config.* man pages to its source tree
Suggested by Ben Elliston in:
https://lists.gnu.org/archive/html/autoconf-patches/2015-11/msg00000.html
* man/config.guess.x, man/config.sub.x: Remove.
* NEWS: Mention this.
* man/local.mk (dist_man_MANS): Remove them.
($(mansrcdir)/config.guess.1, $(mansrcdir)/config.sub.1): Remove rules.
2016-02-06 17:17:50 -08:00
Paul Eggert
bbfa63cd4a maint: make update-copyright 2016-02-06 17:17:49 -08:00
Paul Eggert
7b13e39a11 maint: bump copyright to 2015
* all files: Run 'make update-copyright'.
2015-01-02 13:03:39 -08:00
Eric Blake
a610501ded maint: bump copyright to 2014
Done via 'make update-copyright', since all files are effectively
modified and distributed this year via public version control.

* all files: Update copyright year.
2014-01-01 16:27:53 -07:00
Stefano Lattarini
ef573a26aa build: remove last make recursion (for subdir 'man')
* Makefile.am (SUBDIRS): Remove (its last component 'man' has just
been removed).
(SUFFIXES): New, defined to empty, to be updated later by included
files.
($(srcdir)/man/local.mk): Include this.
* configure.ac (AC_CONFIG_FILES): Drop 'man/Makefile'.
* lib/freeze.mk (SUFFIXES): Extend with '+=' rather than defining
with '='.
* man/Makefile.am: Rename ...
* man/local.mk: ... like this, and adjust throughout.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
2013-05-06 12:50:07 +02:00
Pavel Raiskup
14b88dee02 docs: configure.in still mentioned in manpages
* man/autoupdate.x: Mention configure.ac as preferred name.
* man/autoscan.x: Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
2013-03-05 07:44:31 -07:00
Eric Blake
fbaee459bf maint: bump copyright to 2013
Done via 'make update-copyright', since all files are effectively
modified and distributed this year via public version control.

* all files: Update copyright year.
2013-01-03 14:58:52 -07:00
Jim Meyering
40c846ea9c maint: remove empty lines at EOF
* man/autoconf.x: Remove empty line at EOF.
* man/autoheader.x: Likewise.
* man/autoscan.x: Likewise.
* man/autoupdate.x: Likewise.
* man/ifnames.x: Likewise.
* tests/compile.at: Likewise.
* doc/fdl.texi: Likewise.
2012-01-21 11:49:40 +01: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
Eric Blake
1864b1a3c4 maint: update copyright year
All files changed to add 2011, via 'make update-copyright'.

Signed-off-by: Eric Blake <eblake@redhat.com>
2011-01-04 16:34:06 -07:00
Eric Blake
b95a1aea40 Update copyright year.
All files changed to add 2010, via 'make update-copyright'.

Signed-off-by: Eric Blake <ebb9@byu.net>
2010-01-05 20:59:55 -07:00
Eric Blake
4cdf58d4f0 Simplify version control metadata.
* .cvsignore: Delete.
* bin/.cvsignore: Likewise.
* config/.cvsignore: Likewise.
* doc/.cvsignore: Likewise.
* lib/.cvsignore: Likewise.
* lib/autoconf/.cvsignore: Likewise.
* lib/Autom4te/.cvsignore: Likewise.
* lib/autoscan/.cvsignore: Likewise.
* lib/autotest/.cvsignore: Likewise.
* lib/emacs/.cvsignore: Likewise.
* lib/m4sugar/.cvsignore: Likewise.
* man/.cvsignore: Likewise.
* tests/.cvsignore: Likewise.
* bin/.gitignore: Likewise.
* build-aux/.gitignore: Likewise.
* config/.gitignore: Likewise.
* doc/.gitignore: Likewise.
* lib/.gitignore: Likewise.
* lib/autoconf/.gitignore: Likewise.
* lib/Autom4te/.gitignore: Likewise.
* lib/autoscan/.gitignore: Likewise.
* lib/autotest/.gitignore: Likewise.
* lib/emacs/.gitignore: Likewise.
* lib/m4sugar/.gitignore: Likewise.
* man/.gitignore: Likewise.
* tests/.gitignore: Likewise.
* .gitignore: Consolidate all rules into one file.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-08-17 06:50:43 -06:00
Eric Blake
1c69422d88 Update copyright.
* AUTHORS: Include 2009 in copyright.
* lib/Autom4te/C4che.pm: Likewise.
* lib/Autom4te/Channels.pm: Likewise.
* lib/Autom4te/Configure_ac.pm: Likewise.
* lib/Autom4te/FileUtils.pm: Likewise.
* lib/Autom4te/General.pm: Likewise.
* lib/Autom4te/Request.pm: Likewise.
* lib/Autom4te/Struct.pm: Likewise.
* lib/autoconf/Makefile.am: Likewise.
* lib/autoconf/autoconf.m4: Likewise.
* lib/autoconf/autoscan.m4: Likewise.
* lib/autoconf/autoupdate.m4: Likewise.
* lib/autoconf/functions.m4: Likewise.
* lib/autoconf/libs.m4: Likewise.
* lib/autoconf/oldnames.m4: Likewise.
* lib/autoconf/types.m4: Likewise.
* lib/autoscan/Makefile.am: Likewise.
* lib/autoscan/autoscan.pre: Likewise.
* lib/autotest/Makefile.am: Likewise.
* lib/autotest/autotest.m4: Likewise.
* lib/emacs/autoconf-mode.el: Likewise.
* lib/emacs/autotest-mode.el: Likewise.
* lib/freeze.mk: Likewise.
* lib/m4sugar/foreach.m4: Likewise.
* man/Makefile.am: Likewise.
* tests/atlocal.in: Likewise.
* tests/autoscan.at: Likewise.
* tests/foreign.at: Likewise.
* tests/fortran.at: Likewise.
* tests/mktests.sh: Likewise.
* tests/semantics.at: Likewise.
* tests/suite.at: Likewise.
* tests/wrapper.as: Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-08-14 07:31:43 -06:00
Eric Blake
1fda5799d3 Fix version number generation in man pages.
* Makefile.am (EXTRA_DIST): Distribute .version.
(.version): New rule.
* man/Makefile.am (common_dep): Depend on .version, not
configure.ac.
(.x.1): Use package name for version string.
* GNUmakefile [!_have-Makefile]: Sync from upstream, again.
* build-aux/git-version-gen: Sync from upstream.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-04-03 16:57:56 -06:00
Jim Meyering
576a8cbe13 Remove racy commands to build scripts in bin/ and tests/.
* man/Makefile.am (.x.1): Now that scripts in bin/ and tests/
are guaranteed to be built, remove the rules that tried to build
them.  Before, with a parallel build, these rules could lead to
two processes writing tests/wrapper.in concurrently.
2007-11-13 00:10:48 +01:00
Jim Meyering
7ffc555888 Remove all generated files from version control.
* aclocal.m4: Remove.
* configure: Remove.
* Makefile.in: Remove, along with all other Makefile.in in subdirs.
* .gitignore: Add aclocal.m4, configure and Makefile.in.  Sort.
* README-hacking: New file: how to build from just-checked-out sources.
2007-10-27 12:44:59 +02:00
Eric Blake
bf1af030e2 Prepare for conversion to git.
* doc/.cvsignore: Avoid multiple listings on one line.
* bin/.cvsignore: Likewise.
* .gitignore, bin/.gitignore, config/.gitignore, doc/.gitignore,
lib/.gitignore, lib/Autom4te/.gitignore, lib/autoconf/.gitignore,
lib/autoscan/.gitignore, lib/autotest/.gitignore,
lib/emacs/.gitignore, lib/m4sugar/.gitignore, man/.gitignore,
tests/.gitignore: New files, identical to .cvsignore counterpart.
2007-09-14 22:25:56 +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
Paul Eggert
db296b921d Add *.1. 2006-12-12 00:10:51 +00:00
Paul Eggert
b1bfe8005e Remove from CVS, as these files are generated automatically. 2006-12-11 06:37:18 +00:00
Paul Eggert
6c4b6b50d8 Regenerate. 2006-11-27 21:39:32 +00:00
Paul Eggert
a3787fd48a * Makefile.am: Put only a single '#' into the copyright notice,
so that it's also present in the output file.  Standardize wording
in makefile copyright notices to match GNU coding standards.
* bin/Makefile.am: Likewise.
* doc/Makefile.am: Likewise.
* lib/Makefile.am: Likewise.
* lib/freeze.mk: Likewise.
* lib/autoconf/Makefile.am: Likewise.
* lib/autoscan/Makefile.am: Likewise.
* lib/autotest/Makefile.am: Likewise.
* lib/m4sugar/Makefile.am: Likewise.
* man/Makefile.am: Likewise.
* tests/Makefile.am: Likewise.
* lib/emacs/Makefile.am: Remove copyright notice; it's just a
one-line file.
2006-11-27 21:35:37 +00:00
Paul Eggert
642f78ba56 Regenerate. 2006-11-17 20:01:56 +00:00
Paul Eggert
d21ba2e216 Regenerate. 2006-11-17 19:05:17 +00:00
Paul Eggert
72fd6cd79b Regenerate. 2006-10-23 06:12: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
Ralf Wildenhues
9036eb5e0f Regenerate. 2006-09-20 18:04:17 +00:00
Eric Blake
18be0ccecf * m4/m4.m4: Change copyright.
* configure: Regenerate.
* Makefile.in: Likewise.
* bin/Makefile.in: Likewise.
* doc/Makefile.in: Likewise.
* lib/Makefile.in: Likewise.
* lib/Autom4te/Makefile.in: Likewise.
* lib/autoconf/Makefile.in: Likewise.
* lib/autoscan/Makefile.in: Likewise.
* lib/autotest/Makefile.in: Likewise.
* lib/emacs/Makefile.in: Likewise.
* lib/m4sugar/Makefile.in: Likewise.
* man/Makefile.in: Likewise.
* tests/Makefile.in: Likewise.
2006-09-20 03:08:08 +00:00
Paul Eggert
2db42f6613 Regenerate. 2006-08-24 22:57:30 +00:00
Paul Eggert
f2a9d6f3a7 Regenerate. 2006-08-24 22:57:30 +00:00
Paul Eggert
345806cfca Rework to use more-modern build style.
Many files are renamed; all uses of their names were changed.
* .x-sc_trailing_blank: Renamed from .x-sc_trailing_blank.
* .x-sc_useless_cpp_parens: New file.
* build-aux/config.guess: Renamed from config/config.guess.  Update.
* build-aux/config.sub: Renamed from config/config.sub.  Update.
* build-aux/elisp-comp: Renamed from config/elisp-comp.
* build-aux/install-sh: Renamed from config/install-sh.  Update.
* build-aux/mdate-sh: Renamed from config/mdate-sh.
* build-aux/missing: Renamed from config/missing.
* build-aux/texinfo.tex: Renamed from config/texinfo.tex.  Update.
* build-aux/vc-list-files: Renamed from config/vc-list-files.
* config/Makefile.am: Removed.
* config/mkinstalldirs: Removed.
* config/move-if-change: Removed.
* m4/m4.m4: Renamed from config/m4.m4.  Add (C) to copyright notice.
* Makefile.am (SUBDIRS): Remove config.
(ACLOCAL_AMFLAGS): Include from m4, not config.
(EXTRA_DIST): Add config/announce-gen, config/prev-version.txt.
(WGET, WGETFLAGS): New macros, since Makefile.maint no longer does this.
(autom4te-update): Rewrite with a loop.  Get from gnulib, not automake.
Fail if there's an error.
* Makefile.cfg (move_if_change): Remove.
(wget_files): Remove.
(cvs_executable_files): New macro.
(cvs_files): Use it.  Remove mkinstalldirs.  Add fdl.texi.
(executable-update): Use $(cvs_executable_files).
(local-checks-to-skip): Remove.
* Makefile.maint: Merge from coreutils, plus add our own changes
(gzip_rsyncable): New macro.
(GZIP_ENV): Use it.
(CVS_LIST): Use build-aux/vc-list-files.
(VERSION_REGEXP): New macro.
(local-checks-available): Add patch-check, $(syntax-check-rules),
check-AUTHORS.
(syntax-check-rules): Compute dynamically.
(sc_cast_of_x_alloc_return_value): Work even if no source files.
(sc_cast_of_alloca_return_value): Likewise.
(sc_prohibit_atoi_atof): Simplify regexp.
(sc_no_if_have_config_h, sc_require_config_h):
(sc_prohibit_assert_without_use,
(sc_obsolete_symbols): Check for O_NDELAY.
(sc_texi_notab): Remove.
(sc-changelog): Don't make an exception for '----' lines.
(.re-list): Remove, so we don't have a junk file behind.
(sc_system_h_headers): Remove the need for .re-list.
(sc_the_the):  New rule.
(sc_tight_scope): Simplify.
(sc_trailing_space): Renamed from sc_trailing_blank.
(longopt_re): New macro.
(sc_two_space_separator_in_usage): New rule.
(sc_unmarked_diagnostics): Look at all files under CVS.
(sc_useless_cpp_parens, patch-check, check-AUTHORS): New rules.
(news-date-check, changelog-check): Version is OK.
(po-check): Look for lib files even if not in CVS.
(copyright-check): Use $() not ``.
(maintainer-distcheck): Do not depend on changelog-check.
(my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
Also check for -Wpointer-arith.
(WGET, WGETFLAGS, tgz-md5, tgz-sha1, bz2-md5, bz2-sha1):
(xdelta-md5, xdelta-sha1, tgz-size, bz2-size, xd-size, rel-check):
Remove.
(announcement): Add --gpg-key-id arg.
(cvs-sv): Remove.
(move_if_change): Just use mv.
(local_updates: Remove wget-update, po-update.
(po_repo, do-po-update, po-update, wget_files, get-targets): Remove.
(config.guess-url_prefix, config.sub-url_prefix): Remove.
(ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
(standards.texi-url_prefix, make-stds.texi-url_prefix, target, url):
($(get-targets)): Remove.
(cvs_files): Remove missing, mkinstalldirs, ansi2knr.c.
(gnulib_repo): Renamed from automake_repo.  Get from gnulib now.
(cvs-update): Get from gnulib.
(emut_upload_commands): gnupload is in build-aux now.
(alpha beta major): Add changelog-check.  Check version.
* configure.ac (AC_CONFIG_AUX_DIR): Renamed from config to build-aux.
(AC_CONFIG_FILES): Remove.
* bin/autoconf.as: Add spaces to avoid distcheck warning.
* config/announce-gen: Sync from coreutils.
* doc/make-stds.texi: Sync from gnulib.
* doc/standards.texi: Likewise.
* man/Makefile.am: Adjust for config -> build-aux renaming.
* tests/Makefile.am: Prefer $(FOO) to @FOO@.
* tests/local.at: Adjust from config -> build-aux renaming.
* tests/tools.at: Likewise.
* tests/torture.at: Likewise.
2006-08-24 22:56:47 +00:00
Ralf Wildenhues
90da28049c * configure.ac (AC_INIT): Bump to 2.60a.
* NEWS: Update.
2006-06-23 19:09:49 +00:00
Ralf Wildenhues
10617792b4 Version 2.60.
* configure.ac, NEWS: Update.
2006-06-23 16:20:17 +00:00
Ralf Wildenhues
0b93a3e141 Regenerate. 2006-06-17 12:53:50 +00:00
Ralf Wildenhues
a86e30b368 * configure.ac (AC_INIT): Bump to 2.59e.
* NEWS: Update.
2006-06-05 13:32:11 +00:00
Paul Eggert
816f5f251e Regenerate. 2006-06-04 19:56:41 +00:00
Ralf Wildenhues
6d4fb5169a * bin/autoreconf.in ($help): Reword according to the manual.
Suggested by Olly Betts.
2006-05-18 06:50:35 +00:00
Ralf Wildenhues
334d111e9e * config/config.guess, config/config.sub, config/texinfo.tex,
doc/make-stds.texi, doc/standards.texi: Sync from upstream.
2006-05-17 02:15:30 +00:00
Ralf Wildenhues
fdd05f06b8 Regenerate. 2006-04-12 23:11:13 +00:00
Ralf Wildenhues
8acf1027fb Regenerate. 2006-04-07 19:02:18 +00:00