build: Allow separate build of Markdown and HTML keywords #5177
+69
−28
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The original Markdown support from #3849 breaks generating addon keywords on the doc build server because the parameter for addons used in the build script was ignored. The addon keywords are currently integated for 8.4, but are not integrated into the index for 8.5. This update should fix that.
The new code allows for the original usage of the script where documentation directories are supplied as parameters. This assumes HTML documentation and corresponds to the usage on the build server.
The intended usage from #3849 for the new build where both Markdown and HTML are build using the script without the build system providing parameters is preserved.
Finally, with parameters md , the script allows for creating Markdown keyword list with optionally integrated addons using the paths provided.
Unfortunately, ARCH_DISTDIR still needs to be set even in this case because it used directly a import time and a lot of other code uses that variable.
This also adds a main function to separate the variables and handle the parameters in one place. Additionally, it creates the dict for the first letter TOC only for HTML where it is used (which allows the script to execute without the fixes for empty keyword list from #5175).