]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: fix error in syntax-check checking
authorBernhard Voelker <mail@bernhard-voelker.de>
Tue, 6 Aug 2019 23:11:01 +0000 (16:11 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 6 Aug 2019 23:11:01 +0000 (16:11 -0700)
The previous commit introduced a bug into the following syntax-check,
and thus effectively turned it off:

  $ make sc_prohibit_test_calls_print_ver_with_irrelevant_argument; \
      echo $?
  prohibit_test_calls_print_ver_with_irrelevant_argument
  fatal: cannot change to 'grep': No such file or directory
  0

* cfg.mk (sc_prohibit_test_calls_print_ver_with_irrelevant_argument):
Remove changing directory, and pass $(srcdir) as argument to 'git -C'.

cfg.mk

diff --git a/cfg.mk b/cfg.mk
index b589b40e38c3825a220e446057c50b5b5968bf3a..2bc933c8be906e2f9843fe6fcb201666301c97d0 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -635,8 +635,7 @@ sc_prohibit_test_background_without_cleanup_:
 # Ensure that tests call the print_ver_ function for programs which are
 # actually used in that test.
 sc_prohibit_test_calls_print_ver_with_irrelevant_argument:
-       @cd $(srcdir)                                                   \
-       && git -C  grep -w print_ver_ tests                             \
+       @git -C $(srcdir) grep -w print_ver_ tests                      \
          | sed 's#:print_ver_##'                                       \
          | { fail=0;                                                   \
              while read file name; do                                  \