Hi all,

Ran across the following in Automake 1.5 which I believe is a bug.

If you include a directory in EXTRA_DIST that is in the build dir, it does 
not get included in the distribution.

For example when using the following Makefile.am:

EXTRA_DIST=foo

foo:
        mkdir foo
        touch foo/bar

When using the above and configuring with a different source and build
directory make distdir will fail with a file not found error.

We need to do this in one of our projects to include documentation that is
automatically generated as part of the distribution.

The problem is trivially fixed.  I tracked it down to a test -f being done
on DISTFILES in the distdir rule rather than test -f || test -d.  The 
following patch seems to fix the problem.

Index: lib/am/distdir.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/distdir.am,v
retrieving revision 1.20
diff -c -c -r1.20 distdir.am
*** distdir.am  2001/07/14 20:12:52     1.20
--- distdir.am  2001/09/18 04:04:05
***************
*** 61,67 ****
  ## for something like yacc output we will correctly pick up the latest
  ## version.
  ##
!         if test -f $$file; then d=.; else d=$(srcdir); fi; \
  ##
  ## Make the subdirectory for the file.  This is going to make `dist'
  ## really crawl, but it seems like the only way to do it, given that
--- 61,67 ----
  ## for something like yacc output we will correctly pick up the latest
  ## version.
  ##
!         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
  ##
  ## Make the subdirectory for the file.  This is going to make `dist'
  ## really crawl, but it seems like the only way to do it, given that
Dean Povey,              |em: [EMAIL PROTECTED]|  JCSI: Java security toolkit
Senior S/W Developer     |ph:  +61 7 3864 5120    | uPKI: Embedded/C PKI toolkit
Wedgetail Communciations |fax: +61 7 3864 1282    |       uASN.1: ASN.1 Compiler
Brisbane, Australia      |www: www.wedgetail.com  | XML Security: XML Signatures 

Reply via email to