RFR: JDK-8217730 Split up MakeBase.gmk

Erik Joelsson erik.joelsson at oracle.com
Thu Jan 24 17:25:58 UTC 2019


Looks good.

/Erik

On 2019-01-24 06:24, Magnus Ihse Bursie wrote:
> The file MakeBase.gmk, which is included by virtually all other make 
> files in the build system, has become gradually larger and larger. It 
> is now one of the longest files in the build system, with little to no 
> internal structure.
>
> I propose to split it in four parts:
>
> * Utils.gmk -- here all the simple make functions go; stuff that 
> basically do not interact with the rest of the world, but just 
> provides "high-level" macros to make.
>
> * CopyFiles.gmk -- here the SetupCopyFiles function goes, similar to 
> how we treat all other SetupFoo functions.
>
> * MakeIO.gmk -- here reading and writing to files from make goes. This 
> is mostly due to the long expression of ListPathsSafely on GNU Make 
> prior to 4.0.
>
> *MakeBase.gmk -- functions now remaining here belong to either of 
> these groups:
>  -- it is some kind of core functionality provided by the build 
> system, like ExecuteWithLog or NamedParamsMacroTemplate.
>  -- it interacts (messily) with the environment
>  -- it does something else that is tricky, or just "misc"
>
> It is of course possible to break down the remaining MakeBase.gmk even 
> further, but it's so much more manageable now, and there are no clear 
> ways of splitting it further without getting into very small pieces 
> (like logging), so I think I'll stop here, for now.
>
> To retain backwards compatibility with files that include MakeBase.gmk 
> and expect all functionality, MakeBase.gmk includes the new files. 
> It's a future question if we should keep it that way, or put the 
> requirement of those includes on the files needing the functionality.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8217730
> WebRev: 
> http://cr.openjdk.java.net/~ihse/JDK-8217730-split-up-MakeBase/webrev.01
>
> /Magnus



More information about the build-dev mailing list