
2025-09-28 10:18:43
1. Have a simple job to do. Figure out #Makefile will do the job.
2. Think a bit about portability. Makefile becomes slightly more complex.
3. You're finally done. It turns out that some stupid implicit rule in GNU Make fires and adds a `rm` at the end that removes part of the output.
4. Use #Meson.
Just an average #Gentoo day.
[UPDATE: Now I regret using Meson. If you do anything that's not 100% boilerplate, it just keeps throwing obstacles in your way.]
Kiedy jesteś tak przyzwyczajony do tego, że języki programowania mają "wysokopoziomowe" metody sprawdzania, czy ciąg znaków jest pusty, że próbujesz na oślep znaleźć coś w stylu `not x`, `x.empty()`, `len(x) == 0`… i dopiero po chwili zastanowienia dociera do ciebie, że to może być po prostu `x == ''`.
#Meson
When you're so used to programming languages with high-level methods of checking for empty strings, that you grasp for something like `not x`, `x.empty()`, `len(x) == 0`… and only after a while of thinking, you realize that it's `x == ''`.
#Meson
If you're writing a library, you should really avoid #CMake. CMake is designed to lock you in. As in, once you release a #FreeSoftware project using CMake, you can't switch to another build system with causing real trouble to your users. And if you support multiple build systems, as soon as you start supporting CMake, some of your users are going to start locking everyone else in.
That's because CMake uses a custom package discovery mechanism that's hardly compatible with anything else, and that is so complex that it's very hard to reimplement it with any other build system. So when others start relying on the CMake config files being installed (and they naturally will, since that's how CMake does things), you can't stop installing them without actually breaking stuff. And if you want to preserve them without actually using CMake, well, good luck with that.
And if CMake is one of the options you support, then some of your consumers will accidentally start relying on it anyway. And this will be much worse for everyone, because now their projects won't work for people who build your project with any other build system. Which in turn will force more projects to use CMake anyway. Which in turn will make more people rely on CMake being used…
Use #Meson as the build system, it's clean and not designed to lock you in. Use pkg-config for library data; it's simple and portable.
#OpenSource