Simplify cross cleaning

* cross/Makefile.in (clean, maintainer-clean):
Prefer a single ‘find’ to doing ‘find’ in a shell loop.
This commit is contained in:
Paul Eggert 2025-01-18 20:01:16 -08:00
parent 0f75a01acd
commit 421d307733

View file

@ -182,9 +182,7 @@ $(LIBSRC_BINARIES) &: src/verbose.mk $(top_builddir)/$@ lib/libgnu.a \
.PHONY: clean maintainer-clean distclean .PHONY: clean maintainer-clean distclean
clean: clean:
for dir in $(CLEAN_SUBDIRS); do \ find $(CLEAN_SUBDIRS) -type f $(FIND_DELETE)
find $$dir -type f $(FIND_DELETE); \
done
rm -rf lib/config.h lib-src/config.h rm -rf lib/config.h lib-src/config.h
# ndk-build won't have been generated in a non-Android build. # ndk-build won't have been generated in a non-Android build.
if test -f ndk-build/Makefile; then \ if test -f ndk-build/Makefile; then \
@ -193,8 +191,6 @@ clean:
maintainer-clean distclean bootstrap-clean: clean maintainer-clean distclean bootstrap-clean: clean
# Remove links created by configure. # Remove links created by configure.
for dir in $(CLEAN_SUBDIRS); do \ find $(CLEAN_SUBDIRS) -type l $(FIND_DELETE)
find $$dir -type l $(FIND_DELETE); \
done
rm -rf lib/Makefile lib/gnulib.mk ndk-build/Makefile rm -rf lib/Makefile lib/gnulib.mk ndk-build/Makefile
rm -rf ndk-build/ndk-build.mk Makefile rm -rf ndk-build/ndk-build.mk Makefile