This is a redo of [JDK-8325963](https://bugs.openjdk.org/browse/JDK-8325963). The original patch caused problems on the Oracle internal CI system, and was backed out.
The difference in this patch is that `GetEntitlementsFile` can now work stand-alone if called from a custom makefile. This can be seen in a [separate commit](https://github.com/openjdk/jdk/pull/17946/commits/394bb7c2994b59e1cf977fc5e664643d0a365f78) for ease of reviewing. ------------- Commit messages: - Make sure GetEntitlementsFile can be called from custom makefiles. - 8326375: [REDO] Clean up NativeCompilation.gmk and its newly created parts Changes: https://git.openjdk.org/jdk/pull/17946/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17946&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8326375 Stats: 374 lines in 6 files changed: 127 ins; 122 del; 125 mod Patch: https://git.openjdk.org/jdk/pull/17946.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/17946/head:pull/17946 PR: https://git.openjdk.org/jdk/pull/17946