Due to the presence of a huge residual hierarchy in my build tree, parts of "make syntax-check" were taking way too long -- they were running "find" on the working directory rather than using VC_LIST_EXCEPT. Fixing that in two rules, I spotted a recommendation to use the obsolescent @PATH_SEPARATOR@ notation. Fixing that uncovered a violation in maint.mk: it used ":" in a PATH=... assignment. The irony.
But I have my doubts about the utility of the sc_makefile_path_separator_check rule. Does anyone build coreutils on a system for which a PATH-separator of ":" does not work? Please let me know. Otherwise, I'll probably migrate that rule to cfg.mk and remove it altogether, eventually. >From 1f95a450996aae2e99c02241f31ffd370db2e472 Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyer...@redhat.com> Date: Sat, 21 Mar 2009 09:56:00 +0100 Subject: [PATCH 1/3] tests: modernize: use $(var) makefile notation, not @var@ * maint.mk (sc_makefile_path_separator_check): Recommend the use of $(PATH_SEPARATOR), not @path_separa...@. Remove an obsolete comment. --- maint.mk | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/maint.mk b/maint.mk index 0c1ad24..17f0be8 100644 --- a/maint.mk +++ b/maint.mk @@ -581,11 +581,8 @@ sc_po_check: # Sometimes it is useful to change the PATH environment variable # in Makefiles. When doing so, it's better not to use the Unix-centric -# path separator of `:', but rather the automake-provided `...@path_separator@'. -# It'd be better to use `find -print0 ...|xargs -0 ...', but less portable, -# and there probably aren't many projects with so many Makefile.am files -# that we'd have to worry about limits on command line length. -msg = '$(ME): Do not use `:'\'' above; use @PATH_SEPARATOR@ instead' +# path separator of `:', but rather the automake-provided `$(PATH_SEPARATOR)'. +msg = '$(ME): Do not use `:'\'' above; use $$(PATH_SEPARATOR) instead' sc_makefile_path_separator_check: @grep -n 'PATH=.*:' `find $(srcdir) -name Makefile.am` \ && { echo $(msg) 1>&2; exit 1; } || : -- 1.6.2.rc1.285.gc5f54 >From e45c9a02a4506417949fbc3af91c2e9900d35cc6 Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyer...@redhat.com> Date: Sat, 21 Mar 2009 09:52:41 +0100 Subject: [PATCH 2/3] tests: follow own advice: use $(PATH_SEPARATOR), not ":" * maint.mk (coreutils-path-check): Use the variable, not the literal. --- maint.mk | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/maint.mk b/maint.mk index 17f0be8..a809a5f 100644 --- a/maint.mk +++ b/maint.mk @@ -741,7 +741,8 @@ define coreutils-path-check esac; \ done \ && ln -sf ../src/true $(bin)/false \ - && PATH=`pwd`/$(bin):$$PATH $(MAKE) -C tests check \ + && PATH=`pwd`/$(bin)$(PATH_SEPARATOR)$$PATH \ + $(MAKE) -C tests check \ && { test -d gnulib-tests \ && $(MAKE) -C gnulib-tests check \ || :; } \ -- 1.6.2.rc1.285.gc5f54 >From d1df6ef183a651c82b719c3eef6f81b899109a7e Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyer...@redhat.com> Date: Sat, 21 Mar 2009 09:43:56 +0100 Subject: [PATCH 3/3] tests: search only files that are under version control * maint.mk (sc_error_exit_success): Search only files that are under version control. (sc_makefile_path_separator_check): Likewise. Check *.mk files, too, not just Makefile.am files. --- maint.mk | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/maint.mk b/maint.mk index a809a5f..5444436 100644 --- a/maint.mk +++ b/maint.mk @@ -153,10 +153,9 @@ sc_prohibit_strcmp: # Using EXIT_SUCCESS as the first argument to error is misleading, # since when that parameter is 0, error does not exit. Use `0' instead. sc_error_exit_success: - @grep -nF 'error (EXIT_SUCCESS,' \ - $$(find -type f -name '*.[chly]') && \ - { echo '$(ME): found error (EXIT_SUCCESS' 1>&2; \ - exit 1; } || : + @grep -nE 'error \(EXIT_SUCCESS,' \ + $$($(VC_LIST_EXCEPT) | grep -E '\.[chly]$$') && \ + { echo '$(ME): found error (EXIT_SUCCESS' 1>&2; exit 1; } || : # `FATAL:' should be fully upper-cased in error messages # `WARNING:' should be fully upper-cased, or fully lower-cased @@ -584,7 +583,8 @@ sc_po_check: # path separator of `:', but rather the automake-provided `$(PATH_SEPARATOR)'. msg = '$(ME): Do not use `:'\'' above; use $$(PATH_SEPARATOR) instead' sc_makefile_path_separator_check: - @grep -n 'PATH=.*:' `find $(srcdir) -name Makefile.am` \ + @grep -nE 'PATH[=].*:' \ + $$($(VC_LIST_EXCEPT) | grep -E 'akefile|\.mk$$') \ && { echo $(msg) 1>&2; exit 1; } || : # Check that `make alpha' will not fail at the end of the process. -- 1.6.2.rc1.285.gc5f54 _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils