]> Savannah Git Hosting - gnulib.git/commitdiff
maint: avoid duplicate tight-scope work
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 11 Jun 2024 17:16:37 +0000 (10:16 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 11 Jun 2024 17:16:37 +0000 (10:16 -0700)
* top/maint.mk (_gl_tight_scope): Sort $(SOURCES), to remove
duplicates and thereby avoid unnecessary work.  Found when testing
this on GNU diffutils.

ChangeLog
top/maint.mk

index 3d341093990435b717a9df88035c5018a6ce5012..dc37db37f119f2507d0e0ed4e52ce8cc736399e9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-06-11  Paul Eggert  <eggert@cs.ucla.edu>
+
+       maint: avoid duplicate tight-scope work
+       * top/maint.mk (_gl_tight_scope): Sort $(SOURCES), to remove
+       duplicates and thereby avoid unnecessary work.  Found when testing
+       this on GNU diffutils.
+
 2024-06-09  Collin Funk  <collin.funk1@gmail.com>
 
        gnulib-tool.py: Handle absolute path checks consistently.
index c20059fbaef634678cf37e593f444f179a137251..2f35253fb785e0d3f0b676ee0f407efc59e841f0 100644 (file)
@@ -1888,7 +1888,7 @@ _gl_tight_scope: $(bin_PROGRAMS)
        for sig in 1 2 3 13 15; do                                      \
          eval "trap 'v=`expr $$sig + 128`; (exit $$v); exit $$v' $$sig"; \
        done;                                                           \
-       src=`for f in $(SOURCES); do                                    \
+       src=`for f in $(sort $(SOURCES)); do                            \
               test -f $$f && d= || d=$(srcdir)/; echo $$d$$f; done`;   \
        hdr=`for f in $(_gl_TS_headers); do                             \
               test -f $$f && d= || d=$(srcdir)/; echo $$d$$f; done`;   \