home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 15 / AACD15.ISO / AACD / Programming / Python2 / Python20_source / Makefile.in < prev    next >
Encoding:
Makefile  |  2000-10-25  |  17.4 KB  |  581 lines

  1. # Top-level Makefile for Python
  2. # As distributed, this file is called Makefile.in; it is processed
  3. # into the real Makefile by running the script ./configure, which
  4. # replaces things like @spam@ with values appropriate for your system.
  5. # This means that if you edit Makefile, your changes get lost the next
  6. # time you run the configure script.  Ideally, you can do:
  7. #    ./configure
  8. #    make
  9. #    make test
  10. #    make install
  11. # The top-level Makefile invokes make recursively in a number of
  12. # subdirectories (see the SUBDIRS variable below).  If you want to,
  13. # you can invoke make in individual subdirectories.  However, the
  14. # sub-Makefiles are also generated by configure, and the quickest way
  15. # to make sure they are up to date is by running make (or "make
  16. # Makefiles") at the top level.  This is particularly important for
  17. # Modules/Makefile, which has to be regenerated every time you edit
  18. # Modules/Setup.  The python executable is built in the Modules
  19. # directory and then moved to the top-level directory.  The recursive
  20. # makes pass three options to subordinate makes: OPT (a quick way to
  21. # change some compiler options; it usually defaults to -O), prefix and
  22. # exec_prefix (the installation paths).
  23. # If you have a previous version of Python installed that you don't
  24. # want to overwrite, you can use "make altinstall" instead of "make
  25. # install".  This changes the install procedure so it installs the
  26. # Python binary as "python<version>".  The libraries and include files
  27. # are always installed in a subdirectory called "python<version>".
  28. # "make altinstall" does not install the manual page.  If you want to
  29. # make this installation the "official" installation but want to keep
  30. # the old binary around "just in case", rename the installed python
  31. # binary to "python<oldversion>" before running "make install".
  32. # (This only works between different versions, e.g. 1.3 and 1.4 --
  33. # different betas of the same version will overwrite each other in
  34. # installation unless you override the VERSION Make variable.)
  35. # In fact, "make install" or "make bininstall" installs the binary
  36. # as python<version> and makes a hard link to python, so when
  37. # installing a new version in the future, nothing of the current
  38. # version will be lost (except for the man page).
  39. # If recursive makes fail, try invoking make as "make MAKE=make".
  40. # See also the section "Build instructions" in the README file.
  41.  
  42. # Substitutions by configure
  43. VERSION=    @VERSION@
  44. srcdir=        @srcdir@
  45. VPATH=        @srcdir@
  46. CC=        @CC@
  47. AR=        @AR@
  48. RANLIB=        @RANLIB@
  49. DEFS=        @DEFS@
  50.  
  51. # Machine-dependent subdirectories
  52. MACHDEP=    @MACHDEP@
  53.  
  54. # Install prefix for architecture-independent files
  55. prefix=        @prefix@
  56.  
  57. # Install prefix for architecture-dependent files
  58. exec_prefix=    @exec_prefix@
  59.  
  60. # Expanded directories
  61. BINDIR=        $(exec_prefix)/bin
  62. LIBDIR=        $(exec_prefix)/lib
  63. MANDIR=        $(prefix)/man
  64. INCLUDEDIR=    $(prefix)/include
  65. CONFINCLUDEDIR=    $(exec_prefix)/include
  66. SCRIPTDIR=    $(prefix)/lib
  67.  
  68. # Detailed destination directories
  69. BINLIBDEST=    $(LIBDIR)/python$(VERSION)
  70. LIBDEST=    $(SCRIPTDIR)/python$(VERSION)
  71. INCLUDEPY=    $(INCLUDEDIR)/python$(VERSION)
  72. CONFINCLUDEPY=    $(CONFINCLUDEDIR)/python$(VERSION)
  73. LIBP=        $(LIBDIR)/python$(VERSION)
  74.  
  75. # Symbols used for using shared libraries
  76. SO=        @SO@
  77. LDSHARED=    @LDSHARED@
  78. CCSHARED=    @CCSHARED@
  79. LINKFORSHARED=    @LINKFORSHARED@
  80. DESTSHARED=    $(BINLIBDEST)/lib-dynload
  81.  
  82. # Shell used by make (some versions default to the login shell, which is bad)
  83. SHELL=        /bin/sh
  84.  
  85. # Executable suffix (.exe on Windows and Mac OS X)
  86. EXE=        @EXE@
  87.  
  88. # Modes for directories, executables and data files created by the
  89. # install process.  Default to user-only-writable for all file types.
  90. DIRMODE=    755
  91. EXEMODE=    755
  92. FILEMODE=    644
  93.  
  94. # Portable install script (configure doesn't always guess right)
  95. INSTALL=    @srcdir@/install-sh -c
  96. INSTALL_PROGRAM=${INSTALL} -m $(EXEMODE)
  97. INSTALL_DATA=    ${INSTALL} -m $(FILEMODE)
  98.  
  99. # Use this to make a link between python$(VERSION) and python in $(BINDIR)
  100. LN=@LN@
  101.  
  102. # --with-PACKAGE options for configure script
  103. # e.g. --with-readline --with-svr5 --with-solaris --with-thread
  104. # (see README for an explanation)
  105. WITH=        
  106.  
  107. # Compiler options passed to subordinate makes
  108. OPT=        @OPT@
  109.  
  110. # Subdirectories where to run make recursively
  111. SUBDIRS=    Parser Grammar Objects Python Modules
  112.  
  113. # Other subdirectories
  114. SUBDIRSTOO=    Include Lib Misc Demo
  115.  
  116. # Files and directories to be distributed
  117. CONFIGFILES=    configure configure.in acconfig.h config.h.in Makefile.in
  118. DISTFILES=    README ChangeLog $(CONFIGFILES)
  119. DISTDIRS=    $(SUBDIRS) $(SUBDIRSTOO) Ext-dummy
  120. DIST=        $(DISTFILES) $(DISTDIRS)
  121.  
  122. # Compilation flags for getbuildinfo.c only
  123. CFLAGS=        $(OPT) -I. $(DEFS)
  124.  
  125. LIBRARY=    libpython$(VERSION).a
  126. LDLIBRARY=      @LDLIBRARY@
  127.  
  128. # Default target
  129. all:        $(LIBRARY) python$(EXE) sharedmods
  130.  
  131. # Build the interpreter
  132. python$(EXE):        $(LIBRARY) buildno Modules/python.o
  133.         expr `cat buildno` + 1 >buildno1
  134.         mv -f buildno1 buildno
  135.         $(CC) -c $(CFLAGS) -DBUILD=`cat buildno` \
  136.               $(srcdir)/Modules/getbuildinfo.c
  137.         $(AR) cr $(LIBRARY) getbuildinfo.o
  138.         $(RANLIB) $(LIBRARY)
  139.         @MAKE_LDLIBRARY@
  140.         cd Modules;  $(MAKE) OPT="$(OPT)" VERSION="$(VERSION)" \
  141.             prefix="$(prefix)" exec_prefix="$(exec_prefix)" \
  142.             LIBRARY=../$(LDLIBRARY) link
  143.  
  144. Modules/python.o: $(srcdir)/Modules/python.c
  145.         cd Modules; $(MAKE) OPT="$(OPT)" python.o
  146.  
  147. buildno:
  148.         echo 0 >buildno
  149.  
  150. # Build the shared modules
  151. sharedmods:     python$(EXE)
  152.         cd Modules;  $(MAKE) OPT="$(OPT)" VERSION="$(VERSION)" \
  153.             prefix="$(prefix)" exec_prefix="$(exec_prefix)" \
  154.             sharedmods
  155.  
  156. # Build the library
  157. $(LIBRARY):    $(SUBDIRS)
  158.         if test ! -f $(LIBRARY); \
  159.         then for i in $(SUBDIRS); do rm -f $$i/add2lib; done; true; \
  160.         else true; fi
  161.         for i in $(SUBDIRS); do \
  162.             (cd $$i; $(MAKE) VERSION="$(VERSION)" add2lib); done
  163.  
  164. # This rule is only here for DG/UX and BeOS!!!
  165. libpython$(VERSION).so:    $(LIBRARY)
  166.         case `uname -s | tr -d '/ ' | tr '[A-Z]' '[a-z]'` in \
  167.         *dgux*) \
  168.             test -d dgux || mkdir dgux; \
  169.             (cd dgux;ar x ../$^;ld -G -o ../$@ * ); \
  170.             /bin/rm -rf ./dgux \
  171.             ;; \
  172.         beos) \
  173.             $(srcdir)/BeOS/ar-fake so $(LIBRARY) $@ \
  174.             ;; \
  175.         esac
  176.  
  177. # This rule is here for OPENSTEP/Rhapsody/MacOSX
  178. libpython$(VERSION).dylib: $(LIBRARY)
  179.         libtool -o $(LDLIBRARY) -dynamic $(OTHER_LIBTOOL_OPT) $(LIBRARY) -framework System @LIBTOOL_CRUFT@ 
  180.  
  181. $(SUBDIRS):    Makefiles
  182.  
  183. Grammar:
  184.         cd Grammar ; $(MAKE) OPT="$(OPT)" VERSION="$(VERSION)" \
  185.             prefix="$(prefix)" exec_prefix="$(exec_prefix)" all
  186.  
  187. Parser:
  188.         cd Parser ; $(MAKE) OPT="$(OPT)" VERSION="$(VERSION)" \
  189.             prefix="$(prefix)" exec_prefix="$(exec_prefix)" all
  190.  
  191. Python:
  192.         cd Python ; $(MAKE) OPT="$(OPT)" VERSION="$(VERSION)" \
  193.             prefix="$(prefix)" exec_prefix="$(exec_prefix)" all
  194.  
  195. Objects:
  196.         cd Objects ; $(MAKE) OPT="$(OPT)" VERSION="$(VERSION)" \
  197.             prefix="$(prefix)" exec_prefix="$(exec_prefix)" all
  198.  
  199. Modules:    Parser Python Objects
  200.         cd Modules ; $(MAKE) OPT="$(OPT)" VERSION="$(VERSION)" \
  201.             prefix="$(prefix)" exec_prefix="$(exec_prefix)" all
  202.  
  203. # Test the interpreter (twice, once without .pyc files, once with)
  204. TESTOPTS=    -l
  205. TESTPROG=    $(srcdir)/Lib/test/regrtest.py
  206. TESTPYTHON=    ./python$(EXE) -tt
  207. test:        all
  208.         -rm -f $(srcdir)/Lib/test/*.py[co]
  209.         -PYTHONPATH= $(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
  210.         PYTHONPATH= $(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
  211.  
  212. # Install everything
  213. install:    altinstall bininstall maninstall
  214.  
  215. # Install almost everything without disturbing previous versions
  216. altinstall:    altbininstall libinstall inclinstall libainstall sharedinstall
  217.  
  218. # Install the interpreter (by creating a hard link to python$(VERSION))
  219. bininstall:    altbininstall
  220.         -if test -f $(BINDIR)/python$(EXE); \
  221.         then rm -f $(BINDIR)/python$(EXE); \
  222.         else true; \
  223.         fi
  224.         (cd $(BINDIR); $(LN) python$(VERSION)$(EXE) python$(EXE))
  225.  
  226. # Install the interpreter with $(VERSION) affixed
  227. # This goes into $(exec_prefix)
  228. altbininstall:    python$(EXE)
  229.         @for i in $(BINDIR); \
  230.         do \
  231.             if test ! -d $$i; then \
  232.                 echo "Creating directory $$i"; \
  233.                 mkdir $$i; \
  234.                 chmod $(DIRMODE) $$i; \
  235.             else    true; \
  236.             fi; \
  237.         done
  238.         $(INSTALL_PROGRAM) python$(EXE) $(BINDIR)/python$(VERSION)$(EXE)
  239.         if test -f libpython$(VERSION).so; then \
  240.             $(INSTALL_DATA) libpython$(VERSION).so $(LIBDIR); \
  241.         else    true; \
  242.         fi
  243.  
  244. # Install the manual page
  245. maninstall:
  246.         @for i in $(MANDIR) $(MANDIR)/man1; \
  247.         do \
  248.             if test ! -d $$i; then \
  249.                 echo "Creating directory $$i"; \
  250.                 mkdir $$i; \
  251.                 chmod $(DIRMODE) $$i; \
  252.             else    true; \
  253.             fi; \
  254.         done
  255.         $(INSTALL_DATA) $(srcdir)/Misc/python.man \
  256.             $(MANDIR)/man1/python.1
  257.  
  258. # Install the library
  259. PLATDIR=    plat-$(MACHDEP)
  260. MACHDEPS=    $(PLATDIR)
  261. XMLLIBSUBDIRS=  xml xml/dom xml/parsers xml/sax
  262. LIBSUBDIRS=    lib-old lib-tk site-packages test test/output encodings \
  263.         distutils distutils/command $(XMLLIBSUBDIRS) curses $(MACHDEPS)
  264. libinstall:    python $(srcdir)/Lib/$(PLATDIR)
  265.         @for i in $(SCRIPTDIR) $(LIBDEST); \
  266.         do \
  267.             if test ! -d $$i; then \
  268.                 echo "Creating directory $$i"; \
  269.                 mkdir $$i; \
  270.                 chmod $(DIRMODE) $$i; \
  271.             else    true; \
  272.             fi; \
  273.         done
  274.         @for d in $(LIBSUBDIRS); \
  275.         do \
  276.             a=$(srcdir)/Lib/$$d; \
  277.             if test ! -d $$a; then continue; else true; fi; \
  278.             b=$(LIBDEST)/$$d; \
  279.             if test ! -d $$b; then \
  280.                 echo "Creating directory $$b"; \
  281.                 mkdir $$b; \
  282.                 chmod $(DIRMODE) $$b; \
  283.             else    true; \
  284.             fi; \
  285.         done
  286.         @for i in $(srcdir)/Lib/*.py $(srcdir)/Lib/*.doc; \
  287.         do \
  288.             if test -x $$i; then \
  289.                 $(INSTALL_PROGRAM) $$i $(LIBDEST); \
  290.                 echo $(INSTALL_PROGRAM) $$i $(LIBDEST); \
  291.             else \
  292.                 $(INSTALL_DATA) $$i $(LIBDEST); \
  293.                 echo $(INSTALL_DATA) $$i $(LIBDEST); \
  294.             fi; \
  295.         done
  296.         @for d in $(LIBSUBDIRS); \
  297.         do \
  298.             a=$(srcdir)/Lib/$$d; \
  299.             if test ! -d $$a; then continue; else true; fi; \
  300.             b=$(LIBDEST)/$$d; \
  301.             for i in $$a/*; \
  302.             do \
  303.                 case $$i in \
  304.                 *CVS) ;; \
  305.                 *.py[co]) ;; \
  306.                 *.orig) ;; \
  307.                 *~) ;; \
  308.                 *) \
  309.                     if test -d $$i; then continue; fi; \
  310.                     if test -x $$i; then \
  311.                         echo $(INSTALL_PROGRAM) $$i $$b; \
  312.                         $(INSTALL_PROGRAM) $$i $$b; \
  313.                     else \
  314.                         echo $(INSTALL_DATA) $$i $$b; \
  315.                         $(INSTALL_DATA) $$i $$b; \
  316.                     fi;; \
  317.                 esac; \
  318.             done; \
  319.         done
  320.         $(INSTALL_DATA) $(srcdir)/LICENSE $(LIBDEST)/LICENSE.txt
  321.         PYTHONPATH=$(LIBDEST) \
  322.             ./python$(EXE) -tt $(LIBDEST)/compileall.py $(LIBDEST)
  323.         PYTHONPATH=$(LIBDEST) \
  324.             ./python$(EXE) -O $(LIBDEST)/compileall.py $(LIBDEST)
  325.  
  326. # Create the PLATDIR source directory, if one wasn't distributed..
  327. $(srcdir)/Lib/$(PLATDIR):
  328.         mkdir $(srcdir)/Lib/$(PLATDIR)
  329.         cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen
  330.         export PATH; PATH="`pwd`:$$PATH"; \
  331.         export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \
  332.         export EXE; EXE="$(EXE)"; \
  333.         cd $(srcdir)/Lib/$(PLATDIR); ./regen
  334.  
  335. # Install the include files
  336. INCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY)
  337. inclinstall:
  338.         @for i in $(INCLDIRSTOMAKE); \
  339.         do \
  340.             if test ! -d $$i; then \
  341.                 echo "Creating directory $$i"; \
  342.                 mkdir $$i; \
  343.                 chmod $(DIRMODE) $$i; \
  344.             else    true; \
  345.             fi; \
  346.         done
  347.         @for i in $(srcdir)/Include/*.h; \
  348.         do \
  349.             echo $(INSTALL_DATA) $$i $(INCLUDEPY); \
  350.             $(INSTALL_DATA) $$i $(INCLUDEPY); \
  351.         done
  352.         $(INSTALL_DATA) config.h $(CONFINCLUDEPY)/config.h
  353.  
  354. # Install the library and miscellaneous stuff needed for extending/embedding
  355. # This goes into $(exec_prefix)
  356. LIBPL=        $(LIBP)/config
  357. libainstall:    all
  358.         @for i in $(LIBDIR) $(LIBP) $(LIBPL); \
  359.         do \
  360.             if test ! -d $$i; then \
  361.                 echo "Creating directory $$i"; \
  362.                 mkdir $$i; \
  363.                 chmod $(DIRMODE) $$i; \
  364.             else    true; \
  365.             fi; \
  366.         done
  367.         @if test -d $(LIBRARY); then :; else \
  368.             $(INSTALL_DATA) $(LIBRARY) $(LIBPL)/$(LIBRARY) ; \
  369.             $(RANLIB) $(LIBPL)/$(LIBRARY) ; \
  370.         fi
  371.         $(INSTALL_DATA) Modules/config.c $(LIBPL)/config.c
  372.         $(INSTALL_DATA) Modules/python.o $(LIBPL)/python.o
  373.         $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(LIBPL)/config.c.in
  374.         $(INSTALL_DATA) Modules/Makefile $(LIBPL)/Makefile
  375.         $(INSTALL_DATA) Modules/Setup $(LIBPL)/Setup
  376.         $(INSTALL_DATA) Modules/Setup.local $(LIBPL)/Setup.local
  377.         $(INSTALL_DATA) Modules/Setup.config $(LIBPL)/Setup.config
  378.         $(INSTALL_PROGRAM) $(srcdir)/Modules/makesetup $(LIBPL)/makesetup
  379.         $(INSTALL_PROGRAM) $(srcdir)/install-sh $(LIBPL)/install-sh
  380.         $(INSTALL_DATA) $(srcdir)/Misc/Makefile.pre.in $(LIBPL)/Makefile.pre.in
  381.         @if [ -s Modules/python.exp -a \
  382.             "`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \
  383.             echo; echo "Installing support files for building shared extension modules on AIX:"; \
  384.             $(INSTALL_DATA) Modules/python.exp        \
  385.                     $(LIBPL)/python.exp;        \
  386.             echo; echo "$(LIBPL)/python.exp";        \
  387.             $(INSTALL_PROGRAM) $(srcdir)/Modules/makexp_aix    \
  388.                     $(LIBPL)/makexp_aix;        \
  389.             echo "$(LIBPL)/makexp_aix";            \
  390.             $(INSTALL_PROGRAM) $(srcdir)/Modules/ld_so_aix    \
  391.                     $(LIBPL)/ld_so_aix;        \
  392.             echo "$(LIBPL)/ld_so_aix";            \
  393.             echo; echo "See Misc/AIX-NOTES for details.";    \
  394.         else true; \
  395.         fi
  396.         @case "$(MACHDEP)" in beos*) \
  397.             echo; echo "Installing support files for building shared extension modules on BeOS:"; \
  398.             $(INSTALL_DATA) BeOS/README $(LIBPL)/README;    \
  399.             echo; echo "$(LIBPL)/README";            \
  400.             $(INSTALL_DATA) BeOS/README.readline-2.2 $(LIBPL)/README.readline-2.2; \
  401.             echo "$(LIBPL)/README.readline-2.2";        \
  402.             $(INSTALL_PROGRAM) BeOS/ar-fake $(LIBPL)/ar-fake; \
  403.             echo "$(LIBPL)/ar-fake";            \
  404.             $(INSTALL_PROGRAM) BeOS/linkmodule $(LIBPL)/linkmodule; \
  405.             echo "$(LIBPL)/linkmodule";            \
  406.             echo; echo "See BeOS/README for details.";    \
  407.             ;; \
  408.         esac
  409.  
  410. # Install the dynamically loadable modules
  411. # This goes into $(exec_prefix)
  412. sharedinstall:
  413.         cd Modules; $(MAKE) \
  414.             OPT="$(OPT)" \
  415.             VERSION="$(VERSION)" \
  416.             SO="$(SO)" \
  417.             LDSHARED="$(LDSHARED)" \
  418.             CCSHARED="$(CCSHARED)" \
  419.             LINKFORSHARED="$(LINKFORSHARED)" \
  420.             DESTSHARED="$(DESTSHARED)" \
  421.             prefix="$(prefix)" \
  422.             exec_prefix="$(exec_prefix)" \
  423.             sharedinstall
  424.  
  425. # Build the sub-Makefiles
  426. Makefiles:    config.status Modules/Makefile.pre
  427.         (cd Modules; $(MAKE) -f Makefile.pre Makefile)
  428.         @for i in . $(SUBDIRS); do \
  429.             (echo making Makefile in subdirectory $$i; cd $$i; \
  430.              $(MAKE) Makefile); \
  431.         done
  432.         -(rm -f Modules/hassignal; cd Modules; $(MAKE) hassignal)
  433.  
  434. # Build the intermediate Makefile in Modules
  435. Modules/Makefile.pre: config.status
  436.         $(SHELL) config.status
  437.  
  438. # Build the toplevel Makefile
  439. Makefile:    Makefile.in config.status
  440.         CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) config.status
  441.  
  442. # Run the configure script.  If config.status already exists,
  443. # call it with the --recheck argument, which reruns configure with the
  444. # same options as it was run last time; otherwise run the configure
  445. # script with options taken from the $(WITH) variable
  446. config.status:    $(srcdir)/configure
  447.         if test -f config.status; \
  448.         then $(SHELL) config.status --recheck; \
  449.              $(SHELL) config.status; \
  450.         else $(SHELL) $(srcdir)/configure $(WITH); \
  451.         fi
  452.  
  453. .PRECIOUS:    config.status python$(EXE)
  454.  
  455. # Rerun configure with the same options as it was run last time,
  456. # provided the config.status script exists
  457. recheck:
  458.         $(SHELL) config.status --recheck
  459.         $(SHELL) config.status
  460.  
  461. # Rebuild the configure script from configure.in; also rebuild config.h.in
  462. autoconf:
  463.         (cd $(srcdir); autoconf)
  464.         (cd $(srcdir); autoheader)
  465.  
  466. # Create a tags file for vi
  467. tags::
  468.         cd $(srcdir); \
  469.         ctags -w -t Include/*.h; \
  470.         for i in $(SUBDIRS); do ctags -w -t -a $$i/*.[ch]; \
  471.         done; \
  472.         sort tags -o tags
  473.  
  474. # Create a tags file for GNU Emacs
  475. TAGS::
  476.         cd $(srcdir); \
  477.         etags Include/*.h; \
  478.         for i in $(SUBDIRS); do etags -a $$i/*.[ch]; done
  479.  
  480. # Add dependencies to sub-Makefiles
  481. depend:
  482.         @for i in $(SUBDIRS); do \
  483.             (echo making depend in subdirectory $$i; cd $$i; \
  484.              $(MAKE) depend); \
  485.         done
  486.  
  487. # Sanitation targets -- clean leaves libraries, executables and tags
  488. # files, which clobber removes those as well
  489.  
  490. localclean:
  491.         -rm -f core *~ [@,#]* *.old *.orig *.rej
  492.  
  493. clean:        localclean
  494.         -for i in $(SUBDIRS); do \
  495.             if test -d $$i; then \
  496.             (echo making clean in subdirectory $$i; cd $$i; \
  497.              if test -f Makefile; \
  498.              then $(MAKE) clean; \
  499.              else $(MAKE) -f Makefile.*in clean; \
  500.              fi); \
  501.             else true; fi; \
  502.         done
  503.  
  504. localclobber:    localclean
  505.         -rm -f tags TAGS python$(EXE) $(LIBRARY) $(LDLIBRARY) *.o
  506.         -rm -f config.log config.cache config.h
  507.  
  508. clobber:    localclobber
  509.         -for i in $(SUBDIRS); do \
  510.             if test -d $$i; then \
  511.             (echo clobbering subdirectory $$i; cd $$i; \
  512.              if test -f Makefile; \
  513.              then $(MAKE) clobber; \
  514.              else $(MAKE) -f $(srcdir)/Makefile*.in clobber; \
  515.              fi); \
  516.             else true; fi; \
  517.         done
  518.  
  519. # Make things extra clean, before making a distribution:
  520. # remove all generated files, even Makefile[.pre]
  521. distclean:    clobber
  522.         -$(MAKE) -f $(srcdir)/Makefile.in \
  523.             SUBDIRS="$(SUBDIRSTOO)" clobber
  524.         -rm -f config.status config.log config.cache config.h Makefile
  525.         -rm -f buildno
  526.         -rm -f Modules/Makefile
  527.         -for i in $(SUBDIRS) $(SUBDIRSTOO); do \
  528.              for f in $$i/*.in; do \
  529.                 f=`basename "$$f" .in`; \
  530.                  if test "$$f" != "*"; then \
  531.                     echo rm -f "$$i/$$f"; \
  532.                      rm -f "$$i/$$f"; \
  533.                 fi; \
  534.              done; \
  535.         done
  536.  
  537. # Check for smelly exported symbols (not starting with Py/_Py)
  538. smelly: all
  539.     for i in $(SUBDIRS); do \
  540.         echo --- $$i ---; \
  541.         nm -p $$i/lib$$i.a | \
  542.         sed -n "/ [TDB] /s/.* //p" | grep -v "^_*Py" | sort -u; \
  543.     done
  544.  
  545. # Find files with funny names
  546. funny:
  547.         find $(DISTDIRS) -type d \
  548.             -o -name '*.[chs]' \
  549.             -o -name '*.py' \
  550.             -o -name '*.doc' \
  551.             -o -name '*.sty' \
  552.             -o -name '*.bib' \
  553.             -o -name '*.dat' \
  554.             -o -name '*.el' \
  555.             -o -name '*.fd' \
  556.             -o -name '*.in' \
  557.             -o -name '*.tex' \
  558.             -o -name '*,[vpt]' \
  559.             -o -name 'Setup' \
  560.             -o -name 'Setup.*' \
  561.             -o -name README \
  562.             -o -name Makefile \
  563.             -o -name ChangeLog \
  564.             -o -name Repository \
  565.             -o -name Root \
  566.             -o -name Entries \
  567.             -o -name Tag \
  568.             -o -name tags \
  569.             -o -name TAGS \
  570.             -o -name .cvsignore \
  571.             -o -name MANIFEST \
  572.             -o -print
  573. # IF YOU PUT ANYTHING HERE IT WILL GO AWAY
  574.