RFR: JDK-8315278: Patch 'print-targets' target to print targets separated by new line
Erik Joelsson
erikj at openjdk.org
Wed Aug 30 14:10:09 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
I'm not sure about this change. There are three similar and somewhat related diagnostic targets `print-targets` `print-modules` and `print-tests` that currently behave in the same way. If we are to change that behavior, then I think it needs to be uniform. What is your usecase for `print-targets`? Are you using it to find appropriate targets using grep manually? If so, I can see why newline separation would be preferable. I just want to be sure that we aren't breaking some other common usecase.
Historically, `print-targets` was first introduced to help support bash completion by having a way of communicating the full target list from Main.gmk to Init.gmk. That was changed in JDK-8076465 where we started caching the list of targets in a generated makefile to improve performance, and `print-targets` was left as a diagnostics tool.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15479#issuecomment-1699259352
More information about the build-dev
mailing list