[Top][All Lists]

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

Re: avoiding leftover built sources

From: Jim Meyering
Subject: Re: avoiding leftover built sources
Date: Sun, 21 Mar 2010 16:18:27 +0100

Bruno Haible wrote:
> Jim Meyering wrote:
>> It's the one in ../lib/fcntl.h that is the culprit.
>> And *it* was not removed via "make distclean"
>> since grep proper does not use the fcntl module.
>> There was also a lib/fcntl.in.h symlink.
>> ...
>> The solution was simply to remove the vestigial lib/fcntl.{,in.}h
> It looks like 'grep' was using the 'fcntl-h' (or 'fcntl') module
> earlier. This created the lib/fcntl.h and lib/fcntl.in.h that you were
> observing. At some point, then, changes in gnulib or in grep/bootstrap.conf
> caused these files to become stale and cause trouble. At this point, the
> 'distclean' rule in lib/Makefile.am was also changed to no longer remove
> lib/fcntl.h.

Yes, that was my conclusion, too.

> What can we do about it? I think gnulib-tool would already have removed
> lib/fcntl.in.h, but it would not have done anything about lib/fcntl.h.
>   a) bootstrap could call "make -k distclean 2>/dev/null" right at the
>      beginning.
>   b) When a module is not used any more and was used earlier, gnulib-tool
>      (and bootstrap, since it duplicates the logic) could look whether
>      the module has some MOSTLYCLEANFILES and, if so, remove these files,
>      keeping a backup, of course.
>   c) I think, gnulib-tool removes the file from .gitignore. So you could
>      have noticed the problem by looking at "git status".
> Solution a) seems the most reliable to be. What do you think?

This would be a less invasive change,
perhaps implied by your (c):

    d) make bootstrap warn, or even fail, when it finds a
       non-version-controlled .h file in lib/.

reply via email to

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