4 ms·
I actually had this thought w.r.t. makefiles after seing a talk on the Meson build system[1] on youtube. As a thought experiment: - Let distros, package maint
by btschaegg 10y ago
I actually had this thought w.r.t. makefiles after seing a talk on the Meson build system[1] on youtube.
As a thought experiment:
- Let distros, package maintainers, repository maintainers and the guy building define boolean flags (like "UNIX", "Linux", "ARM", "ARMv7h", "x86", "x86_64", "POSIX_Filesystem", "GCC", "Clang", "C++11", "C++14"... anything you could think of). The latter override earlier definitions (in the order above, i.e. build > repo > distro). Allow the deriving of flags for simplification: "ARMv7h -> ARM", "Windows && ARM -> Use_some_WinRT_Hack" etc.
- Use a Prolog-Like system in which you can state rules for internal flags deciding if/which files should be included. Same goes for compiler flags.
- Add an option to add definitions for external projects that can be included automatically from their sources/binaries (using the same system; like Meson does).
- Just implement the "download/bootstrap" part and the logic solver. Generate ninja or tup files.
That should make an interesting build system. Of course, the maintaining of source file dependencies (which can be dynamic due to header files) and the versioning of libraries would still be problems that are not easy to solve. But at least, one could get rid of the mess that is pretty much every CMake build there is.
[1]: https://github.com/mesonbuild/meson https://github.com/mesonbuild/meson
- jasonhansel 10y agoNice idea; it's worth noting that Prolog can be used to specify the steps for building the program, not just the configuration.