Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e0d4357

Browse files
committed
Tweak clean targets yet again.
1 parent ba38123 commit e0d4357

1 file changed

Lines changed: 12 additions & 15 deletions

File tree

Makefile.pre.in

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -757,34 +757,31 @@ TAGS::
757757
# files, which clobber removes those as well
758758

759759
clean:
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

769769
clobber: 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]
775776
distclean: 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)
790787
smelly: all

0 commit comments

Comments
 (0)