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. 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? Bruno