Subject: bug#14079: Absolute Paths In EXTRA_DIST will cause "make distcheck" failure.

From: Stefano Lattarini <[email-masked]>
Date: Sat, 20 Apr 2013 17:32:00 +0200

severity 14079 minor
stop

Hi Mostafa.  Thanks for the report, and sorry for the shameful delay.

On 03/28/2013 08:11 AM, Mostafa wrote:
> Hello,
> 
> Absolute paths in EXTRA_DIST will cause "make distcheck" failure.
>
Yes, Automake doesn't really support distributing files outside the
source tree and the build tree [1].  While that might work, it is more
by accident than by design; we should make the users aware of this fact.

  [1] Unless you write a careful 'dist-hook' target yourself.

> Attached is a set of files to reproduce the error. The description of how
> to reproduce the error and my analysis of why it occurs can be found in
> "$(top_srcdir)/build_autotools/README".
>
Thank you for taking time to do that.  I'll copy and paste the most relevant
part of your analysis, for reference:

    If you look at the above generated Makefile you see that the data structure
    "dist_files" is populated using the variables from EXTRA_DIST by stripping
    prefixes from those variables that match "$(srcdir)" and "$(top_srcdir)",
    but not their absolute path variants. Hence the following fails when
    executed because "$$file" expands to an absolute path and "$$d" expands
    to ".":
      cp -p $$d/$$file "$(distdir)/$$file"

> Please note that nowhere in the automake documentation does it say one
> cannot use absolute paths in EXTRA_DIST.
> 
Perhaps we should enhance the documentation (esp. section 14, "What Goes in
a Distribution") to make this Automake limitation clearer.  Care to attempt
a patch.  Otherwise I'll get to it, eventually (hopefully soon).

> Thanks,
> Mostafa

Best regards,
  Stefano