libgit_c_args = [
'-DBINDIR="' + get_option('bindir') + '"',
'-DDEFAULT_GIT_TEMPLATE_DIR="' + get_option('datadir') / 'git-core/templates' + '"',
- '-DDEFAULT_HELP_FORMAT="' + get_option('default_help_format') + '"',
'-DETC_GITATTRIBUTES="' + get_option('gitattributes') + '"',
'-DETC_GITCONFIG="' + get_option('gitconfig') + '"',
'-DFALLBACK_RUNTIME_PREFIX="' + get_option('prefix') + '"',
libgit_c_args += '-DDEFAULT_PAGER="' + pager_opt + '"'
endif
+help_format_opt = get_option('default_help_format')
+if help_format_opt == 'platform'
+ if host_machine.system() == 'windows'
+ help_format_opt = 'html'
+ else
+ help_format_opt = 'man'
+ endif
+endif
+if help_format_opt != 'man'
+ libgit_c_args += '-DDEFAULT_HELP_FORMAT="' + help_format_opt + '"'
+endif
+
libgit_include_directories = [ '.' ]
libgit_dependencies = [ ]
# Documentation.
option('docs', type: 'array', choices: ['man', 'html'], value: [],
description: 'Which documenattion formats to build and install.')
-option('default_help_format', type: 'combo', choices: ['man', 'html'], value: 'man',
+option('default_help_format', type: 'combo', choices: ['man', 'html', 'platform'], value: 'platform',
description: 'Default format used when executing git-help(1).')
option('docs_backend', type: 'combo', choices: ['asciidoc', 'asciidoctor', 'auto'], value: 'auto',
description: 'Which backend to use to generate documentation.')