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

Re: [PATCH v2 5/5] cmake: set up proper dependencies for generated clar headers

From
Patrick Steinhardt <ps@pks.im>
Date
Nov 8, 2024, 12:59 UTC
Message-ID
<Zy4K_rcyGlwv64JZ@pks.im>
In-Reply-To
<829fe630-e46a-4a3a-82dd-4e5feedd190c@gmail.com>
On Wed, Nov 06, 2024 at 10:59:08AM +0000, Phillip Wood wrote:
Show 30 quoted lines
> Hi Johannes
> 
> On 05/11/2024 19:55, Johannes Schindelin wrote:
> > Hi Patrick,
> > 
> > On Mon, 21 Oct 2024, Patrick Steinhardt wrote:
> > 
> > > The auto-generated headers used by clar are written at configure time
> > > and thus do not get regenerated automatically. Refactor the build
> > > recipes such that we use custom commands instead, which also has the
> > > benefit that we can reuse the same infrastructure as our Makefile.
> > 
> > For the record: I did not use a shell script to generate the header for a
> > specific reason: Unix shell scripts are not native to Windows. Therefore
> > they cannot in general be run on Windows, however that was precisely the
> > idea for the CMake definition: to be run on a vanilla Windows with Visual
> > Studio installed.
> > 
> > Sadly, even Git's CI definition sets things up in a way that Git for
> > Windows' Bash can be used in the CMake definition, but in the intended use
> > case (opening a checkout of git/git in Visual Studio without any further
> > tools required) won't have a usable Bash.
> > 
> > Therefore I am unsure whether this patch is desirable.
> 
> CMakeLists.txt tries to find sh.exe from git-for-windows and errors out if
> it cannot be found. It then uses that shell to run a number of scripts.
> Perhaps we should do the same in this patch? It would certainly be a
> worthwhile improvement to regenerate this file at build time if the source
> has changed.

Yeah, I think this solution makes most sense. I'll send a patch in a bit to address this.

Thanks, both of you!
Patrick
Previous: Phillip WoodNext: Taylor Blau
Message 25 of 30 in “git no longer builds on SunOS 5.10, a report”
  1. Alejandro R. SedeñoOct 12, 2024
  2. Patrick SteinhardtOct 12, 2024
  3. Alejandro R. SedeñoOct 12, 2024
  4. Makefile: adjust sed command for generating "clar-decls.h"Alejandro R. Sedeño, Oct 12, 2024
  5. Alejandro R. SedeñoOct 12, 2024
  6. Patrick SteinhardtOct 13, 2024
  7. Alejandro R. SedeñoOct 13, 2024
  8. Patrick SteinhardtOct 14, 2024
  9. 0/2 t/unit-tests: improve clar platform compatibilityPatrick Steinhardt, Oct 14, 2024
  10. 1/2 t/unit-tests: update clar to 0810a36Patrick Steinhardt, Oct 14, 2024
  11. 2/2 Makefile: adjust sed command for generating "clar-decls.h"Patrick Steinhardt, Oct 14, 2024
  12. Toon ClaesOct 18, 2024
  13. Taylor BlauOct 18, 2024
  14. Patrick SteinhardtOct 21, 2024
  15. 0/5 t/unit-tests: improve clar platform compatibilityPatrick Steinhardt, Oct 21, 2024
  16. 1/5 t/unit-tests: update clar to 206accbPatrick Steinhardt, Oct 21, 2024
  17. 2/5 Makefile: adjust sed command for generating "clar-decls.h"Patrick Steinhardt, Oct 21, 2024
  18. Kristoffer HaugsbakkOct 21, 2024
  19. Patrick SteinhardtOct 21, 2024
  20. 3/5 Makefile: extract script to generate clar declarationsPatrick Steinhardt, Oct 21, 2024
  21. 4/5 cmake: fix compilation of clar-based unit testsPatrick Steinhardt, Oct 21, 2024
  22. 5/5 cmake: set up proper dependencies for generated clar headersPatrick Steinhardt, Oct 21, 2024
  23. Johannes SchindelinNov 5, 2024
  24. Phillip WoodNov 6, 2024
  25. Patrick SteinhardtNov 8, 2024
  26. Taylor BlauOct 21, 2024
  27. karthik nayakOct 25, 2024
  28. Bagas SanjayaOct 26, 2024
  29. Patrick SteinhardtOct 27, 2024
  30. Taylor BlauOct 27, 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.