make clean and make clobber semantics
I just noticed for the first time that the semantics of "make clean" and "make clobber" have changed. "make clean" used to remove the .so files too, AFAIK, but no longer does so. "make clean" used to leave the configuration files lying around, but now seems to remove at least some of them. One of the consequences of all this is that, after "make clean", another "make" doesn't rebuild the extensions, because setup.py finds that the .so files are still there and decides not to rebuild the missing .o's. Another consequence is that after "make clobber" you have to rerun the configure script (or say "make recheck"). This takes almost as long as the rest of the build... In other words, "make clean" doesn't go far enough, and "make clobber" goes too far, for what I seem to want most often (recompile every C source file). Can someone suggest a fix? --Guido van Rossum (home page: http://www.python.org/~guido/)
Guido van Rossum wrote:
Can someone suggest a fix?
I think adding something like: find . -name '*.so' -exec rm -f {} ';' to the clean target would work. You sould remove the Module/*.so pattern in the clobber target and fix the comments as well. One more thing Guido, can you touch Include/graminit.h and Python/graminit.c before making the tarball? Neil
I think adding something like:
find . -name '*.so' -exec rm -f {} ';'
to the clean target would work. You sould remove the Module/*.so pattern in the clobber target and fix the comments as well.
Will do.
One more thing Guido, can you touch Include/graminit.h and Python/graminit.c before making the tarball?
Why? --Guido van Rossum (home page: http://www.python.org/~guido/)
On Sat, Apr 14, 2001 at 12:27:09PM -0500, Guido van Rossum wrote:
Another consequence is that after "make clobber" you have to rerun the configure script (or say "make recheck"). This takes almost as long as the rest of the build...
So don't do that. Run 'config.status' instead: it'll recreate your config
files (Makefile.pre, config.h, Setup.config) from cached info. It won't
rebuild everything, but it rebuilds config.h, which is what 'make clobber'
removes that breaks building.
--
Thomas Wouters
Another consequence is that after "make clobber" you have to rerun the configure script (or say "make recheck"). This takes almost as long as the rest of the build...
So don't do that. Run 'config.status' instead: it'll recreate your config files (Makefile.pre, config.h, Setup.config) from cached info. It won't rebuild everything, but it rebuilds config.h, which is what 'make clobber' removes that breaks building.
Well, my issue is that before Neil "fixed" the Makefile, after a "make clobber" a "make" would do the job. Now, there's a dependency on config.h but the Makefile doesn't know how to make that file. Maybe it should. But I've "fixed" it by adding a line to the clean target that removes the .so files, so I don't have to use "make clobber". --Guido van Rossum (home page: http://www.python.org/~guido/)
On Sun, Apr 15, 2001 at 11:47:32AM -0500, Guido van Rossum wrote:
Another consequence is that after "make clobber" you have to rerun the configure script (or say "make recheck"). This takes almost as long as the rest of the build...
So don't do that. Run 'config.status' instead: it'll recreate your config files (Makefile.pre, config.h, Setup.config) from cached info. It won't rebuild everything, but it rebuilds config.h, which is what 'make clobber' removes that breaks building.
Well, my issue is that before Neil "fixed" the Makefile, after a "make clobber" a "make" would do the job. Now, there's a dependency on config.h but the Makefile doesn't know how to make that file.
I know, I was just pointing out you don't have to wait for 'configure' to do
its uncached magic, even if you lose config.h. Some projects do have a
dependency for 'config.h' that just calls config.status, by the way. (and if
config.status is missing, they just call configure or tell you to run
configure manually.)
--
Thomas Wouters
participants (3)
-
Guido van Rossum
-
Neil Schemenauer
-
Thomas Wouters