From 78c0c8673bba086842ef9ea57f44f446558e5ebf Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 25 Jun 2022 16:45:28 -0500 Subject: [PATCH] =?utf8?q?Port=20=E2=80=98make=20clean=E2=80=99=20to=20Sol?= =?utf8?q?aris=2010?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * test/Makefile.in (CLEAN_XML_FILES): New macro. (clean): Use it. --- test/Makefile.in | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/Makefile.in b/test/Makefile.in index 67162c48838..0be5842512f 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -341,9 +341,17 @@ mostlyclean: -@for f in ${LOGFILES}; do test ! -f $$f || mv $$f $$f~; done rm -f ./*.tmp +# If 'find' supports -delete, it also supports -path. Otherwise, use +# -prune and $(FIND_DELETE) instead. -prune is incompatible with -delete. +ifeq ($(FIND_DELETE),-delete) +CLEAN_XML_FILES = '(' -name '*.xml' -a ! -path '*resources*' ')' -delete +else +CLEAN_XML_FILES = -name '*resources*' -prune -o -name '*.xml' $(FIND_DELETE) +endif + clean: find . '(' -name '*.log' -o -name '*.log~' ')' $(FIND_DELETE) - find . '(' -name '*.xml' -a ! -path '*resources*' ')' $(FIND_DELETE) + find . $(CLEAN_XML_FILES) rm -f ${srcdir}/lisp/gnus/mml-sec-resources/random_seed rm -f $(test_module_dir)/*.o $(test_module_dir)/*.so \ $(test_module_dir)/*.dll gmp.h -- 2.39.5