Re: Modernize the build system v2 problem
- From
Ramsay Jones <ramsay@ramsayjones.plus.com>
- Date
- Oct 14, 2024, 20:18 UTC
- Message-ID
- <4dd62151-38d8-48ac-b5ad-d8e2d00fa820@ramsayjones.plus.com>
- In-Reply-To
- <cd118725-f820-494c-8d10-81aba32e4064@gmail.com>
On 14/10/2024 20:19, Eli Schwartz wrote: [snip]
Show 13 quoted lines
>> So, keeping in mind that I know absolutely nothing about meson, it seems that >> the 'configure_file' function is mangling the 'gitweb.perl' file. I assume >> that you are not seeing this, so I suspect that you are using a newer (fixed) >> version than me. :( >> >> $ meson --version >> 1.3.2 >> $ ninja --version >> 1.11.1 >> $ > > > I recognize this: https://github.com/mesonbuild/meson/pull/13302
Yep, that looks pretty much on point. :)
Having said that, after squinting at the patch text for about ten minutes, I'm still not sure it would leave all valid perl syntax alone. So, ...
Show 6 quoted lines
> > Note that for files which can change semi-regularly as part of > development it may be better to avoid configure_file() and create > something like edit-files.sh.in which then produces build rules, not > configure-time changes. This would sidestep the problem entirely as > you'd then process gitweb.cgi via e.g. a sed script.
Showing ignorance of meson, I don't quite follow the 'edit-files.sh.in' suggestion, but I had intended (before Patrick's email) to use a script to generate 'gitweb.cgi' as the 'command' in the 'configure_file'. It feels like you are suggesting something else.
> (The main reason though is because it avoids reconfiguring meson when > the gitweb.cgi script is modified via a patch / git pull.)
Thanks.
ATB, Ramsay Jones