Replies: 2 comments 4 replies
-
Generally the preferred pattern is to use loops. It depends a lot on what the functions are doing, though. Often, the possibility to alternate configure-like content and Makefile-like content, arranged by subdirectory, is enough to get a good organization. One of the largest projects I know of, for which a one-patch-at-a-time conversion from autotools is available (not bisectable), is Libvirt; see https://patchew.org/Libvirt/[email protected]/ (321 files changed, 9526 insertions, 15979 deletions!) My experience is that while with Meson you will encounter a few drawbacks or weird choices, the annoyance is quite limited and especially balanced by the readability and hackability of the One thing I would check is the OSes you support, since it is possible that some are missing in Meson. Also I am not sure of what your stance is on bootstrapping; if you need to escape and do something more than what Meson's DSL allows, the usual thing to do is to... use Python. That may be a problem for you, for obvious reasons, or maybe not. Also if in some cases you feel that you need some extensions to Meson, you're welcome to ask! |
Beta Was this translation helpful? Give feedback.
-
Hi, this sounds very exciting and I'd love to help however I can. :) As @bonzini mentioned, it's generally quite practical to use foreach loops to replace the use of "define a macro / function and call it many times with slightly different arguments".
There has previously been support / sympathy for the idea of an You can of course very crudely hack it today, by splitting across files and simply placing each file in a distinct subdir. Like the include() proposal but with more subdirectories just for bookkeeping. :P |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
We are currently in the early stages of experimenting with Meson for use as CPython (the reference implementation of the Python programming language)'s build system.
CPython currently uses an autotools-based workflow for Unix, with
configure.ac
, a checked-inconfigure
, andMakefile.pre.in
, converted to the regularMakefile
via the configure script. We also have custom scripts currently written in Python for cross-compiling to e.g. WASM and for mobile platforms, and a Windows build-system as a VS solution.The current guidance on the Meson website is useful, although fairly sparse. I wondered if there might be any other resources recommended by the project that have been generally found to be helpful?
For example, we make extensive use of custom autoconf/m4 macros (
AC_DEFUN
). Meson lacks (and I believe does not intend to support?) macros or user-defined functions, so what have others relied upon to convert this style of construct to Meson, whilst not increasing line length too much?I also wondered what the guidance is more generally for file-size management. Our
configure.ac
andMakefile.pre.in
together are nearly 12,000 lines long, and hard to reason about. Is there a nice solution for this in Meson? I couldn't find anything obvious on a quick first look, sorry if I've missed something obvious.Thanks,
Adam
Beta Was this translation helpful? Give feedback.
All reactions