On Wed, 8 May 2024 01:02:41 GMT, Erik Joelsson <er...@openjdk.org> wrote:

> For c, c++  and java source files, we have a built in system for letting more 
> specific files override if there are multiple files with the same name found, 
> by letting the first found file with a given name override any later found 
> files with that name. This is typically used for OS specific variants or when 
> needing to override a source file with a file from a custom source set. We 
> would like to make it possible to do the same for markdown files used to 
> generate man pages.
> 
> This will not have an immediate use i OpenJDK, but is needed for a custom 
> override in proprietary code.
> 
> The change in Docs.gmk removes unnecessary extra loops so that 
> SetupProcessMarkdown is called only once per module. This is necessary for 
> the override mechanism to kick in for each module src set.
> 
> The logic in ProcessMarkdown.gmk is more or less copied from 
> SetupNativeCompilation.

make/common/ProcessMarkdown.gmk line 43:

> 41:   # Only continue if this target file hasn't been processed already. This 
> lets
> 42:   # the first found source file override any other with the same name.
> 43:   $$(call PrintVar, $1_$2_INPUT_FILE)

Left-over debug code.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/19132#discussion_r1593782745

Reply via email to