RFR: 8330107: Split Awt2dLibraries.gmk into separate AWT and 2D files
Magnus Ihse Bursie
ihse at openjdk.org
Mon Apr 15 07:56:44 UTC 2024
On Thu, 11 Apr 2024 13:53:23 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:
> The file to build most of the java.desktop native libraries, Awt2dLibraries.gmk, is large and unstructured, making it hard to navigate.
>
> I want to split it into two parts, one for the AWT libraries, and one for the 2D libraries. I also used this opportunity to change the order to be more logical (e.g. grouping "image" libraries and "font" libraries in 2D).
But the current solution is no good, either. For instance, the ordering is strange. awt_xawt and awt_lwawt is placed in opposite ends of the file, even though they are in some sense just platform specific variants of the same thing. And the entire file is huge and hard to navigate.
> and generally I see so manay references to 2D in the AWT file and vice versa.
> it isn't even true that "libawt" is awt. Libawt is mostly a misnomer, in one case more than mostly. It ought to be called "lib2d"
If this is the case, then it is clearly hopeless to try and split up the native code based on which area the source code used to compile it came from.
So let's go back to another approach: My starting point for this split was to take everything with "awt" in the name, and move it to a separate file. (I naively assumed that libs named "awt" belonged to AWT.) After reviewing the other libraries, my conclusion was to move yet another library there. But let's get that away from there.
So what if we keep the libraries named "awt" in a separate file, and all other in another file -- mostly this separation, but we agree that the reason for separation is not due to source code provenance, but just the name of the resulting libraries, and it does not need to signify anything but a need to be able to navigate in complex make files. And let's rename the "2dLibraries.gmk" file to `ClientLibraries.gmk` instead, so it is clear that there is no pretending that this is supposed to represent a 2D/AWT split.
Would that sound okay to you?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/18743#issuecomment-2055999383
More information about the build-dev
mailing list