@@ -757,34 +757,31 @@ TAGS::
757757# files, which clobber removes those as well
758758
759759clean:
760- -rm -f core *~ [@,#]* *.old *.orig *.rej
761- -rm -rf build
762760 # avoid long command lines, same as LIBRARY_OBJS MAINOBJ PGOBJS
763761 -rm -f $(PARSER_OBJS)
764762 -rm -f $(OBJECT_OBJS)
765763 -rm -f $(PYTHON_OBJS)
766- -rm -f $(MODULE_OBJS) $(SIGNAL_OBJS)
764+ -rm -f $(MODULE_OBJS) $(SIGNAL_OBJS) Modules/getbuildinfo.o
767765 -rm -f $(MODOBJS) $(MAINOBJ) $(PGOBJS)
766+ if test -f build; then find build -name '*.o' -exec rm -f {} ';' ; fi
767+ find $(srcdir) -name '*.py[co]' -exec rm -f {} ';'
768768
769769clobber: clean
770770 -rm -f tags TAGS $(PYTHON) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \
771- Modules/*.so Modules/*.sl
771+ Modules/*.so Modules/*.sl Parser/pgen
772+ -rm -rf build
772773
773774# Make things extra clean, before making a distribution:
774775# remove all generated files, even Makefile[.pre]
775776distclean: clobber
776- -rm -f Makefile Makefile.pre buildno config.status config.log \
777- config.cache config.h setup.cfg Modules/config.c \
777+ -rm -f core Makefile Makefile.pre buildno config.status \
778+ config.log config.cache config.h Modules/config.c \
778779 Modules/Setup Modules/Setup.local Modules/Setup.config
779- -for i in $(SUBDIRSTOO); do \
780- for f in $$i/*.in; do \
781- f=`basename "$$f" .in`; \
782- if test "$$f" != "*"; then \
783- echo rm -f "$$i/$$f"; \
784- rm -f "$$i/$$f"; \
785- fi; \
786- done; \
787- done
780+ find $(srcdir) '(' -name '*.fdc' -o -name '*~' \
781+ -o -name '[@,#]*' -o -name '*.old' \
782+ -o -name '*.orig' -o -name '*.rej' \
783+ -o -name '*.bak' ')' \
784+ -exec rm -f {} ';'
788785
789786# Check for smelly exported symbols (not starting with Py/_Py)
790787smelly: all
0 commit comments