Skip to contentSkip to conversation

package/pkg-generic.mk: Fix show-build-order stdout pollution

PATCH New Serj Kalichev 4 participants 4 messages Nov 15, 2018 – Nov 26, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/pkg-generic.mk: Fix show-build-order stdout pollution

The commands like "make show-build-order" or "make <package>-show-build-order" show the build order and then print "make[1]: Nothing to be done for 'show-build-order'" to stdout. It pollutes output. Technically this message is true but it's not true for user because he gets an information.

The <package>-show-build-order targets use $(info) for package name printing. The make utility doesn't consider the internal directive as a command so it think that it's "Nothing to be done". The patch adds the empty command to <package>-show-build-order to inform make utility that taget makes some real actions.

---
 package/pkg-generic.mk | 1 +
 1 file changed, 1 insertion(+)
package/pkg-generic.mk +1 -0
index f34f46afc8..74f3c55394 100644
@@ -819,6 +819,7 @@ $(1)-show-recursive-rdepends:
 
 $(1)-show-build-order: $$(patsubst %,%-show-build-order,$$($(2)_FINAL_ALL_DEPENDENCIES))
 	$$(info $(1))
+	@:
 
 $(1)-graph-depends: graph-depends-requirements
 	$(call pkg-graph-depends,$(1),--direct)
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 package/pkg-generic.mk: Fix show-build-order stdout pollution

Serj, All,

On 2018-11-15 18:45 +0300, Serj Kalichev spake thusly:

Quoted 21 lines

The commands like "make show-build-order" or "make <package>-show-build-order" show the build order and then print "make[1]: Nothing to be done for 'show-build-order'" to stdout. It pollutes output. Technically this message is true but it's not true for user because he gets an information.

The <package>-show-build-order targets use $(info) for package name printing. The make utility doesn't consider the internal directive as a command so it think that it's "Nothing to be done". The patch adds the empty command to <package>-show-build-order to inform make utility that taget makes some real actions.

---
 package/pkg-generic.mk | 1 +
 1 file changed, 1 insertion(+)
package/pkg-generic.mk +0 -0
index f34f46afc8..74f3c55394 100644

package/pkg-generic.mk $(1)-show-recursive-rdepends: · line 822

Quoted 4 lines
package/pkg-generic.mk +1 -0
@@ -819,6 +819,7 @@ $(1)-show-recursive-rdepends:
 
 $(1)-show-build-order: $$(patsubst %,%-show-build-order,$$($(2)_FINAL_ALL_DEPENDENCIES))
 	$$(info $(1))
+	@:

The other places where we use that construct, we put the command first, and the info last, for example:
https://git.buildroot.org/buildroot/tree/Makefile#n1001

With that fixed (which a maintainer may do when applying, no need to resend), or even as-is (if the maintainers prefer this way):

Regards,
Yann E. MORIN.

Quoted 9 lines
package/pkg-generic.mk +0 -0
 $(1)-graph-depends: graph-depends-requirements
 	$(call pkg-graph-depends,$(1),--direct)
Signature · 6 lines
2.17.1

_______________________________________________
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.  |
'------------------------------^-------^------------------^--------------------'
#2 lore raw

PATCH 1/1 package/pkg-generic.mk: Fix show-build-order stdout pollution

In reply to Serj Kalichev

Hello,

Quoted 11 lines · Serj Kalichev

The commands like "make show-build-order" or "make <package>-show-build-order" show the build order and then print "make[1]: Nothing to be done for 'show-build-order'" to stdout. It pollutes output. Technically this message is true but it's not true for user because he gets an information.

The <package>-show-build-order targets use $(info) for package name printing. The make utility doesn't consider the internal directive as a command so it think that it's "Nothing to be done". The patch adds the empty command to <package>-show-build-order to inform make utility that taget makes some real actions.

Quoted 4 lines
---
 package/pkg-generic.mk | 1 +
 1 file changed, 1 insertion(+)

Applied to master after inverting the $(info) call and the @:, as suggested by Yann E. Morin. Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw

PATCH 1/1 package/pkg-generic.mk: Fix show-build-order stdout pollution

In reply to Serj Kalichev
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Serj" == Serj Kalichev <[email protected]> writes:

The commands like "make show-build-order" or "make <package>-show-build-order" show the build order and then print "make[1]: Nothing to be done for 'show-build-order'" to stdout. It pollutes output. Technically this message is true but it's not true for user because he gets an information.

Quoted 7 lines

The <package>-show-build-order targets use $(info) for package name printing. The make utility doesn't consider the internal directive as a command so it think that it's "Nothing to be done". The patch adds the empty command to <package>-show-build-order to inform make utility that taget makes some real actions.

Committed to 2018.02.x and 2018.08.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard