[Python-Dev] 'make distclean' broken.

Guido van Rossum guido@digicool.com
Mon, 22 Jan 2001 12:12:29 -0500


> 'make distclean' seems broken, at least on non-GNU make's:
> 
> [snip]
> clobbering subdirectory Modules
> rm -f *.o python core *~ [@,#]* *.old *.orig *.rej
> rm -f add2lib hassignal
> rm -f *.a tags TAGS config.c Makefile.pre
> rm -f *.so *.sl so_locations
> make -f ./Makefile.in  SUBDIRS="Include Lib Misc Demo" clobber
> "./Makefile.in", line 134: Need an operator
> make: fatal errors encountered -- cannot continue
> *** Error code 1 (ignored)
> rm -f config.status config.log config.cache config.h Makefile
> rm -f buildno platform
> rm -f Modules/Makefile
> [snip]
> 
> (This is using FreeBSD's 'make'.)
> 
> Looking at line 134, I'm not sure why it works with GNU make other than that
> it avoids complaining about syntax errors it doesn't run into (which could
> be both bad and good :) or that it avoids complaining about obvious GNU
> autoconf tricks. But I don't know enough about make to say for sure, nor to
> fix the above problem.

There's one line in Makefile.in that trips over Make (mine also
complains about it):

    @SET_DLLLIBRARY@

Looking at the code in configure.in that generates this macro:

    AC_SUBST(SET_DLLLIBRARY)
    LDLIBRARY=''
    SET_DLLLIBRARY=''
       .
       . (and later)
       .
    cygwin*)
	  LDLIBRARY='libpython$(VERSION).dll.a'
	  SET_DLLLIBRARY='DLLLIBRARY=	$(basename $(LDLIBRARY))'
	  ;;

I don't see why we couldn't change this so that Makefile.in just
contains

    DLLLIBRARY=		@DLLLIBRARY@

and then configure.in could be changed to

    AC_SUBST(DLLLIBRARY)
    LDLIBRARY=''
    DLLLIBRARY=''
       .
       . (and later)
       .
    cygwin*)
	  LDLIBRARY='libpython$(VERSION).dll.a'
	  DLLLIBRARY='DLLLIBRARY=	$(basename $(LDLIBRARY))'
	  ;;

Or am I missing something?

Does this fix the problem?

--Guido van Rossum (home page: http://www.python.org/~guido/)