StanzaOrg / lbstanza-old

L.B. Stanza Programming Language
Other
216 stars 23 forks source link

Build script improvements for cross-compilation #89

Closed tylanphear closed 3 years ago

tylanphear commented 3 years ago

This patch improves the existing build script (scripts/make.sh) to make cross-compilation easier. It also streamlines some aspects of the current build process.

The main change is the addition of a <platform> parameter to scripts/make.sh. This can be one of windows, linux, or os-x, corresponding (I think) to the values accepted by the Stanza compiler with -platform. If one is not passed, the script errors out (could detect current platform in the future?)

Additionally, this patch makes it so we only build the platform requested (previously would always build OS-X and Linux). It also adds a finish script for Windows (since one did not previously exist).

tylanphear commented 3 years ago

Thanks! The nature of the changes look good, but is it possible to write them with simpler bash constructs?

I had a feeling that might be the case (bad habit). I just pushed a cleaner version. Let me know if it's better.

tylanphear commented 3 years ago

Pushed a change that adds a third (optional) parameter to scripts/make.sh which serves as a command to the build script. This allows you to only run the parts of the script that you want.

Commands added and their behaviors are as follows:

If no command is passed, the script defaults to compile-clean (perform all steps -- which was the previous behavior).

Let me know if you think this is overkill, if the names could be improved, or if there is some combination missing you'd like me to add.