automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Incorrect directory creation with 'make dist' and EXTRA_DIST


From: Sander Niemeijer
Subject: Re: Incorrect directory creation with 'make dist' and EXTRA_DIST
Date: Thu, 5 Jan 2006 11:10:32 +0100

Hi,

On 4-jan-2006, at 21:00, Stepan Kasal wrote:

Hello,

On Wed, Jan 04, 2006 at 06:12:11PM +0100, Sander Niemeijer wrote:
distdir: $(DISTFILES)
        $(am__remove_distdir)
        mkdir $(distdir)
--->    $(mkdir_p) $(distdir)/$(top_srcdir)/data

The problem is caused by the following line in Makefile.am:

        EXTRA_DIST = $(top_srcdir)/data/foo.txt

There are two possible answers:

1)  The patch attached to this mail fixes it.

The patch works. thanks!

2)  Please use
        EXTRA_DIST = data/foo.txt
Automake finds the fine in the src tree.

If you are using this in a Makefile.am, then use
        EXTRA_DIST = ../../data/foo.txt
or
        EXTRA_DIST = $(top_builddir)/data/foo.txt
It is a bit counter-intuitive: top_builddir always expands to
a relative path, so the above mkdir works.

In the example I provided this would indeed work, but in the package where I first encountered the problem we use the top_srcdir prefix for files that we need as input during the build process for a custom build step. Since I do not know how to handcraft the nifty first-look- in-buildir-then-in-srcdir reference to these files in my Makefile.am I just reference these files from the source location (i.e. using top_srcdir). This way, separate builddir builds still work.

I have thought about using different references to the files for EXTRA_DIST (using top_builddir) and our custom build step (using top_srcdir), but this would introduce some nasty inconsistency if by accident one of the files ended up in the build dir (we would then be building using the one in top_srcdir, but shipping the one in top_builddir).

Best regards,
Sander







reply via email to

[Prev in Thread] Current Thread [Next in Thread]