Page MenuHomeFreeBSD

build: use bare (and portable) echo instead of echo -n
ClosedPublic

Authored by imp on Dec 1 2023, 7:38 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jun 3 2024, 1:00 AM
Unknown Object (File)
May 10 2024, 4:25 PM
Unknown Object (File)
Apr 27 2024, 7:36 PM
Unknown Object (File)
Apr 27 2024, 7:14 PM
Unknown Object (File)
Apr 27 2024, 7:14 PM
Unknown Object (File)
Apr 27 2024, 5:09 PM
Unknown Object (File)
Mar 13 2024, 12:16 AM
Unknown Object (File)
Mar 12 2024, 10:16 PM
Subscribers

Details

Summary

There's no need to use echo -n here. A single echo will do nicely.
This fixes the post-buildworld output on a macos build, where echo -n
is implemented like System V instead of BSD (so you get two lines
first one starting with -n).

Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

imp requested review of this revision.Dec 1 2023, 7:38 PM
jrtc27 added a subscriber: jrtc27.

s/echo -n/printf '%s'/ is the other option, but this seems like the sensible approach here.

This revision is now accepted and ready to land.Dec 1 2023, 7:45 PM
Makefile.inc1
1810

or just extend the line beyond 80 cols?

Makefile.inc1
1810

interesting notion, but this file is mostly < 80 already and this extends it too far past... At least at the moment... Maybe in the future.

this extends it too far past

IMO for log messages etc. we should generally prefer not wrapping them and ignore line lengths, so that if someone can find them when doing e.g. grep "seconds, ncpu"

anyway I don't object to this, it's an improvement

Makefile.inc1
1810

OK. I mulled it and decided that > 80 columns isn't a big deal and it mostly looks better anyway...