[Python-checkins] r43040 - python/trunk/Makefile.pre.in

Thomas Heller theller at python.net
Wed Mar 15 10:35:07 CET 2006


thomas.heller wrote:
> Author: thomas.heller
> Date: Wed Mar 15 09:34:38 2006
> New Revision: 43040
> 
> Modified:
>    python/trunk/Makefile.pre.in
> Log:
> In 'make clean', delete some files that are generated by the _ctypes/libffi
> configure step.
> 
> 
> Modified: python/trunk/Makefile.pre.in
> ==============================================================================
> --- python/trunk/Makefile.pre.in	(original)
> +++ python/trunk/Makefile.pre.in	Wed Mar 15 09:34:38 2006
> @@ -974,6 +974,8 @@
>  	find . -name '*.o' -exec rm -f {} ';'
>  	find . -name '*.s[ol]' -exec rm -f {} ';'
>  	find $(srcdir) -name '*.py[co]' -exec rm -f {} ';'
> +	find $(srcdir) -name 'fficonfig.h' -exec rm -f {} ';'
> +	find $(srcdir) -name 'fficonfig.py' -exec rm -f {} ';'
>  
>  clobber: clean
>  	-rm -f $(BUILDPYTHON) $(PGEN) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \

Although I committed this, I'm not sure this is the right approach.
Better IMO would be to let 'make clean' run '$(srcdir)/python setup.py clean'
or '$(srcdir)/python setup.py clean -a', and let the setup script take care
of the cleanup.  The problem is that the makefile doesn't know what the build
directory for extensions is, since its name is determined by distutils.

Maybe it should be spelled '-$(srcdir)/python setup.py clean -a', it's a long
time since I used makefiles.

Thomas



More information about the Python-checkins mailing list