Bruno Haible <[EMAIL PROTECTED]> wrote: > Jim Meyering wrote: ... >> A missing feature: files supplied by gnulib-tool should be >> removed by "make maintainer-clean". If gnulib-tool doesn't >> do that soon, I'll be changing bootstrap to do it. > > It belongs in gnulib-tool, so please change gnulib-tool to do it! > Which is the set of files to be added to MAINTAINERCLEAN_FILES? > - All files copied on behalf of the modules should be included. > - Except lib/getloadavg.c which is needed at configure time. > - All generated Makefile.am and gnulib.mks should not be included, > because without them you cannot do "make" any more. > - gnulib-cache.m4 and gnulib-comp.m4 should not be included, IMO.
My goal is to have "make maintainer-clean" remove all files that are created as part of the build process that starts with running ./bootstrap. I realize how automake uses and defines this target, but with our newer process, expectations have evolved. I.e., in projects like coreutils, bison, tar, gzip, etc., a maintainer build no longer starts with "./configure". Now it starts with ./bootstrap, and I want a way to restore nearly-original state. Hence, I want a rule to remove configure, all Makefile.am, all gnulib.mks, files checked-out-from-gnulib, .po files pulled from the TP, etc. Ideally, even .gitignore and .cvsignore files would be restored, but that's not important -- ignorable, even :-) The only reason maintainer-clean typically has not removed files like configure and Makefile.am is that they have been (until relatively recently) version controlled. Now that they too are easier to generate (at least by maintainers, who we can assume have the proper tools), it is desirable to be able to remove *all* generated files, without removing what may be stray works-in-progress. Since whether files like configure and Makefile.am are version-controlled is package dependent, this might be worthy of a new target. Or maybe just a gnulib-tool option. I'm not yet decided on that. BTW, your agreeing that "make maintainer-clean" should remove files copied on behalf of modules suggests that you already agree that the rule must do more than what automake suggests: [from 'info automake's "What Gets Cleaned" section] * If the maintainer built it (for instance, a `.info' file), then `maintainer-clean' should delete it. However `maintainer-clean' should not delete anything that needs to exist in order to run `./configure && make'.