Skip to content

Commit b30cf1f

Browse files
committed
Merge branch 'dk/meson-html-dir' into next
The build procedure based on meson learned to allow builders to specify the directory to install HTML documents. * dk/meson-html-dir: meson: make GIT_HTML_PATH configurable
2 parents ed74bef + d63417e commit b30cf1f

File tree

7 files changed

+20
-13
lines changed

7 files changed

+20
-13
lines changed

Documentation/howto/meson.build

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ doc_targets += custom_target(
3535
output: 'howto-index.html',
3636
depends: documentation_deps,
3737
install: true,
38-
install_dir: get_option('datadir') / 'doc/git-doc',
38+
install_dir: htmldir,
3939
)
4040

4141
foreach howto : howto_sources
@@ -57,6 +57,6 @@ foreach howto : howto_sources
5757
output: fs.stem(howto_stripped.full_path()) + '.html',
5858
depends: documentation_deps,
5959
install: true,
60-
install_dir: get_option('datadir') / 'doc/git-doc/howto',
60+
install_dir: htmldir / 'howto',
6161
)
6262
endforeach

Documentation/meson.build

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ foreach manpage, category : manpages
412412
input: manpage,
413413
output: fs.stem(manpage) + '.html',
414414
install: true,
415-
install_dir: get_option('datadir') / 'doc/git-doc',
415+
install_dir: htmldir,
416416
)
417417
endif
418418
endforeach
@@ -423,19 +423,19 @@ if get_option('docs').contains('html')
423423
output: 'docinfo.html',
424424
copy: true,
425425
install: true,
426-
install_dir: get_option('datadir') / 'doc/git-doc',
426+
install_dir: htmldir,
427427
)
428428

429429
configure_file(
430430
input: 'docbook-xsl.css',
431431
output: 'docbook-xsl.css',
432432
copy: true,
433433
install: true,
434-
install_dir: get_option('datadir') / 'doc/git-doc',
434+
install_dir: htmldir,
435435
)
436436

437437
install_symlink('index.html',
438-
install_dir: get_option('datadir') / 'doc/git-doc',
438+
install_dir: htmldir,
439439
pointing_to: 'git.html',
440440
)
441441

@@ -466,7 +466,7 @@ if get_option('docs').contains('html')
466466
input: 'docbook.xsl',
467467
output: 'user-manual.html',
468468
install: true,
469-
install_dir: get_option('datadir') / 'doc/git-doc',
469+
install_dir: htmldir,
470470
)
471471

472472
articles = [
@@ -492,7 +492,7 @@ if get_option('docs').contains('html')
492492
output: fs.stem(article) + '.html',
493493
depends: documentation_deps,
494494
install: true,
495-
install_dir: get_option('datadir') / 'doc/git-doc',
495+
install_dir: htmldir,
496496
)
497497
endforeach
498498

Documentation/technical/meson.build

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ doc_targets += custom_target(
5353
output: 'api-index.html',
5454
depends: documentation_deps,
5555
install: true,
56-
install_dir: get_option('datadir') / 'doc/git-doc/technical',
56+
install_dir: htmldir / 'technical',
5757
)
5858

5959
foreach article : api_docs + articles
@@ -63,6 +63,6 @@ foreach article : api_docs + articles
6363
output: fs.stem(article) + '.html',
6464
depends: documentation_deps,
6565
install: true,
66-
install_dir: get_option('datadir') / 'doc/git-doc/technical',
66+
install_dir: htmldir / 'technical',
6767
)
6868
endforeach

contrib/contacts/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,6 @@ if get_option('docs').contains('html')
5050
input: 'git-contacts.adoc',
5151
output: 'git-contacts.html',
5252
install: true,
53-
install_dir: get_option('datadir') / 'doc/git-doc',
53+
install_dir: htmldir,
5454
)
5555
endif

contrib/subtree/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,6 @@ if get_option('docs').contains('html')
6868
input: 'git-subtree.adoc',
6969
output: 'git-subtree.html',
7070
install: true,
71-
install_dir: get_option('datadir') / 'doc/git-doc',
71+
install_dir: htmldir,
7272
)
7373
endif

meson.build

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,13 +768,18 @@ if test_output_directory == ''
768768
test_output_directory = meson.project_build_root() / 'test-output'
769769
endif
770770

771+
htmldir = get_option('htmldir')
772+
if htmldir == ''
773+
htmldir = get_option('datadir') / 'doc/git-doc'
774+
endif
775+
771776
# These variables are used for building libgit.a.
772777
libgit_c_args = [
773778
'-DBINDIR="' + get_option('bindir') + '"',
774779
'-DDEFAULT_GIT_TEMPLATE_DIR="' + get_option('datadir') / 'git-core/templates' + '"',
775780
'-DFALLBACK_RUNTIME_PREFIX="' + get_option('prefix') + '"',
776781
'-DGIT_HOST_CPU="' + host_machine.cpu_family() + '"',
777-
'-DGIT_HTML_PATH="' + get_option('datadir') / 'doc/git-doc"',
782+
'-DGIT_HTML_PATH="' + htmldir + '"',
778783
'-DGIT_INFO_PATH="' + get_option('infodir') + '"',
779784
'-DGIT_LOCALE_PATH="' + get_option('localedir') + '"',
780785
'-DGIT_MAN_PATH="' + get_option('mandir') + '"',

meson_options.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Configuration for Git installation
2+
option('htmldir', type: 'string', value: '',
3+
description: 'Directory to install HTML docs to. Defaults to <datadir>/doc/git-doc')
24
option('perllibdir', type: 'string', value: '',
35
description: 'Directory to install perl lib to. Defaults to <datadir>/perl5')
46

0 commit comments

Comments
 (0)