{"thread":{"id":"65132","subject":"[PATCH RFC 0/2] Makefile: deprecate autoconf build infrastructure","startedAt":"2026-03-04T08:23:46Z","lastAt":"2026-03-11T07:51:29Z","messageCount":5,"participants":["Patrick Steinhardt","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"537764","messageId":"20260304-pks-autoconf-deprecation-v1-0-f5b611b13138@pks.im","threadId":"65132","inReplyTo":null,"subject":"[PATCH RFC 0/2] Makefile: deprecate autoconf build infrastructure","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-03-04T08:22:59Z","receivedAt":"2026-03-04T08:23:46Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"Hi,\n\nroundabout 1.5 years ago we had a long discussion that eventually led to\na rough consensus that we'd rather want to get rid of our autoconf build\ninfrastucture. This eventually led to the introduction of Meson to cover\nthis use case, which has stabilized for quite a while by now.\n\nThis patch series thus starts the deprecation period of the autoconf\nbuild infrastructure. Target for removal is Git 2.55 for now, but I'm\nvery open for discussions here. I also assume that depending on feedback\nfrom packagers we may need to adapt the timeline.\n\nThanks!\n\nPatrick\n\n---\nPatrick Steinhardt (2):\n      INSTALL: recommend Meson instead of autoconf\n      Makefile: deprecate autoconf build infrastructure\n\n INSTALL      | 11 +++++------\n configure.ac | 32 ++++++++++++++++++++++++++++++++\n 2 files changed, 37 insertions(+), 6 deletions(-)\n\n\n---\nbase-commit: 2cc71917514657b93014134350864f4849edfc83\nchange-id: 20260302-pks-autoconf-deprecation-4657b6fc83aa\n\n"},{"id":"537765","messageId":"20260304-pks-autoconf-deprecation-v1-1-f5b611b13138@pks.im","threadId":"65132","inReplyTo":"20260304-pks-autoconf-deprecation-v1-0-f5b611b13138@pks.im","subject":"[PATCH RFC 1/2] INSTALL: recommend Meson instead of autoconf","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-03-04T08:23:00Z","receivedAt":"2026-03-04T08:23:48Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"We're about to deprecate our autoconf build infrastructure, but we still\nmention it as part of our \"INSTALL\" file. Switch over to recommend Meson\ninstead.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n INSTALL | 11 +++++------\n 1 file changed, 5 insertions(+), 6 deletions(-)\n\ndiff --git a/INSTALL b/INSTALL\nindex 54d7528f9e..a8b4c7f1b4 100644\n--- a/INSTALL\n+++ b/INSTALL\n@@ -17,13 +17,12 @@ The beginning of the Makefile documents many variables that affect the way\n git is built.  You can override them either from the command line, or in a\n config.mak file.\n \n-Alternatively you can use autoconf generated ./configure script to\n-set up install paths (via config.mak.autogen), so you can write instead\n+Alternatively you can use Meson to autoconfigure your system and set up install\n+paths, so you can write instead\n \n-\t$ make configure ;# as yourself\n-\t$ ./configure --prefix=/usr ;# as yourself\n-\t$ make all doc ;# as yourself\n-\t# make install install-doc install-html;# as root\n+\t$ meson setup build -Dprefix=/usr ;# as yourself\n+\t$ meson compile -C build ;# as yourself\n+\t# meson install -C build ;# as root\n \n If you're willing to trade off (much) longer build time for a later\n faster git you can also do a profile feedback build with\n\n-- \n2.53.0.697.g625c4fb2da.dirty\n\n"},{"id":"537766","messageId":"20260304-pks-autoconf-deprecation-v1-2-f5b611b13138@pks.im","threadId":"65132","inReplyTo":"20260304-pks-autoconf-deprecation-v1-0-f5b611b13138@pks.im","subject":"[PATCH RFC 2/2] Makefile: deprecate autoconf build infrastructure","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-03-04T08:23:01Z","receivedAt":"2026-03-04T08:23:50Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"Git currently ships with three-and-a-half build systems:\n\n  - Our plain Makefile.\n\n  - Meson, which has been introduced rather recently.\n\n  - CMake, which is part of \"contrib/\" and used for Git for Windows\n    development.\n\n  - autoconf, which only counts as half a build system as it is\n    integrated with our Makefile.\n\nOut of these, the autoconf infrastructure is probably by far the most\nunloved one. Its syntax is arcane, it has bugs, and it is generally not\nrecommended to use it. This has led to a rather long discussion [1],\nwhere the project had general consensus that this infrastructure is not\nexactly loved and that it'd rather want to get rid of it in the long\nterm.\n\nThis discussion eventually led to the addition of Meson as a modern\nreplacement that can cover the autoconfiguration part of our autoconf\ninfrastructure. Meson has by now been around for a bit and has generally\nstabilized over the last couple releases. With the recent addition of\nsupport for gitk and git-gui it should now support all features that are\nrequired by distributions to use it. In fact, some distributions like\nGentoo use Meson already, and GitLab uses Meson for its production\nbuilds of Git. So it should overall be ready for distributions to use.\n\nDeprecate the autoconf infrastructure so that we error out by default\nwith a hint what packagers are expected to use instead. This behaviour\ncan be overridden by passing \"--disable-autoconf-deprecation\", so that\ndistros have time to adapt to the change. Furthermore, packagers are\ntold to send us an email in case they cannot use neither the Makefile,\nnor the Meson build system, with a hint why that is.\n\nNote that the date for removal is set to Git 2.55 for now. As the change\nis generally not user-facing but rather packager-facing it is not\nconsidered to be a breaking change. That being said, depending on the\nfeedback we get from packagers we may adjust the timeline to match their\nreality.\n\n[1]: https://lore.kernel.org/git/GV1PR02MB848925A79A9DD733848182D58D662@GV1PR02MB8489.eurprd02.prod.outlook.com/\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n configure.ac | 32 ++++++++++++++++++++++++++++++++\n 1 file changed, 32 insertions(+)\n\ndiff --git a/configure.ac b/configure.ac\nindex cfb50112bf..d7e221f62d 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -148,6 +148,38 @@ AC_CONFIG_SRCDIR([git.c])\n \n config_file=config.mak.autogen\n config_in=config.mak.in\n+#\n+# Deprecation warning for the autoconf build system\n+AC_ARG_ENABLE([autoconf-deprecation],\n+  AS_HELP_STRING([--disable-autoconf-deprecation],\n+                 [allow use of the deprecated autoconf build system (use Make or Meson instead)]),\n+  [autoconf_deprecation=$enableval],\n+  [autoconf_deprecation=yes])\n+\n+AS_IF([test \"x$autoconf_deprecation\" = \"xyes\"],\n+  [AC_MSG_ERROR([The autoconf build system is deprecated and will be removed in\n+Git 2.55. The autoconf infrastructure had been generally neglected for a long\n+time: it is missing features exposed by our Makefile and has bugs that went\n+unfixed, and its use has generally been discouraged.\n+\n+Alternatively, you can either use the Makefile directly, or use Meson in case\n+you depend on autoconfiguration for your system:\n+\n+  meson setup build\n+  meson compile -C build\n+  meson install -C build\n+\n+To override this error and proceed anyway, re-run with:\n+\n+  ./configure --disable-autoconf-deprecation\n+\n+Please note that the autoconf infrastructure will be removed soon, and at this\n+point the workaround will stop working. If you have strong reasons why you can\n+use neither the Makefile nor Meson, then please send us an email to tell us\n+about your specific use case.\n+])])\n+\n+AC_MSG_WARN([The autoconf build system is deprecated. Continuing anyway at your own risk.])\n \n GIT_CONF_SUBST([AUTOCONFIGURED], [YesPlease])\n \n\n-- \n2.53.0.697.g625c4fb2da.dirty\n\n"},{"id":"537799","messageId":"xmqq8qc78nyt.fsf@gitster.g","threadId":"65132","inReplyTo":"20260304-pks-autoconf-deprecation-v1-0-f5b611b13138@pks.im","subject":"Re: [PATCH RFC 0/2] Makefile: deprecate autoconf build infrastructure","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-03-04T18:10:50Z","receivedAt":"2026-03-04T18:10:53Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Patrick Steinhardt <ps@pks.im> writes:\n\n> roundabout 1.5 years ago we had a long discussion that eventually led to\n> a rough consensus that we'd rather want to get rid of our autoconf build\n> infrastucture. This eventually led to the introduction of Meson to cover\n> this use case, which has stabilized for quite a while by now.\n>\n> This patch series thus starts the deprecation period of the autoconf\n> build infrastructure. Target for removal is Git 2.55 for now, but I'm\n> very open for discussions here. I also assume that depending on feedback\n> from packagers we may need to adapt the timeline.\n\nI do not consider autoconf a thing on its own; rather it is a mere\nextension to Makefile based build, isn't it?  So the declaration to\nsay \"we favor meson over autoconf\" makes little sense, at least to\nme.\n\nAsking which between Makefile and Meson should be the \"primary\"\nbuild environment is a different story, and the question does make\nsense, even though my answer may be different from yours ;-)\n"},{"id":"538563","messageId":"abEe-87CJSm418ln@pks.im","threadId":"65132","inReplyTo":"xmqq8qc78nyt.fsf@gitster.g","subject":"Re: [PATCH RFC 0/2] Makefile: deprecate autoconf build infrastructure","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-03-11T07:51:23Z","receivedAt":"2026-03-11T07:51:29Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Wed, Mar 04, 2026 at 10:10:50AM -0800, Junio C Hamano wrote:\n> Patrick Steinhardt <ps@pks.im> writes:\n> \n> > roundabout 1.5 years ago we had a long discussion that eventually led to\n> > a rough consensus that we'd rather want to get rid of our autoconf build\n> > infrastucture. This eventually led to the introduction of Meson to cover\n> > this use case, which has stabilized for quite a while by now.\n> >\n> > This patch series thus starts the deprecation period of the autoconf\n> > build infrastructure. Target for removal is Git 2.55 for now, but I'm\n> > very open for discussions here. I also assume that depending on feedback\n> > from packagers we may need to adapt the timeline.\n> \n> I do not consider autoconf a thing on its own; rather it is a mere\n> extension to Makefile based build, isn't it?  So the declaration to\n> say \"we favor meson over autoconf\" makes little sense, at least to\n> me.\n\nYeah, that's why I mentioned 3.5 build systems. I don't consider it to\nbe a full build system itself, but rather the .5 part.\n\n> Asking which between Makefile and Meson should be the \"primary\"\n> build environment is a different story, and the question does make\n> sense, even though my answer may be different from yours ;-)\n\nMy intent isn't really to push Meson instead of our Makefile, only Meson\ninstead of the autoconf infra. I would claim it's the least-loved part\nof our build infra overall, and it's both hard to read and write. Our\nrecommendation typically is to use the Makefile directly, and from my\nperception I think that past discussions seemed to be in favor of\ngetting rid of autoconf eventually. I think we're now in a good position\nto do that, but you or others may of course disagree.\n\nPatrick\n"}]}