git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [-SPAM-] [PATCH RFC v7 00/22] Modernize the build system

From
Patrick Steinhardt <ps@pks.im>
Date
Nov 18, 2024, 09:30 UTC
Message-ID
<ZzsJRFQ2KaJCiOyG@pks.im>
In-Reply-To
<b9e0f631-b2a3-4c48-8745-a4b1e3f58ad0@ramsayjones.plus.com>
On Sat, Nov 16, 2024 at 01:23:19AM +0000, Ramsay Jones wrote:
Show 27 quoted lines
> On 15/11/2024 07:21, Patrick Steinhardt wrote:
> [snip]
> > Changes in v7:
> > 
> >   - Fix overriding TEST_OUTPUT_DIRECTORY via the environment.
> > 
> >   - Rework generation of version information. GIT-VERSION-GEN now knows
> >     to replace @PLACEHOLDERS@ in other files, and this gets used across
> >     Makefiles, CMake and Meson now. This makes us properly rebuild when
> >     the version info changes and fixes the version numbers in "git.rc".
> > 
> >   - The CMake build instructions are now doing a proper out-of-tree
> >     build.
> > 
> >   - We now generate and install gitweb.js, which gets built via a new
> >     "generate-gitweb-js.sh".
> > 
> >   - Some improvements to the Meson documentation.
> > 
> >   - Wire up DEVELOPER=1 style warnings via `--warnlevel 2` and above.
> > 
> >   - Wire up sanitizers properly.
> > 
> >   - Provide a new "regex" option to disable the platform-provided
> >     version of regcomp() et al.
> 
> Hmm, OK, but what about all the other 'configurations'?

I don't think it makes sense to introduce a separate option for every single bit of the build process that can be changed. One of the biggest differences compared to our Makefile is that Meson should be able to automatically figure out the build environment and set up the build accordingly, without any user interaction. So in the best case, whenever we learn that a system does not work out of the box we'd not introduce an option for this, but instead adapt the autoconfiguration logic to detect that.

Now there will be exceptions where it does make sense to make something a build option, due to whatever reason. But I'm in the camp of adding them as-needed and not proactively so that we don't end up with hundreds of options.

Show 17 quoted lines
> >   - Stop installing git-http-backend into bindir.
> > 
> >   - Install Perl scripts into libexecdir.
> > 
> >   - Install git-cvsserver into bindir and libexecdir.
> > 
> >   - Install template directory into datadir.
> > 
> > As before, the tip of this patch series catches up with what is
> > happening in "seen". If you want to test it without topics in "seen" you
> > have to revert it.
> > 
> 
> Just a quick note to say that I tested this on Linux and Cygwin (just build)
> and noticed a few things:
> 
>   - 'make clean' does not delete the 'version-def.h' file.
This works now with the latest option.
>   - the RUNTIME_PREFIX set in the GIT-BUILD-OPTIONS file on the master
>     branch is not the same as on this 'meson-v7' branch (patches 1-21
>     based on current master branch):
> 
[snip]
> 
> Note that master has RUNTIME_PREFIX='false' rather than being un-set.
> (Indeed, the Makefile on the master branch normalizes the value of
> RUNTIME_PREFIX to 'true' or 'false').
Ah, good catch, corrected.
>     - The format of the GIT-BUILD-OPTIONS file generated by the Makefile
>       and meson are formatted differently, so you have to massage the
>       top-level file to be able to diff them:
> 
[snip]
> 
> Note that the Makefile build on Linux does not, by default, build with
> libpcre, even if the library is installed on the system (as it is for me).

I think building with libpcre by default does make sense though. I guess that we don't with our Makefile because it's not doing autodetection of available features in the first place, so it was safer to not compile with the library by default.

> Also, note the values of BROKEN_PATH_FIX.
I've wired up the SANE_TOOL_PATH option properly now.
Thanks for your feedback!
Patrick
Previous: Ramsay JonesNext: Junio C Hamano
Message 28 of 31 in “Modernize the build system”
  1. 00/22 Modernize the build systemPatrick Steinhardt, Nov 15, 2024
  2. 01/22 Makefile: use common template for GIT-BUILD-OPTIONSPatrick Steinhardt, Nov 15, 2024
  3. 02/22 Makefile: consistently use @PLACEHOLDER@ to substitutePatrick Steinhardt, Nov 15, 2024
  4. 03/22 Makefile: refactor GIT-VERSION-GEN to be reusablePatrick Steinhardt, Nov 15, 2024
  5. 04/22 Makefile: propagate Git version via generated headerPatrick Steinhardt, Nov 15, 2024
  6. 05/22 Makefile: generate "git.rc" via GIT-VERSION-GENPatrick Steinhardt, Nov 15, 2024
  7. 06/22 Makefile: consistently use PERL_PATHPatrick Steinhardt, Nov 15, 2024
  8. 07/22 Makefile: extract script to massage Perl scriptsPatrick Steinhardt, Nov 15, 2024
  9. 08/22 Makefile: use "generate-perl.sh" to massage Perl libraryPatrick Steinhardt, Nov 15, 2024
  10. 10/22 Makefile: extract script to generate gitweb.cgiPatrick Steinhardt, Nov 15, 2024
  11. 09/22 Makefile: extract script to massage Shell scriptsPatrick Steinhardt, Nov 15, 2024
  12. 11/22 Makefile: extract script to generate gitweb.jsPatrick Steinhardt, Nov 15, 2024
  13. 12/22 Makefile: refactor generators to be PWD-independentPatrick Steinhardt, Nov 15, 2024
  14. 13/22 Makefile: allow "bin-wrappers/" directory to existPatrick Steinhardt, Nov 15, 2024
  15. 14/22 Makefile: simplify building of templatesPatrick Steinhardt, Nov 15, 2024
  16. 16/22 Documentation: teach "cmd-list.perl" about out-of-tree buildsPatrick Steinhardt, Nov 15, 2024
  17. 15/22 Documentation: allow sourcing generated includes from separate dirPatrick Steinhardt, Nov 15, 2024
  18. 17/22 Documentation: extract script to generate a list of mergetoolsPatrick Steinhardt, Nov 15, 2024
  19. 19/22 t: allow overriding build dirPatrick Steinhardt, Nov 15, 2024
  20. 18/22 t: better support for out-of-tree buildsPatrick Steinhardt, Nov 15, 2024
  21. 20/22 Documentation: add comparison of build systemsPatrick Steinhardt, Nov 15, 2024
  22. 21/22 Introduce support for the Meson build systemPatrick Steinhardt, Nov 15, 2024
  23. Christian CouderNov 15, 2024
  24. Patrick SteinhardtNov 18, 2024
  25. 22/22 meson: fix conflicts with in-flight topicsPatrick Steinhardt, Nov 15, 2024
  26. Patrick SteinhardtNov 15, 2024
  27. Ramsay JonesNov 16, 2024
  28. Patrick SteinhardtNov 18, 2024
  29. Junio C HamanoNov 18, 2024
  30. Patrick SteinhardtNov 18, 2024
  31. Junio C HamanoNov 18, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.