On 14/10/2024 20:19, Eli Schwartz wrote: [snip] >> 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, ... > > 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