On 23/06/2021, Peter Johansson <troj...@gmail.com> wrote: > > On 24/6/21 3:02 am, Werner LEMBERG wrote: >>> As far as I know there is no way to disable this behaviour, although >>> I agree the automagic file inclusion can be a bit funky. >> Yeah, it would be nice to have a means to control that. > > There is the dist hook, which can be used to remove files from the > distribution, but seems dangerous to exclude files from the tarball that > are mentioned in the Makefile.
Yes it is really not a good solution in this case. The file is detected at "automake" time and the rule to distribute texinfo.tex is baked into the generated Makefile.in. That then gets bundled up into the tarball. If you simply delete texinfo.tex in a dist-hook rule, users will not be able to run "make dist" from the tarball. This is one of the things tested by "distcheck" so that should hopefully catch it. My suggestion, if accidental inclusion of texinfo.tex is really a serious problem, is to use distcheck-hook and simply fail the check if texinfo.tex is present in distdir. Cheers, Nick