Subject: "make dist" fails if more than two compression formats are used

From: Stefano Lattarini <[email-masked]>
Date: Fri, 06 Jan 2012 20:18:42 +0100

Severity: grave

If I try to run "make dist" from an autoamke master checkout, I see this error:

  tardir=automake-1.11a && ${TAR-tar} chof - "$tardir" \
    | XZ_OPT=${XZ_OPT--e} xz -c >automake-1.11a.tar.xz
  ## The distdir gets removed ##
  ... rm -fr "automake-1.11a" ...
  ## And then make tries to tar it again ##
  tardir=automake-1.11a && ${TAR-tar} chof - "$tardir" \
    | GZIP=--best gzip -c >automake-1.11a.tar.gz
  ## Failure ensues
  tar: automake-1.11a: Cannot stat: No such file or directory
  tar: Exiting with failure status due to previous errors

This is pretty bad.  What is even worse is that the error is very likely to go
unnoticed (it has until now), since, due to implementation reasons, the `tar'
failure isn't reflected in the exit status of "make dist".

I will try to follow-up on this soonish.

Regards,
  Stefano