Re: [PATCH] meson: make GIT_HTML_PATH configurable
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- Nov 11, 2025, 13:43 UTC
- Message-ID
- <CAOLa=ZTViq=OYoMQNdvi3rV+iUucGZ4RN0c7X_Q0PEugaEqqJQ@mail.gmail.com>
- In-Reply-To
- <d6b86ed23e28c875b48fdc77095ace3f8ff4ee5d.1762820704.git.ben.knoble+github@gmail.com>
"D. Ben Knoble" <ben.knoble+github@gmail.com> writes:
[snip]
Show 49 quoted lines
> diff --git a/meson.build b/meson.build
> index 2b763f7c53..1f95a06edb 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -768,13 +768,18 @@ if test_output_directory == ''
> test_output_directory = meson.project_build_root() / 'test-output'
> endif
>
> +htmldir = get_option('htmldir')
> +if htmldir == ''
> + htmldir = get_option('datadir') / 'doc/git-doc'
> +endif
> +
> # These variables are used for building libgit.a.
> libgit_c_args = [
> '-DBINDIR="' + get_option('bindir') + '"',
> '-DDEFAULT_GIT_TEMPLATE_DIR="' + get_option('datadir') / 'git-core/templates' + '"',
> '-DFALLBACK_RUNTIME_PREFIX="' + get_option('prefix') + '"',
> '-DGIT_HOST_CPU="' + host_machine.cpu_family() + '"',
> - '-DGIT_HTML_PATH="' + get_option('datadir') / 'doc/git-doc"',
> + '-DGIT_HTML_PATH="' + htmldir + '"',
> '-DGIT_INFO_PATH="' + get_option('infodir') + '"',
> '-DGIT_LOCALE_PATH="' + get_option('localedir') + '"',
> '-DGIT_MAN_PATH="' + get_option('mandir') + '"',
> diff --git a/meson_options.txt b/meson_options.txt
> index 143dee9237..e0be260ae1 100644
> --- a/meson_options.txt
> +++ b/meson_options.txt
> @@ -1,4 +1,6 @@
> # Configuration for Git installation
> +option('htmldir', type: 'string', value: '',
> + description: 'Directory to install HTML docs to. Defaults to <datadir>/doc/git-doc')
> option('perllibdir', type: 'string', value: '',
> description: 'Directory to install perl lib to. Defaults to <datadir>/perl5')
>
>
> Diff-intervalle :
> 1: 385992f602 ! 1: d6b86ed23e meson: make GIT_HTML_PATH configurable
> @@ meson.build: if test_output_directory == ''
> ## meson_options.txt ##
> @@
> # Configuration for Git installation
> - option('perllibdir', type: 'string', value: '',
> - description: 'Directory to install perl lib to. Defaults to <datadir>/perl5')
> +option('htmldir', type: 'string', value: '',
> + description: 'Directory to install HTML docs to. Defaults to <datadir>/doc/git-doc')
> + option('perllibdir', type: 'string', value: '',
> + description: 'Directory to install perl lib to. Defaults to <datadir>/perl5')
>I guess meson doesn't allow recursive dependency for build options? I was hoping we could do `value: get_option('datadir') / 'doc/git-doc'` and remove the custom block which checks for empty value above.
Anyways the patch looks good.
Show 6 quoted lines
> - # Configuration for how Git behaves at runtime.
> - option('default_pager', type: 'string', value: 'less',
>
> base-commit: 7f278e958afbf9b7e0727631b4c26dcfa1c63d6e
> --
> 2.52.0.rc0.71.g03eda12af0.dirty