autoconf/man/autoconf.w
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

5 lines
170 B
Bash
Executable File

#! /bin/sh
# help-extract wrapper, see build-aux/help-extract.pl and man/local.mk
exec "${PERL-perl}" "${top_srcdir}/build-aux/help-extract.pl" \
bin/autoconf.in "$@"