Replace `build.sh` and `build.cmd` with `build.d`
...
Since dub needs a D compiler anyway, we might follow in DMD's step and use D for building,
as it is more reliable and expressive than a shell script as features pile up.
This unifies the two scripts to expose the same set of functionalities on all platforms,
with a behavior that is hopefully more sensible
(tradeoff and reasoning are explained through the code / documentation).
It is also completely independent from the current working directory.
Some discrepancies included:
- Name of the variable to override to select the compiler (DC vs DMD);
- Version file: Windows was always regenerating it;
- Version file: Windows would display "unknown" if `dub describe` failed,
POSIX would use an empty string;
- Compiler detection: POSIX would detect ldmd2 / gdmd if dmd is not present,
Windows would just fail;
All those functionalities are now unified in a single script.
The old script are kept for compatibility, but forward to the new script,
and can be removed in a few releases.
Geod24
committed
on 22 Dec 2019