From b5c8b3e7603827ad5b8e0b3c21060cdc49a49339 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 28 Apr 2022 14:40:48 -0700 Subject: [PATCH] glob: improve config and test cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Config problem reported by Benno Schulenberg in: https://lists.gnu.org/r/bug-gnulib/2022-04/msg00071.html * m4/glob.m4 (gl_GLOB): Clean up temporary file. Also, name it conf$$-file not conf-file, so it’s cleaned up on interrupt. * modules/glob-tests (MOSTLYCLEANFILES): Append test-glob.tglobfile, test-glob.tgloblink[123]. --- ChangeLog | 11 +++++++++++ m4/glob.m4 | 6 +++--- modules/glob-tests | 5 +++++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3ce3d85884..f111e479bf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2022-04-28 Paul Eggert + + glob: improve config and test cleanup + Config problem reported by Benno Schulenberg in: + https://lists.gnu.org/r/bug-gnulib/2022-04/msg00071.html + * m4/glob.m4 (gl_GLOB): Clean up temporary file. + Also, name it conf$$-file not conf-file, so it’s cleaned + up on interrupt. + * modules/glob-tests (MOSTLYCLEANFILES): + Append test-glob.tglobfile, test-glob.tgloblink[123]. + 2022-04-26 Paul Eggert glob: port to NetBSD 9.2 diff --git a/m4/glob.m4 b/m4/glob.m4 index cf5f93930c..f59b84ff05 100644 --- a/m4/glob.m4 +++ b/m4/glob.m4 @@ -1,4 +1,4 @@ -# glob.m4 serial 25 +# glob.m4 serial 26 dnl Copyright (C) 2005-2007, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -70,7 +70,7 @@ char a[_GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 ? 1 AC_CACHE_CHECK([whether glob NOTDIR*/ omits symlink to nondir], [gl_cv_glob_omit_nondir_symlinks], [if test $cross_compiling != yes; then - if ln -s conf-file conf$$-globtest 2>/dev/null && touch conf-file + if ln -s conf$$-file conf$$-globtest 2>/dev/null && touch conf$$-file then gl_cv_glob_omit_nondir_symlinks=maybe else @@ -94,7 +94,7 @@ char a[_GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 ? 1 : ]) fi - rm -f conf$$-globtest + rm -f conf$$-file conf$$-globtest else gl_cv_glob_omit_nondir_symlinks="$gl_cross_guess_normal" fi diff --git a/modules/glob-tests b/modules/glob-tests index f551f6c950..ec519cf38d 100644 --- a/modules/glob-tests +++ b/modules/glob-tests @@ -12,3 +12,8 @@ Makefile.am: TESTS += test-glob check_PROGRAMS += test-glob test_glob_LDADD = $(LDADD) $(LIB_MBRTOWC) +MOSTLYCLEANFILES += \ + test-glob.tglobfile \ + test-glob.tgloblink1 \ + test-glob.tgloblink2 \ + test-glob.tgloblink3 -- 2.35.1