git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: D. Ben KnobleNext: D. Ben Knoble
Message 9 of 10 in “meson: make GIT_HTML_PATH configurable”
  1. meson: make GIT_HTML_PATH configurableD. Ben Knoble, Nov 4, 2025
  2. Junio C HamanoNov 4, 2025
  3. Ben KnobleNov 4, 2025
  4. Patrick SteinhardtNov 6, 2025
  5. Patrick SteinhardtNov 6, 2025
  6. Ben KnobleNov 6, 2025
  7. Junio C HamanoNov 6, 2025
  8. meson: make GIT_HTML_PATH configurableD. Ben Knoble, Nov 11, 2025
  9. Karthik NayakNov 11, 2025
  10. D. Ben KnobleNov 11, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.