bug-automake
[Top][All Lists]
Advanced

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

Re: "files left in build directory" problem


From: Alexandre Duret-Lutz
Subject: Re: "files left in build directory" problem
Date: Sun, 17 Nov 2002 20:36:11 +0100
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-debian-linux-gnu)

>>> "James" == James R Van Zandt <address@hidden> writes:

[...]

 James> In my case, the three listed files are created by clig, a tool the
 James> maintainer must have but the user may not.  Therefore, they
 James> should be included in the distribution. 

Ok, if they are distributed they are in the source directory.

The diagnostic says "left in build directory".  So that means
your distributed files were rebuilt.  Obviously that's bad,
since rebuilding these files requires a tool that the user
may not have.

[...]

 James> Eventually I changed that second line to:
 James> DISTCLEANFILES=duster.1 cmdline.c cmdline.h

 James> Now, "make distcheck" succeeds, and the distribution still includes
 James> the three files.  However, "make distclean" will remove them.  That's
 James> inconsistent.

Indeed.  DISTCLEANFILES is not what you want, since you
distribute the files.

 James> I think there are several bugs here.  I suggest:

 James> 1. The "files left in build directory" error message
 James> should be quoted in the documentation, along with a
 James> discussion of likely causes and cures.

I agree.
   
 James> 2. Files listed in BUILT_SOURCES should automatically be
 James> removed by "make distclean", without having to be listed
 James> in DISTCLEANFILES too.

This doesn't always make sense, because BUILT_SOURCES can be distributed.

[...]

 James> Or am I missing something here?

If you ditribute a file, it should not depends on
non-distributed built files.

 James> EXTRA_DIST=duster.lsm.in duster.spec.in cmdline.cli.in

You haven't explained how cmdline.cli is built, so from the
above line I'll assume that config.status builds cmdline.cli
from cmdline.cli.in.

If that's the case, every time the user run ./configure,
cmdline.in is recreated...

[...]

 James> cmdline.c cmdline.h: cmdline.cli
 James>         clig cmdline.cli

... therefore this rule is always fired (Obviously that's not
what you want, since the user doesn't have `clig' installed.)

One solution would be to depend on cmdline.cli.in instead.

  cmdline.c cmdline.h: cmdline.cli.in
        clig cmdline.cli

Or more safely

  cmdline.c cmdline.h: cmdline.cli.in
        $(MAKE) cmdline.cli  # in case it was erased
        clig cmdline.cli

  cmdline.cli: config.status
        ./config.status cmdline.cli

Not sure if I'm clear.  See also the following answer to a
similar issue.

  http://mail.gnu.org/pipermail/bug-automake/2002-September/000805.html

-- 
Alexandre Duret-Lutz





reply via email to

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