]> granicus.if.org Git - python/commitdiff
Tweak clean targets yet again.
authorNeil Schemenauer <nascheme@enme.ucalgary.ca>
Sat, 3 Feb 2001 17:16:29 +0000 (17:16 +0000)
committerNeil Schemenauer <nascheme@enme.ucalgary.ca>
Sat, 3 Feb 2001 17:16:29 +0000 (17:16 +0000)
Makefile.pre.in

index 846f01999b7f154f23b4fe2abc0f67328738c028..dde1e4bb84d0f06a53763a2c792114a23d1f01ae 100644 (file)
@@ -757,34 +757,31 @@ TAGS::
 # files, which clobber removes those as well
 
 clean:
-       -rm -f core *~ [@,#]* *.old *.orig *.rej
-       -rm -rf build
        # avoid long command lines, same as LIBRARY_OBJS MAINOBJ PGOBJS
        -rm -f $(PARSER_OBJS)
        -rm -f $(OBJECT_OBJS)
        -rm -f $(PYTHON_OBJS)
-       -rm -f $(MODULE_OBJS) $(SIGNAL_OBJS)
+       -rm -f $(MODULE_OBJS) $(SIGNAL_OBJS) Modules/getbuildinfo.o
        -rm -f $(MODOBJS) $(MAINOBJ) $(PGOBJS)
+       if test -f build; then find build -name '*.o' -exec rm -f {} ';' ; fi
+       find $(srcdir) -name '*.py[co]' -exec rm -f {} ';'
 
 clobber: clean
        -rm -f tags TAGS $(PYTHON) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \
-               Modules/*.so Modules/*.sl
+               Modules/*.so Modules/*.sl Parser/pgen
+       -rm -rf build
 
 # Make things extra clean, before making a distribution:
 # remove all generated files, even Makefile[.pre]
 distclean: clobber
-       -rm -f Makefile Makefile.pre buildno config.status config.log \
-               config.cache config.h setup.cfg Modules/config.c \
+       -rm -f core Makefile Makefile.pre buildno config.status \
+               config.log config.cache config.h Modules/config.c \
                Modules/Setup Modules/Setup.local Modules/Setup.config
-       -for i in $(SUBDIRSTOO); do \
-                for f in $$i/*.in; do \
-                       f=`basename "$$f" .in`; \
-                       if test "$$f" != "*"; then \
-                               echo rm -f "$$i/$$f"; \
-                               rm -f "$$i/$$f"; \
-                       fi; \
-                done; \
-       done
+       find $(srcdir) '(' -name '*.fdc' -o -name '*~' \
+                          -o -name '[@,#]*' -o -name '*.old' \
+                          -o -name '*.orig' -o -name '*.rej' \
+                          -o -name '*.bak' ')' \
+                          -exec rm -f {} ';'
 
 # Check for smelly exported symbols (not starting with Py/_Py)
 smelly: all