-
Bug
-
Resolution: Fixed
-
P3
-
13
-
b06
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8301583 | 11.0.19 | Goetz Lindenmaier | P3 | Resolved | Fixed | b01 |
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.
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.
- backported by
-
JDK-8301583 Split up MakeBase.gmk
- Resolved