Patrick Steinhardt <ps@xxxxxx> writes: > We're contemplating whether to eventually replace our build systems with > a build system that is easier to use. Add a comparison of build systems > to our technical documentation as a baseline for discussion. > > Signed-off-by: Patrick Steinhardt <ps@xxxxxx> > --- Thanks for starting this. > diff --git a/Documentation/technical/build-systems.txt b/Documentation/technical/build-systems.txt > new file mode 100644 > index 0000000000..8fac36ce1d > --- /dev/null > +++ b/Documentation/technical/build-systems.txt > @@ -0,0 +1,164 @@ > += Build Systems > + > +The build system is the primary way for both developers and system integrators > +to interact with the Git project. As such, we consider it important to pick a > +build system that fulfills our requirements while being easy to use and extend. Maybe it is me, but this sounds as if _we_ do not need "easy to use and extend", but "easy to use and extend" are extra afterthought consideration we are making for others, which is a bit disturbing. Let me try paraphrasing what I think you wanted to say As such, being easy to use and extend for those who are not directly developing Git itself is just as important as other requirements we have on any potential build system. which hopefully would sound more like we are not treating those who only build and tweak the product of our project as second-class citizens. > +This document outlines the different requirements that we have for the build > +system and then compares available build systems using these criteria. > + > +== Requirements > + > +The following subsections prevent a list of requirements that we have for any I think you meant "present". > +potential build system. Sections are sorted by decreasing priority, even though > +these priorities will naturally differ between users. > + > +=== Platform support > + > +The most important criterium is whether the build system supports all of the > +platforms that Git supports. The most important platforms include: Maybe it is just me, but when I hear "The most", I expect an exhaustive list (hence "include" that came later somewhat surprised me), and I consider these "the more important systems" (implying "than others"). > + - Linux > + - macOS > + - Windows > + - FreeBSD > + - OpenBSD > + - NetBSD > + > +The platforms which must be supported by the tool should be aligned with our > +[platform support policy](platform-support.txt). > +Auto-detection of the following items is considered to be important: > + > + - Check for the existence of headers. > + - Check for the existence of libraries. > + - Check for the existence of exectuables. > + - Check for the runtime behavior of specific functions. - Check for specific link order requirements when multiple libraries are involved. > +=== Ease of use > + > +The build system SHOULD be both easy to use and easy to extend. While this is > +naturally a subjective metric it is likely not controversial to say that some > +build systems are considerably harder to use than others. If we want to pull RFC-2119/BCP-14 with shouting "SHOULD", we probably should use something similar in the previous "Platform support" section. > +=== IDE support > +=== Out-of-tree builds Cross platform builds (e.g., building for arm on x86-64 host)? > +=== Rust support > + > +Many long-time Git contributors are nowadays in favor of adopting Rust as a > +second language next to C. The build system SHOULD thus support Rust such that > +we do not have to reopen the discussion once we decide to pick up Rust. What reasons do you have in mind that, without spelling this out, Rust will be left behind while C is fully supported? If the build system can keep track of dependencies by knowing foo.o is made from foo.c and turning foo.c into foo.o takes running cc, it can do the same for rustc. Do you mean include file dependencies and the like? If the reason why we say "Language X needs to be supported" is because it is not enough to be able to run a compiler on source files written in the language, but it is also necessary to know when to run the compiler (i.e., by dependency tracking), it is better to spell it out. In any case, instead of singling out Rust in the title, name the section "languate support", and give an enumeration of compilers languages, processors that we care about, just like we did for platforms. For exaple, we may not necessarily want to treat "C support, done as an afterthought of supporting C++" and "C support, done natively" as equivalents (of course, the latter is better). Shouldn't it also "support" asciidoc/asciidoctor/makeinfo for the documentation toolchain? Are there other things we use Makefile for in our current system that we are forgetting in this requirements section, like "running lint" or "running tests"? Thanks.