]> git.ipfire.org Git - thirdparty/git.git/commit
meson.build: only set build variables for non-default values
authorRamsay Jones <ramsay@ramsayjones.plus.com>
Wed, 16 Apr 2025 23:18:24 +0000 (00:18 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 17 Apr 2025 03:43:43 +0000 (20:43 -0700)
commit65e3757c240422f4e1ffb8892786a1dfc24894f7
tree21e83a6dcd562ef9f4bd5483bced730384c9449b
parent507c63f96e02a27bdcc2c48377e7b0b9d1981458
meson.build: only set build variables for non-default values

Some preprocessor -Defines have defaults set in the source code when
they have not been provided to the C compiler. In this case, there is
no need to pass them on the command-line, unless the build requires a
non-standard value.

The build variables for DEFAULT_EDITOR and DEFAULT_PAGER have appropriate
defaults ('vi' and 'less') set in the code. Add the preprocessor -Defines
to the 'libgit_c_args' only if the values set with the corresponding
'options' are different to these standard values.

Also, the 'git-var' documentation contains some conditional text which
documents the chosen compiled in value, which would not read well for
the standard values. Similar to the above, only add the corresponding
'-a' attribute arguments to the 'asciidoc_common_options' variable, if
the values set in the 'options' are different to these standard values.

Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/meson.build
meson.build