Build system fixes
This fixes #418 (closed), but it also does much more:
-
remove the obsolete
-a
,-e
and-w
options -
add a new generic
-t
/-T
build target option which automatically selects the proper type of package for the host platform -
add a new
-k
option to bypass the cleaning stage (this reduces the amount of unnecessary recompiles, especially while testing changes, but it's not perfect yet, see below) -
make
tar_em_up.sh
properly catch errors during the build and provide useful diagnostics; this finally lets us detect and diagnose error conditions during a build in a reliable fashion, especially in CI builds -
fix a lot of nagging little bugs in the build scripts and Makefiles which could make a build fail for mysterious (and stupid) reasons
-
make
INCREMENTAL
(Gem-less) builds work on Windows -
add a toplevel Makefile so that you can now just run
make
,make incremental
,make clean
,make realclean
, etc. and be done with it (see the comments at the beginning of the Makefile for details)
The latter alone should be a heaven-sent for new users who don't have to deal with the arcane options of the build script any more, but can now just run familiar make commands.
Other than that, the overhauled tar_em_up.sh
should be 100% backward-compatible (except for the obsolete options that I removed).
Remaining Issues
The -k
option is not perfect yet, since the Makefiles under packages and externals want to recompile a lot of stuff anyway, even if preserving all artifacts from a previous build. I'm not sure why that is, we'll have to take another deep look into the hall of Makefile mirrors to see what is going on there, but that's for another time. ;-) In any case, the amount of unconditional recompilation seems tolerable now (except maybe on Windows, but that's probably because Windows always takes 90% of the compile time and produces 90% of the mysterious issues anyway).
How To Test
After a fresh checkout, the following sequence of commands should result in three valid builds, without any failures (replace make
with make incremental
to save a lot of compile time):
make
make
make clean
make
make realclean
make
I tested this as good as I could, although I eventually had to give up on Windows, because in a VM even an incremental build takes an eternity there. But I did check that incremental builds work on Windows, and the CI should tell us about the full build. I also ran my existing Arch PKGBUILD on this branch and it works without any hitches. I'll try the debuild later tonight. Again, CI will tell us about a direct Debian build using tar_em_up.sh -B
. (I don't expect any further issues there, because I'm also using -B
in the Arch build, which does everything but the Debian packaging itself, and that part hasn't changed at all.)