mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
Merge branch 'rj/build-tweaks'
Various build tweaks, including CSPRNG selection on some platforms. * rj/build-tweaks: config.mak.uname: set CSPRNG_METHOD to getrandom on Linux config.mak.uname: add arc4random to the cygwin build config.mak.uname: add sysinfo() configuration for cygwin builtin/gc.c: correct RAM calculation when using sysinfo config.mak.uname: add clock_gettime() to the cygwin build config.mak.uname: add HAVE_GETDELIM to the cygwin section config.mak.uname: only set NO_REGEX on cygwin for v1.7 config.mak.uname: add a note about NO_STRLCPY for Linux Makefile: remove NEEDS_LIBRT build variable meson.build: set default help format to html on windows meson.build: only set build variables for non-default values Makefile: only set some BASIC_CFLAGS when RUNTIME_PREFIX is set meson.build: remove -DCURL_DISABLE_TYPECHECK
This commit is contained in:
27
meson.build
27
meson.build
@@ -727,10 +727,7 @@ endif
|
||||
# These variables are used for building libgit.a.
|
||||
libgit_c_args = [
|
||||
'-DBINDIR="' + get_option('bindir') + '"',
|
||||
'-DDEFAULT_EDITOR="' + get_option('default_editor') + '"',
|
||||
'-DDEFAULT_GIT_TEMPLATE_DIR="' + get_option('datadir') / 'git-core/templates' + '"',
|
||||
'-DDEFAULT_HELP_FORMAT="' + get_option('default_help_format') + '"',
|
||||
'-DDEFAULT_PAGER="' + get_option('default_pager') + '"',
|
||||
'-DETC_GITATTRIBUTES="' + get_option('gitattributes') + '"',
|
||||
'-DETC_GITCONFIG="' + get_option('gitconfig') + '"',
|
||||
'-DFALLBACK_RUNTIME_PREFIX="' + get_option('prefix') + '"',
|
||||
@@ -742,6 +739,29 @@ libgit_c_args = [
|
||||
'-DPAGER_ENV="' + get_option('pager_environment') + '"',
|
||||
'-DSHELL_PATH="' + fs.as_posix(target_shell.full_path()) + '"',
|
||||
]
|
||||
|
||||
editor_opt = get_option('default_editor')
|
||||
if editor_opt != '' and editor_opt != 'vi'
|
||||
libgit_c_args += '-DDEFAULT_EDITOR="' + editor_opt + '"'
|
||||
endif
|
||||
|
||||
pager_opt = get_option('default_pager')
|
||||
if pager_opt != '' and pager_opt != 'less'
|
||||
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 = [ ]
|
||||
|
||||
@@ -1012,7 +1032,6 @@ if curl.found()
|
||||
# Most executables don't have to link against libcurl, but we still need its
|
||||
# include directories so that we can resolve LIBCURL_VERSION in "help.c".
|
||||
libgit_dependencies += curl.partial_dependency(includes: true)
|
||||
libgit_c_args += '-DCURL_DISABLE_TYPECHECK'
|
||||
build_options_config.set('NO_CURL', '')
|
||||
else
|
||||
libgit_c_args += '-DNO_CURL'
|
||||
|
||||
Reference in New Issue
Block a user