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)
Sep 23 2024, 9:17 AM
Unknown Object (File)
Sep 21 2024, 3:14 AM
Unknown Object (File)
Sep 20 2024, 6:46 AM
Unknown Object (File)
Sep 19 2024, 7:11 PM
Unknown Object (File)
Sep 19 2024, 5:38 AM
Unknown Object (File)
Sep 16 2024, 8:07 AM
Unknown Object (File)
Sep 9 2024, 3:18 PM
Unknown Object (File)
Sep 9 2024, 2:35 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 54737
Build 51626: arc lint + arc unit

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
1811

or just extend the line beyond 80 cols?

Makefile.inc1
1811

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
1811

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