]> Savannah Git Hosting - gnulib.git/commitdiff
glob: improve config and test cleanup
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 28 Apr 2022 21:40:48 +0000 (14:40 -0700)
committerBruno Haible <bruno@clisp.org>
Wed, 31 Aug 2022 23:01:20 +0000 (01:01 +0200)
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
m4/glob.m4
modules/glob-tests

index 6699a4dd1a6e9db5a88a87a0e15523d65f3b8314..4fd33439ab48427a7d24d982ea352f0999720cd5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2022-04-28  Paul Eggert  <eggert@cs.ucla.edu>
+
+       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  <eggert@cs.ucla.edu>
 
        glob: port to NetBSD 9.2
index cf5f93930c1fb8b529561abab9a81ad49bf5240c..f59b84ff05764a9bce277e8d87eb1f5210450f4d 100644 (file)
@@ -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
index f551f6c9506a7f7bc1407d16a2ce22c847519688..ec519cf38d38eeff3e77c2950b036359466f9ec7 100644 (file)
@@ -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