Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8217730

Split up MakeBase.gmk



    • b06



        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.


          Issue Links



                ihse Magnus Ihse Bursie
                ihse Magnus Ihse Bursie
                0 Vote for this issue
                3 Start watching this issue