* [PATCH RFC 0/2] Makefile: deprecate autoconf build infrastructure
@ 2026-03-04 8:22 Patrick Steinhardt
2026-03-04 8:23 ` [PATCH RFC 1/2] INSTALL: recommend Meson instead of autoconf Patrick Steinhardt
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Patrick Steinhardt @ 2026-03-04 8:22 UTC (permalink / raw)
To: git
Hi,
roundabout 1.5 years ago we had a long discussion that eventually led to
a rough consensus that we'd rather want to get rid of our autoconf build
infrastucture. This eventually led to the introduction of Meson to cover
this use case, which has stabilized for quite a while by now.
This patch series thus starts the deprecation period of the autoconf
build infrastructure. Target for removal is Git 2.55 for now, but I'm
very open for discussions here. I also assume that depending on feedback
from packagers we may need to adapt the timeline.
Thanks!
Patrick
---
Patrick Steinhardt (2):
INSTALL: recommend Meson instead of autoconf
Makefile: deprecate autoconf build infrastructure
INSTALL | 11 +++++------
configure.ac | 32 ++++++++++++++++++++++++++++++++
2 files changed, 37 insertions(+), 6 deletions(-)
---
base-commit: 2cc71917514657b93014134350864f4849edfc83
change-id: 20260302-pks-autoconf-deprecation-4657b6fc83aa
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH RFC 1/2] INSTALL: recommend Meson instead of autoconf
2026-03-04 8:22 [PATCH RFC 0/2] Makefile: deprecate autoconf build infrastructure Patrick Steinhardt
@ 2026-03-04 8:23 ` Patrick Steinhardt
2026-03-04 8:23 ` [PATCH RFC 2/2] Makefile: deprecate autoconf build infrastructure Patrick Steinhardt
2026-03-04 18:10 ` [PATCH RFC 0/2] " Junio C Hamano
2 siblings, 0 replies; 5+ messages in thread
From: Patrick Steinhardt @ 2026-03-04 8:23 UTC (permalink / raw)
To: git
We're about to deprecate our autoconf build infrastructure, but we still
mention it as part of our "INSTALL" file. Switch over to recommend Meson
instead.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
INSTALL | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/INSTALL b/INSTALL
index 54d7528f9e..a8b4c7f1b4 100644
--- a/INSTALL
+++ b/INSTALL
@@ -17,13 +17,12 @@ The beginning of the Makefile documents many variables that affect the way
git is built. You can override them either from the command line, or in a
config.mak file.
-Alternatively you can use autoconf generated ./configure script to
-set up install paths (via config.mak.autogen), so you can write instead
+Alternatively you can use Meson to autoconfigure your system and set up install
+paths, so you can write instead
- $ make configure ;# as yourself
- $ ./configure --prefix=/usr ;# as yourself
- $ make all doc ;# as yourself
- # make install install-doc install-html;# as root
+ $ meson setup build -Dprefix=/usr ;# as yourself
+ $ meson compile -C build ;# as yourself
+ # meson install -C build ;# as root
If you're willing to trade off (much) longer build time for a later
faster git you can also do a profile feedback build with
--
2.53.0.697.g625c4fb2da.dirty
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH RFC 2/2] Makefile: deprecate autoconf build infrastructure
2026-03-04 8:22 [PATCH RFC 0/2] Makefile: deprecate autoconf build infrastructure Patrick Steinhardt
2026-03-04 8:23 ` [PATCH RFC 1/2] INSTALL: recommend Meson instead of autoconf Patrick Steinhardt
@ 2026-03-04 8:23 ` Patrick Steinhardt
2026-03-04 18:10 ` [PATCH RFC 0/2] " Junio C Hamano
2 siblings, 0 replies; 5+ messages in thread
From: Patrick Steinhardt @ 2026-03-04 8:23 UTC (permalink / raw)
To: git
Git currently ships with three-and-a-half build systems:
- Our plain Makefile.
- Meson, which has been introduced rather recently.
- CMake, which is part of "contrib/" and used for Git for Windows
development.
- autoconf, which only counts as half a build system as it is
integrated with our Makefile.
Out of these, the autoconf infrastructure is probably by far the most
unloved one. Its syntax is arcane, it has bugs, and it is generally not
recommended to use it. This has led to a rather long discussion [1],
where the project had general consensus that this infrastructure is not
exactly loved and that it'd rather want to get rid of it in the long
term.
This discussion eventually led to the addition of Meson as a modern
replacement that can cover the autoconfiguration part of our autoconf
infrastructure. Meson has by now been around for a bit and has generally
stabilized over the last couple releases. With the recent addition of
support for gitk and git-gui it should now support all features that are
required by distributions to use it. In fact, some distributions like
Gentoo use Meson already, and GitLab uses Meson for its production
builds of Git. So it should overall be ready for distributions to use.
Deprecate the autoconf infrastructure so that we error out by default
with a hint what packagers are expected to use instead. This behaviour
can be overridden by passing "--disable-autoconf-deprecation", so that
distros have time to adapt to the change. Furthermore, packagers are
told to send us an email in case they cannot use neither the Makefile,
nor the Meson build system, with a hint why that is.
Note that the date for removal is set to Git 2.55 for now. As the change
is generally not user-facing but rather packager-facing it is not
considered to be a breaking change. That being said, depending on the
feedback we get from packagers we may adjust the timeline to match their
reality.
[1]: https://lore.kernel.org/git/GV1PR02MB848925A79A9DD733848182D58D662@GV1PR02MB8489.eurprd02.prod.outlook.com/
Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
configure.ac | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/configure.ac b/configure.ac
index cfb50112bf..d7e221f62d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -148,6 +148,38 @@ AC_CONFIG_SRCDIR([git.c])
config_file=config.mak.autogen
config_in=config.mak.in
+#
+# Deprecation warning for the autoconf build system
+AC_ARG_ENABLE([autoconf-deprecation],
+ AS_HELP_STRING([--disable-autoconf-deprecation],
+ [allow use of the deprecated autoconf build system (use Make or Meson instead)]),
+ [autoconf_deprecation=$enableval],
+ [autoconf_deprecation=yes])
+
+AS_IF([test "x$autoconf_deprecation" = "xyes"],
+ [AC_MSG_ERROR([The autoconf build system is deprecated and will be removed in
+Git 2.55. The autoconf infrastructure had been generally neglected for a long
+time: it is missing features exposed by our Makefile and has bugs that went
+unfixed, and its use has generally been discouraged.
+
+Alternatively, you can either use the Makefile directly, or use Meson in case
+you depend on autoconfiguration for your system:
+
+ meson setup build
+ meson compile -C build
+ meson install -C build
+
+To override this error and proceed anyway, re-run with:
+
+ ./configure --disable-autoconf-deprecation
+
+Please note that the autoconf infrastructure will be removed soon, and at this
+point the workaround will stop working. If you have strong reasons why you can
+use neither the Makefile nor Meson, then please send us an email to tell us
+about your specific use case.
+])])
+
+AC_MSG_WARN([The autoconf build system is deprecated. Continuing anyway at your own risk.])
GIT_CONF_SUBST([AUTOCONFIGURED], [YesPlease])
--
2.53.0.697.g625c4fb2da.dirty
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH RFC 0/2] Makefile: deprecate autoconf build infrastructure
2026-03-04 8:22 [PATCH RFC 0/2] Makefile: deprecate autoconf build infrastructure Patrick Steinhardt
2026-03-04 8:23 ` [PATCH RFC 1/2] INSTALL: recommend Meson instead of autoconf Patrick Steinhardt
2026-03-04 8:23 ` [PATCH RFC 2/2] Makefile: deprecate autoconf build infrastructure Patrick Steinhardt
@ 2026-03-04 18:10 ` Junio C Hamano
2026-03-11 7:51 ` Patrick Steinhardt
2 siblings, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2026-03-04 18:10 UTC (permalink / raw)
To: Patrick Steinhardt; +Cc: git
Patrick Steinhardt <ps@pks.im> writes:
> roundabout 1.5 years ago we had a long discussion that eventually led to
> a rough consensus that we'd rather want to get rid of our autoconf build
> infrastucture. This eventually led to the introduction of Meson to cover
> this use case, which has stabilized for quite a while by now.
>
> This patch series thus starts the deprecation period of the autoconf
> build infrastructure. Target for removal is Git 2.55 for now, but I'm
> very open for discussions here. I also assume that depending on feedback
> from packagers we may need to adapt the timeline.
I do not consider autoconf a thing on its own; rather it is a mere
extension to Makefile based build, isn't it? So the declaration to
say "we favor meson over autoconf" makes little sense, at least to
me.
Asking which between Makefile and Meson should be the "primary"
build environment is a different story, and the question does make
sense, even though my answer may be different from yours ;-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH RFC 0/2] Makefile: deprecate autoconf build infrastructure
2026-03-04 18:10 ` [PATCH RFC 0/2] " Junio C Hamano
@ 2026-03-11 7:51 ` Patrick Steinhardt
0 siblings, 0 replies; 5+ messages in thread
From: Patrick Steinhardt @ 2026-03-11 7:51 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
On Wed, Mar 04, 2026 at 10:10:50AM -0800, Junio C Hamano wrote:
> Patrick Steinhardt <ps@pks.im> writes:
>
> > roundabout 1.5 years ago we had a long discussion that eventually led to
> > a rough consensus that we'd rather want to get rid of our autoconf build
> > infrastucture. This eventually led to the introduction of Meson to cover
> > this use case, which has stabilized for quite a while by now.
> >
> > This patch series thus starts the deprecation period of the autoconf
> > build infrastructure. Target for removal is Git 2.55 for now, but I'm
> > very open for discussions here. I also assume that depending on feedback
> > from packagers we may need to adapt the timeline.
>
> I do not consider autoconf a thing on its own; rather it is a mere
> extension to Makefile based build, isn't it? So the declaration to
> say "we favor meson over autoconf" makes little sense, at least to
> me.
Yeah, that's why I mentioned 3.5 build systems. I don't consider it to
be a full build system itself, but rather the .5 part.
> Asking which between Makefile and Meson should be the "primary"
> build environment is a different story, and the question does make
> sense, even though my answer may be different from yours ;-)
My intent isn't really to push Meson instead of our Makefile, only Meson
instead of the autoconf infra. I would claim it's the least-loved part
of our build infra overall, and it's both hard to read and write. Our
recommendation typically is to use the Makefile directly, and from my
perception I think that past discussions seemed to be in favor of
getting rid of autoconf eventually. I think we're now in a good position
to do that, but you or others may of course disagree.
Patrick
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-03-11 7:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-04 8:22 [PATCH RFC 0/2] Makefile: deprecate autoconf build infrastructure Patrick Steinhardt
2026-03-04 8:23 ` [PATCH RFC 1/2] INSTALL: recommend Meson instead of autoconf Patrick Steinhardt
2026-03-04 8:23 ` [PATCH RFC 2/2] Makefile: deprecate autoconf build infrastructure Patrick Steinhardt
2026-03-04 18:10 ` [PATCH RFC 0/2] " Junio C Hamano
2026-03-11 7:51 ` Patrick Steinhardt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox