Subject: Re: bug#53780: Automake failing with conditional AC_CONFIG_FILES

From: Nick Bowler <[email-masked]>
Date: Sun, 20 Feb 2022 02:59:53 -0500

On 2022-02-20, Mike Frysinger <[email-masked]> wrote:
> can you link to the project/source ?  the snippet you posted isn't
> complete, and adding a few more lines doesn't cause automake crash for me.

Here is a minimal reproducer:

  % cat >configure.ac <<'EOF'
  AC_INIT([test], [0])
  AM_INIT_AUTOMAKE([foreign])
  AC_CONFIG_FILES([x:y z])
  AC_OUTPUT
EOF

  % touch x.am
  % touch z.am
  % autoreconf -is
  configure.ac:2: installing './install-sh'
  configure.ac:2: installing './missing'
  automake-1.16: error: x:y in @other_input_files
  [...]

Critically, both x.am and z.am files are required to exist to
reproduce the crash.

The "x" output should be ignored by Automake (since its input
filename, "y", does not end in ".in") but it apparently slightly
confused by the existence of the (should not be used) x.am in the
source tree.

I think this crash will, in practice, only ever happen due to
serious mistakes in configure.ac (i.e., I believe the reporter
has used AC_CONFIG_FILES with the wrong filenames).

Cheers,
  Nick