diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-12-23 09:32:19 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-12-23 09:32:19 -0800 |
| commit | 77825f755300f5ef84729b55e6e1e33e1dc60039 (patch) | |
| tree | f243d8d50e5dd33420f61a568d82117f069eff1a | |
| parent | 77edd59394b3200b672c4cfd50e067ddb6193e2b (diff) | |
| parent | 7d549fe317f8c4eea25f5212bc9f8e73b4b2608e (diff) | |
| download | git-77825f755300f5ef84729b55e6e1e33e1dc60039.tar.gz | |
Merge branch 'ps/build-meson-gitweb'
meson-based build still tried to build and install gitweb even when
Perl is disabled, which has been corrected.
* ps/build-meson-gitweb:
meson: skip gitweb build when Perl is disabled
| -rw-r--r-- | meson.build | 13 | ||||
| -rw-r--r-- | meson_options.txt | 2 |
2 files changed, 13 insertions, 2 deletions
diff --git a/meson.build b/meson.build index 0dccebcdf1..8e34a895dc 100644 --- a/meson.build +++ b/meson.build @@ -740,7 +740,7 @@ endif # features. It is optional if you want to neither execute tests nor use any of # these optional features. perl_required = get_option('perl') -if get_option('tests') +if get_option('tests') or get_option('gitweb').enabled() perl_required = true endif @@ -1874,7 +1874,15 @@ if intl.found() subdir('po') endif subdir('contrib') -subdir('gitweb') + +# Gitweb requires Perl, so we disable the auto-feature if Perl was not found. +# We make sure further up that Perl is required in case the gitweb option is +# enabled. +gitweb_option = get_option('gitweb').disable_auto_if(not perl.found()) +if gitweb_option.enabled() + subdir('gitweb') +endif + subdir('templates') # Everything but the bin-wrappers need to come before this target such that we @@ -1893,6 +1901,7 @@ summary({ 'curl': curl.found(), 'expat': expat.found(), 'gettext': intl.found(), + 'gitweb': gitweb_option.enabled(), 'https': https_backend, 'iconv': iconv.found(), 'pcre2': pcre2.found(), diff --git a/meson_options.txt b/meson_options.txt index 32a72139ba..c374345b1a 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -23,6 +23,8 @@ option('expat', type: 'feature', value: 'enabled', description: 'Build helpers used to push to remotes with the HTTP transport.') option('gettext', type: 'feature', value: 'auto', description: 'Build translation files.') +option('gitweb', type: 'feature', value: 'auto', + description: 'Build Git web interface. Requires Perl.') option('iconv', type: 'feature', value: 'auto', description: 'Support reencoding strings with different encodings.') option('pcre2', type: 'feature', value: 'enabled', |
