]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Makefile: fix make -s detection
authorValery Ushakov <valery.ushakov@bell-sw.com>
Wed, 22 May 2024 14:07:38 +0000 (17:07 +0300)
committerMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Thu, 23 May 2024 13:54:43 +0000 (15:54 +0200)
Only check the first word of MAKEFLAGS for 's', that's where all the
single letter options are collected.

MAKEFLAGS contains _all_ make flags, so if any command line argument
contains a letter 's', the silent test will be false positive.  Think
e.g. make 'DESTDIR=.../aports/main/mdadm/pkg/mdadm' install

Makefile

index adac7905ab576fce4a072b9a074184495f239309..446710bd2bc23494282a4c2a1b3e5b975eacbdcd 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -157,7 +157,7 @@ ifndef UDEVDIR
  UDEVDIR = /lib/udev
 endif
 
-ifeq (,$(findstring s,$(MAKEFLAGS)))
+ifeq (,$(findstring s,$(firstword -$(MAKEFLAGS))))
        ECHO=echo
 else
        ECHO=: