Merge branch 'ps/meson-with-breaking-changes'
Update meson based build procedure for breaking changes support. * ps/meson-with-breaking-changes: meson: don't install git-pack-redundant(1) docs with breaking changes meson: don't compile git-pack-redundant(1) with breaking changes meson: define WITH_BREAKING_CHANGES when enabling breaking changesmaint
commit
64aef9217f
|
|
@ -509,7 +509,7 @@ lint-docs-meson:
|
|||
awk "/^manpages = {$$/ {flag=1 ; next } /^}$$/ { flag=0 } flag { gsub(/^ \047/, \"\"); gsub(/\047 : [157],\$$/, \"\"); print }" meson.build | \
|
||||
grep -v -e '#' -e '^$$' | \
|
||||
sort >tmp-meson-diff/meson.adoc && \
|
||||
ls git*.adoc scalar.adoc | grep -v -e git-bisect-lk2009.adoc -e git-tools.adoc >tmp-meson-diff/actual.adoc && \
|
||||
ls git*.adoc scalar.adoc | grep -v -e git-bisect-lk2009.adoc -e git-pack-redundant.adoc -e git-tools.adoc >tmp-meson-diff/actual.adoc && \
|
||||
if ! cmp tmp-meson-diff/meson.adoc tmp-meson-diff/actual.adoc; then \
|
||||
echo "Meson man pages differ from actual man pages:"; \
|
||||
diff -u tmp-meson-diff/meson.adoc tmp-meson-diff/actual.adoc; \
|
||||
|
|
|
|||
|
|
@ -97,7 +97,6 @@ manpages = {
|
|||
'git-notes.adoc' : 1,
|
||||
'git-p4.adoc' : 1,
|
||||
'git-pack-objects.adoc' : 1,
|
||||
'git-pack-redundant.adoc' : 1,
|
||||
'git-pack-refs.adoc' : 1,
|
||||
'git-patch-id.adoc' : 1,
|
||||
'git-prune-packed.adoc' : 1,
|
||||
|
|
@ -206,6 +205,14 @@ manpages = {
|
|||
'gitworkflows.adoc' : 7,
|
||||
}
|
||||
|
||||
manpages_breaking_changes = {
|
||||
'git-pack-redundant.adoc' : 1,
|
||||
}
|
||||
|
||||
if not get_option('breaking_changes')
|
||||
manpages += manpages_breaking_changes
|
||||
endif
|
||||
|
||||
docs_backend = get_option('docs_backend')
|
||||
if docs_backend == 'auto'
|
||||
if find_program('asciidoc', dirs: program_path, required: false).found()
|
||||
|
|
@ -480,7 +487,9 @@ endif
|
|||
# Sanity check that we are not missing any tests present in 't/'. This check
|
||||
# only runs once at configure time and is thus best-effort, only. Furthermore,
|
||||
# it only verifies man pages for the sake of simplicity.
|
||||
configured_manpages = manpages.keys() + [ 'git-bisect-lk2009.adoc', 'git-tools.adoc' ]
|
||||
configured_manpages = manpages.keys()
|
||||
configured_manpages += manpages_breaking_changes.keys()
|
||||
configured_manpages += [ 'git-bisect-lk2009.adoc', 'git-tools.adoc' ]
|
||||
actual_manpages = run_command(shell, '-c', 'ls git*.adoc scalar.adoc',
|
||||
check: true,
|
||||
env: script_environment,
|
||||
|
|
|
|||
18
meson.build
18
meson.build
|
|
@ -582,7 +582,6 @@ builtin_sources = [
|
|||
'builtin/name-rev.c',
|
||||
'builtin/notes.c',
|
||||
'builtin/pack-objects.c',
|
||||
'builtin/pack-redundant.c',
|
||||
'builtin/pack-refs.c',
|
||||
'builtin/patch-id.c',
|
||||
'builtin/prune-packed.c',
|
||||
|
|
@ -633,6 +632,10 @@ builtin_sources = [
|
|||
'builtin/write-tree.c',
|
||||
]
|
||||
|
||||
if not get_option('breaking_changes')
|
||||
builtin_sources += 'builtin/pack-redundant.c'
|
||||
endif
|
||||
|
||||
builtin_sources += custom_target(
|
||||
output: 'config-list.h',
|
||||
command: [
|
||||
|
|
@ -673,12 +676,6 @@ build_options_config.set_quoted('GIT_TEST_UTF8_LOCALE', get_option('test_utf8_lo
|
|||
build_options_config.set_quoted('LOCALEDIR', fs.as_posix(get_option('prefix') / get_option('localedir')))
|
||||
build_options_config.set('GITWEBDIR', fs.as_posix(get_option('prefix') / get_option('datadir') / 'gitweb'))
|
||||
|
||||
if get_option('breaking_changes')
|
||||
build_options_config.set('WITH_BREAKING_CHANGES', 'YesPlease')
|
||||
else
|
||||
build_options_config.set('WITH_BREAKING_CHANGES', '')
|
||||
endif
|
||||
|
||||
if get_option('sane_tool_path').length() != 0
|
||||
sane_tool_path = (host_machine.system() == 'windows' ? ';' : ':').join(get_option('sane_tool_path'))
|
||||
build_options_config.set_quoted('BROKEN_PATH_FIX', 's|^\# @BROKEN_PATH_FIX@$|git_broken_path_fix "' + sane_tool_path + '"|')
|
||||
|
|
@ -740,6 +737,13 @@ if get_option('warning_level') in ['2','3', 'everything'] and compiler.get_argum
|
|||
endforeach
|
||||
endif
|
||||
|
||||
if get_option('breaking_changes')
|
||||
build_options_config.set('WITH_BREAKING_CHANGES', 'YesPlease')
|
||||
libgit_c_args += '-DWITH_BREAKING_CHANGES'
|
||||
else
|
||||
build_options_config.set('WITH_BREAKING_CHANGES', '')
|
||||
endif
|
||||
|
||||
if get_option('b_sanitize').contains('address')
|
||||
build_options_config.set('SANITIZE_ADDRESS', 'YesCompiledWithIt')
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in New Issue