I hate autoconf but that's not part of this thread. I'll wait.
I hate autoconf but that's not part of this thread. I'll wait.
So, your shell script handles Unix, its most popular clone and Windows. ;-)
The Windows part is interesting. What are the requirements to run your shell script on Windows?
tl;dr: while modern BSD does not contain AT&T UNIX code anymore, it evolved from AT&T UNIX. In contrast to Linux, it was not a clean-room implementation.
If you replace the whole things step by step, each step a small one, is it still the same thing or isn't it?
after all the evolution and adaptation that's gone on over the last couple decades i wonder if saying "bsd is unix" is any more than a notional thing.
is the linux kernel materially and substantially different from any current bsd kernels?
Having automated the build of dozens of FOSS packages, I can definitely say that autoconf-based packages are _by far_ the easiest ones to build ; especially if you want to do funny stuff like out-of-tree builds or cross-compilation (can your 186-line script do this?).
Some projects (x264, ffmpeg) provide 'configure'-like custom scripts, trying to imitate what autoconf does ; but in practise you can't automate their build the same way you did with autoconf-based projects.
Properly done autoconf is very developer-friendly for building but if you have to maintain it, it can be a nightmare.
OTOH, because you can always escape to shell scripts, I usually can fix any issue that crops up.
With cmake, I regularly fail, e.g. configuring succeeds but building fails because of a missing library and because I actually have no clue what the standard approach should be (online documentation is abysmal with cmake).
Cross-compilation of existing packets has proven to be a nightmare with cmake. I have to override manually CMAKE_C_COMPILER, CMAKE_CXX_COMPILER ...
Have a look at zenbuild, which is a toy-project of mine trying to homogeneize the build interface of many FOSS projects. Each packet get its script (ala PKGBUILD), it can be seen as a list of hacks around the quirks of each project's build system.
Projects using autoconf are a breeze to build: https://github.com/Ace17/zenbuild/blob/master/zen-libxau.sh
But projects using cmake are another story: https://github.com/Ace17/zenbuild/blob/master/zen-x265.sh
i haven't used it in some time, so perhaps it's improved; but the ergonomics, documentation and developer-friendliness of it was absolutely dreadful.