Hi, this patch series modernizes our build infrasturcture. It refactors various parts of it to make it possible to perform out-of-tree builds in theory. The series then continues to wire up Meson as a proposed alternative as a modern replacement for our current build systems. It provides better integration into IDEs than our Makefiles, better usability than our Makefiles and CMake, better configuration and discoverability thereof than autoconf and CMake (which is of course my personal opinion). The intent is to have Meson replace autoconf, which is mostly unused and broken. Eventually, the plan is to also replace CMake and our Makefiles in case we figure out that this replacement is indeed a net benefit for the project, but all of this would happen over the course of multiple releases. Changes in v10: - Fix installation of templates, which all installed into the template root directory by accident. - Fix symlinks for git-receive-pack and git-upload-{archive,pack}. - Dropped the compatibility fix with cc/promisor-remote-capability, which has been removed from "seen". As before, the tip of this patch series catches up with what is happening in "seen" and should thus not be merged to "next". If you want to test it without topics in "seen" you have to revert it. Thanks! Patrick --- Patrick Steinhardt (23): Makefile: use common template for GIT-BUILD-OPTIONS Makefile: consistently use @PLACEHOLDER@ to substitute Makefile: refactor GIT-VERSION-GEN to be reusable Makefile: propagate Git version via generated header Makefile: generate "git.rc" via GIT-VERSION-GEN Makefile: generate doc versions via GIT-VERSION-GEN Makefile: consistently use PERL_PATH Makefile: extract script to massage Perl scripts Makefile: use "generate-perl.sh" to massage Perl library Makefile: extract script to massage Shell scripts Makefile: extract script to generate gitweb.cgi Makefile: extract script to generate gitweb.js Makefile: refactor generators to be PWD-independent Makefile: allow "bin-wrappers/" directory to exist Makefile: simplify building of templates Documentation: allow sourcing generated includes from separate dir Documentation: teach "cmd-list.perl" about out-of-tree builds Documentation: extract script to generate a list of mergetools t: better support for out-of-tree builds t: allow overriding build dir Documentation: add comparison of build systems Introduce support for the Meson build system meson: fix conflicts with in-flight topics .gitignore | 3 +- Documentation/.gitignore | 2 + Documentation/CodingGuidelines | 2 +- Documentation/Makefile | 49 +- Documentation/{asciidoc.conf => asciidoc.conf.in} | 3 + ...-extensions.rb => asciidoctor-extensions.rb.in} | 8 +- Documentation/build-docdep.perl | 2 + Documentation/cmd-list.perl | 23 +- Documentation/config/diff.txt | 2 +- Documentation/config/merge.txt | 2 +- Documentation/generate-mergetool-list.sh | 17 + Documentation/git.txt | 24 +- Documentation/meson.build | 324 ++++ Documentation/technical/build-systems.txt | 224 +++ GIT-BUILD-OPTIONS.in | 47 + GIT-VERSION-FILE.in | 1 + GIT-VERSION-GEN | 74 +- Makefile | 241 ++- bin-wrappers/.gitignore | 9 + bin-wrappers/meson.build | 28 + bin-wrappers/wrap-for-bin.sh | 37 + ci/test-documentation.sh | 2 +- configure.ac | 2 +- contrib/buildsystems/CMakeLists.txt | 287 +-- contrib/buildsystems/git-version.in | 1 + contrib/completion/meson.build | 8 + contrib/meson.build | 1 + generate-cmdlist.sh | 42 +- generate-configlist.sh | 20 +- generate-hooklist.sh | 15 +- generate-perl.sh | 37 + generate-script.sh | 34 + git-cvsserver.perl | 2 +- git-instaweb.sh | 8 +- git-request-pull.sh | 2 +- git-send-email.perl | 2 +- git-sh-i18n.sh | 6 +- git-sh-setup.sh | 6 +- git-svn.perl | 2 +- git.rc => git.rc.in | 6 +- gitweb/GITWEB-BUILD-OPTIONS.in | 24 + gitweb/Makefile | 62 +- gitweb/generate-gitweb-cgi.sh | 47 + gitweb/generate-gitweb-js.sh | 12 + gitweb/gitweb.perl | 44 +- gitweb/meson.build | 79 + meson.build | 1893 ++++++++++++++++++++ meson_options.txt | 81 + perl/FromCPAN/Mail/meson.build | 7 + perl/FromCPAN/meson.build | 9 + perl/Git/I18N.pm | 6 +- perl/Git/LoadCPAN.pm | 6 +- perl/Git/LoadCPAN/Mail/meson.build | 7 + perl/Git/LoadCPAN/meson.build | 9 + perl/Git/SVN/Memoize/meson.build | 7 + perl/Git/SVN/meson.build | 20 + perl/Git/meson.build | 18 + perl/header_templates/fixed_prefix.template.pl | 2 +- perl/header_templates/runtime_prefix.template.pl | 8 +- perl/meson.build | 12 + po/meson.build | 27 + subprojects/.gitignore | 1 + subprojects/curl.wrap | 13 + subprojects/expat.wrap | 13 + subprojects/openssl.wrap | 15 + subprojects/pcre2.wrap | 16 + subprojects/zlib.wrap | 13 + t/helper/meson.build | 93 + t/lib-gettext.sh | 4 +- t/meson.build | 1116 ++++++++++++ t/t7609-mergetool--lib.sh | 2 +- t/test-lib.sh | 31 +- templates/Makefile | 39 +- templates/branches-- | 1 - templates/{this--description => description} | 0 .../applypatch-msg.sample} | 0 .../commit-msg.sample} | 0 .../fsmonitor-watchman.sample} | 0 templates/hooks/meson.build | 26 + .../post-update.sample} | 0 .../pre-applypatch.sample} | 0 .../pre-commit.sample} | 0 .../pre-merge-commit.sample} | 0 .../pre-push.sample} | 0 .../pre-rebase.sample} | 0 .../pre-receive.sample} | 0 .../prepare-commit-msg.sample} | 0 .../push-to-checkout.sample} | 0 .../sendemail-validate.sample} | 0 .../{hooks--update.sample => hooks/update.sample} | 0 templates/{info--exclude => info/exclude} | 0 templates/info/meson.build | 7 + templates/meson.build | 15 + unimplemented.sh | 2 +- version-def.h.in | 8 + version.c | 1 + wrap-for-bin.sh | 36 - 97 files changed, 4938 insertions(+), 499 deletions(-) Range-diff versus v9: 1: b2615d9610 = 1: da33c9c584 Makefile: use common template for GIT-BUILD-OPTIONS 2: afba38c430 = 2: 65a99e0be3 Makefile: consistently use @PLACEHOLDER@ to substitute 3: 1f5dcbb860 = 3: cae4617b14 Makefile: refactor GIT-VERSION-GEN to be reusable 4: 1b2da30065 = 4: 7ae8540ae5 Makefile: propagate Git version via generated header 5: d88a943419 = 5: 79fe87e027 Makefile: generate "git.rc" via GIT-VERSION-GEN 6: 0ad3eb80a7 = 6: ad3b326a61 Makefile: generate doc versions via GIT-VERSION-GEN 7: d615b64ebf = 7: 21cd6d1751 Makefile: consistently use PERL_PATH 8: 788b49edca = 8: 3bda1aaf94 Makefile: extract script to massage Perl scripts 9: 3ade250267 = 9: 406c0e8769 Makefile: use "generate-perl.sh" to massage Perl library 10: ec30fe9652 = 10: 90796b17b9 Makefile: extract script to massage Shell scripts 11: 69eb45ea9f = 11: 7b5e7fc222 Makefile: extract script to generate gitweb.cgi 12: ab8c2e7369 = 12: eda2a5fafa Makefile: extract script to generate gitweb.js 13: c88ee27d88 = 13: 709ab3b5f5 Makefile: refactor generators to be PWD-independent 14: 105bb4c1bd = 14: e79f104d7f Makefile: allow "bin-wrappers/" directory to exist 15: f3f7db5c82 = 15: aa816a6cb9 Makefile: simplify building of templates 16: 1262542641 = 16: 864296d108 Documentation: allow sourcing generated includes from separate dir 17: 31f53f3570 = 17: 960d1782a7 Documentation: teach "cmd-list.perl" about out-of-tree builds 18: 9f4fdec5dc = 18: fc803341f4 Documentation: extract script to generate a list of mergetools 19: 8a88e5fb35 = 19: 17f0e185df t: better support for out-of-tree builds 20: 296db4ba81 = 20: 60d746f329 t: allow overriding build dir 21: f47bc0535b = 21: 3f7df3af22 Documentation: add comparison of build systems 22: 99258d7e4f = 22: 7db23c5fdb Introduce support for the Meson build system 23: 584b0ef151 ! 23: 1a0c47c47f meson: fix conflicts with in-flight topics @@ Commit message - ej/cat-file-remote-object-info adds t1017 and "fetch-object-info.c". - - cc/promisor-remote-capability adds t5710. - - ds/path-walk-1 adds t6601 as well as "path-walk.c" and "test-path-walk.c". @@ meson.build: libgit_sources = [ 'reftable/tree.c', 'reftable/writer.c', 'remote.c', +@@ meson.build: foreach alias : [ 'git-receive-pack', 'git-upload-archive', 'git-upload-pack' ] + + install_symlink(alias + executable_suffix, + install_dir: get_option('libexecdir') / 'git-core', +- pointing_to: 'git-remote-http', ++ pointing_to: 'git', + ) + endforeach + ## t/helper/meson.build ## @@ t/helper/meson.build: test_tool_sources = [ @@ t/meson.build: integration_tests = [ 't2500-untracked-overwriting.sh', 't2501-cwd-empty.sh', 't3000-ls-files-others.sh', -@@ t/meson.build: integration_tests = [ - 't5703-upload-pack-ref-in-want.sh', - 't5704-protocol-violations.sh', - 't5705-session-id-in-capabilities.sh', -+ 't5710-promisor-remote-capability.sh', - 't5730-protocol-v2-bundle-uri-file.sh', - 't5731-protocol-v2-bundle-uri-git.sh', - 't5732-protocol-v2-bundle-uri-http.sh', @@ t/meson.build: integration_tests = [ 't6500-gc.sh', 't6501-freshen-objects.sh', @@ t/meson.build: integration_tests = [ 't6700-tree-depth.sh', 't7001-mv.sh', 't7002-mv-sparse-checkout.sh', + + ## templates/hooks/meson.build ## +@@ templates/hooks/meson.build: foreach hook : hooks + output: hook, + configuration: template_config, + install: true, +- install_dir: get_option('datadir') / 'git-core/templates', ++ install_dir: get_option('datadir') / 'git-core/templates/hooks', + ) + endforeach + + ## templates/info/meson.build ## +@@ templates/info/meson.build: configure_file( + output: 'exclude', + configuration: template_config, + install: true, +- install_dir: get_option('datadir') / 'git-core/templates', ++ install_dir: get_option('datadir') / 'git-core/templates/info', + ) --- base-commit: dbfa873276ccefac0b426e46f31101ecdbcf4f40 change-id: 20241112-pks-meson-95b665c08f06