5 ms·
>The article downplays a little bit the value of the autotools. It's not just about building for 30-year ago hosts, it's also about providing a lot of convenien
by coldtea 10y ago
>The article downplays a little bit the value of the autotools. It's not just about building for 30-year ago hosts, it's also about providing a lot of convenient tools and providing the user with a known interface. If you write your own configure, people may expect to be able to pass additional CFLAGS (not overriding the existing one), setting the path to various elements, installing in a different root, having certain targets for the generated makefiles (like dist, clean, install, uninstall), having cross-compilation work (including crosscompiling to Windows with mingw64 which solves the toolchain problem of releasing binaries for Windows), ... It's a tedious task and easy to get wrong.
So why not get a tool with 1/10 the complexity and 1/100 the legacy stuff of Autotool, but the same interface otherwise?
People who need the old checks 100% could continue to use Autotool-old, people who don't care for such BS could use the new.
- simias 10y agoI don't understand what you mean, if it has the same interface as autotools how do you remove the legacy stuff without breaking anything? Autotools is a huge pain in the ass for the dev, unfortunately I haven't found any alternative that didn't end up being an even bigger annoyance. A decent, simple, easily customizable and portable C/C++ build system is still very much a unsolved problem as far as I'm concerned (and I've tried quite a few of them). At least autotools are supported basically everywhere.
- heinrich5991 10y agoHave you tried cmake?
- sqeaky 10y agoThis whole discussion and article had me thinking about that. CMake is faster than autotools and works fine with all the compilers talked about so far and all the windows compilers I know of. Creating a CMakeLists.txt covering moderately complex build that links against a few libraries (but doesn't need and custom logic for moving files or other uncommon stuff) is normally just a few lines of code. Usually just one line of code per source file and per library (depending on how you feel about automatically including files this can be further shortened), then a little bit declaring the language and other settings. There are plenty of 10 line CMakeLists that can build large and seemingly complex projects.
- coldtea 10y ago>I don't understand what you mean, if it has the same interface as autotools how do you remove the legacy stuff without breaking anything? By having autotools for the projects that need "everything" (legacy BS checks) and this leaner version for the projects that don't need them.
- vbernat 10y agoYou don't have to use all the legacy stuff. See: https://autotools.io/whosafraid.html https://autotools.io/whosafraid.html. You choose what tests you want to run. No need to check if you have unistd.h if you don't care about that. As a rewrite using the same user interface but a completely different developer interface, there is mklove (https://github.com/edenhill/mklove https://github.com/edenhill/mklove). However, this just covers autoconf: you don't get the flexibility of automake. Also, I don't know how complete it is. A rewrite just to speed up things a little is a bit useless. Autotools are not that slow. And if a rewrite was done, it would be a shame to keep the horrible syntax. What needs to be kept is