]> git.ipfire.org Git - thirdparty/autoconf.git/commit
Rewrite bin/autoconf in Perl.
authorZack Weinberg <zackw@panix.com>
Thu, 4 Feb 2021 16:14:37 +0000 (11:14 -0500)
committerZack Weinberg <zackw@panix.com>
Wed, 15 Sep 2021 18:02:41 +0000 (14:02 -0400)
commitf060c7e5fddfed8e27a55a6a777a1a6cf7c9eaac
treee14a1602a0c1ad7eae84d566c1e844e89167545b
parentaf5c11ed615dff6aa7cba9f98a7f1155e8856ef7
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.
.gitignore
bin/autoconf.as [deleted file]
bin/autoconf.in [new file with mode: 0644]
bin/local.mk
build-aux/help-extract.pl
man/autoconf.w
man/local.mk
tests/tools.at