The gen-manpages.py script was missing critical build option checks, causing incomplete man page generation. This commit adds comprehensive build option detection to ensure all available options are documented.
Changes made:
- Add missing USE_UPNP build option detection (core requirement from #17506)
- Remove unused build options that were listed but not actually used
- Add error handling for missing ‘components’ section in config.ini
- Improve code structure with proper function organization
The script now prevents generation of incomplete man pages by all required build options and provides clear error messages when components are missing. Users can use –skip-build-options-check to bypass this check if needed.
Fixes #17506