Skip to contentSkip to conversation

Makefile: improve detection of make "-s" flag

PATCH Superseded Fabio Porcedda 2 participants 5 messages Nov 19, 2014 – Dec 23, 2014 Kbuild

v4 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 Makefile: improve detection of make "-s" flag

Because it's just checked the presence of the "s" character even a
make --warn-undefined-variables
is detected as a silent build so fix this by filtering out long options.

Cc Arnout Vandecappelle <[email protected]>

---

Notes:
v4:
- split this patch from the patch set to send to muster as bugfix
v2:
- remove spurious space at the beginning of the QUIET variable (Arnout)

 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
index 471edf9..6b97dc6 100644
@@ -303,7 +303,7 @@ GNU_HOST_NAME := $(shell support/gnuconfig/config.guess)
 TARGETS :=
 
 # silent mode requested?
-QUIET := $(if $(findstring s,$(MAKEFLAGS)),-q)
+QUIET := $(if $(findstring s, $(filter-out --%, $(MAKEFLAGS))),-q)
 
 # Strip off the annoying quoting
 ARCH := $(call qstrip,$(BR2_ARCH))
Signature · 1 line
2.1.3
#1 lore raw

PATCH v4 1/1 Makefile: improve detection of make "-s" flag

Quoted 8 lines · Fabio Porcedda

Because it's just checked the presence of the "s" character even a
make --warn-undefined-variables
is detected as a silent build so fix this by filtering out long options.

Cc Arnout Vandecappelle <[email protected]>

---

Quoted 8 lines

Notes:
v4:
- split this patch from the patch set to send to muster as bugfix
v2:
- remove spurious space at the beginning of the QUIET variable (Arnout)

 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

ping?

BR

Signature · 1 line
Fabio Porcedda
#2 lore raw

PATCH v4 1/1 Makefile: improve detection of make "-s" flag

In reply to Fabio Porcedda

Fabio, All,

On 2014-11-19 18:51 +0100, Fabio Porcedda spake thusly:

Quoted 22 lines

Because it's just checked the presence of the "s" character even a
make --warn-undefined-variables
is detected as a silent build so fix this by filtering out long options.

Cc Arnout Vandecappelle <[email protected]>

---

Notes:
v4:
- split this patch from the patch set to send to muster as bugfix
v2:
- remove spurious space at the beginning of the QUIET variable (Arnout)

 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +0 -0
index 471edf9..6b97dc6 100644

Makefile GNU_HOST_NAME := $(shell support/gnuconfig/config.guess) · line 306

Quoted 5 lines
Makefile +1 -1
@@ -303,7 +303,7 @@ GNU_HOST_NAME := $(shell support/gnuconfig/config.guess)
 TARGETS :=
 
 # silent mode requested?
-QUIET := $(if $(findstring s,$(MAKEFLAGS)),-q)
+QUIET := $(if $(findstring s, $(filter-out --%, $(MAKEFLAGS))),-q)

Please, do not add a space after the comma when calling a macro. This should be:

    QUIET := $(if $(findstring s,$(filter-out --%,$(MAKEFLAGS))),-q)

Yes, that's slightly less readable. But make really cuts on commas, and the sapce is then part of the values, so we do not want it (it has no impact in your case, though, but: consistency! ;-) )

Otherwise, looks good to me.

Regards,
Yann E. MORIN.

Quoted 10 lines
Makefile +0 -0
 # Strip off the annoying quoting
 ARCH := $(call qstrip,$(BR2_ARCH))
Signature · 6 lines
2.1.3

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH v4 1/1 Makefile: improve detection of make "-s" flag

Quoted 34 lines · Yann E. MORIN

Fabio, All,

On 2014-11-19 18:51 +0100, Fabio Porcedda spake thusly:

Quoted 22 lines

Because it's just checked the presence of the "s" character even a
make --warn-undefined-variables
is detected as a silent build so fix this by filtering out long options.

Cc Arnout Vandecappelle <[email protected]>

---

Notes:
v4:
- split this patch from the patch set to send to muster as bugfix
v2:
- remove spurious space at the beginning of the QUIET variable (Arnout)

 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +0 -0
index 471edf9..6b97dc6 100644

Makefile GNU_HOST_NAME := $(shell support/gnuconfig/config.guess) · line 306

Quoted 5 lines
Makefile +1 -1
@@ -303,7 +303,7 @@ GNU_HOST_NAME := $(shell support/gnuconfig/config.guess)
 TARGETS :=
 
 # silent mode requested?
-QUIET := $(if $(findstring s,$(MAKEFLAGS)),-q)
+QUIET := $(if $(findstring s, $(filter-out --%, $(MAKEFLAGS))),-q)

Please, do not add a space after the comma when calling a macro. This should be:

Quoted 5 lines
    QUIET := $(if $(findstring s,$(filter-out --%,$(MAKEFLAGS))),-q)

Yes, that's slightly less readable. But make really cuts on commas, and the sapce is then part of the values, so we do not want it (it has no impact in your case, though, but: consistency! ;-) )

Ok done, i will push an updated path set.

Quoted 5 lines

Otherwise, looks good to me.

Regards,
Yann E. MORIN.

BR

Signature · 1 line
Fabio Porcedda
#4 lore raw

PATCH v4 1/1 Makefile: improve detection of make "-s" flag

Quoted 35 lines · Fabio Porcedda
Quoted 34 lines · Yann E. MORIN

Fabio, All,

On 2014-11-19 18:51 +0100, Fabio Porcedda spake thusly:

Quoted 22 lines

Because it's just checked the presence of the "s" character even a
make --warn-undefined-variables
is detected as a silent build so fix this by filtering out long options.

Cc Arnout Vandecappelle <[email protected]>

---

Notes:
v4:
- split this patch from the patch set to send to muster as bugfix
v2:
- remove spurious space at the beginning of the QUIET variable (Arnout)

 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +0 -0
index 471edf9..6b97dc6 100644

Makefile GNU_HOST_NAME := $(shell support/gnuconfig/config.guess) · line 306

Quoted 5 lines
Makefile +1 -1
@@ -303,7 +303,7 @@ GNU_HOST_NAME := $(shell support/gnuconfig/config.guess)
 TARGETS :=
 
 # silent mode requested?
-QUIET := $(if $(findstring s,$(MAKEFLAGS)),-q)
+QUIET := $(if $(findstring s, $(filter-out --%, $(MAKEFLAGS))),-q)

Please, do not add a space after the comma when calling a macro. This should be:

Quoted 9 lines
Quoted 5 lines
    QUIET := $(if $(findstring s,$(filter-out --%,$(MAKEFLAGS))),-q)

Yes, that's slightly less readable. But make really cuts on commas, and the sapce is then part of the values, so we do not want it (it has no impact in your case, though, but: consistency! ;-) )

Ok done, i will push an updated path set.

Quoted 1 line

Otherwise, looks good to me.

I've sent an updated version:
http://patchwork.ozlabs.org/patch/423608/

BR

Signature · 1 line
Fabio Porcedda