RFR: JDK-8315278: Patch 'print-targets' target to print targets separated by new line
Erik Joelsson
erikj at openjdk.org
Wed Aug 30 14:16:14 UTC 2023
On Wed, 30 Aug 2023 03:12:18 GMT, Cesar Soares Lucas <cslucas at openjdk.org> wrote:
> Currently 'make print-targets' print all targets on the same line separated by space. That isn't only terribly to read but hard to "grep". Printing each target on a separate line seems much better.
>
> Tested on: Linux x64, Windows x64 and MacOS AArch64
make/Main.gmk line 1428:
> 1426:
> 1427: print-targets:
> 1428: @$(ECHO) $(sort $(ALL_TARGETS)) | $(TR) ' ' '\n'
If we are to do this, I would suggest reducing the amount of external commands used and keeping it to make functions, and also fixing the indentation.
Suggestion:
$(info $(subst $(SPACE),$(NEWLINE),$(sort $(ALL_TARGETS))))
I would also suggest applying the same change to all three print targets.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15479#discussion_r1310349294
More information about the build-dev
mailing list