This makes them pass shellcheck. Except for a few unused
export warnings.
I also wonder if the majority of these files should be
in the root of the project, or should be moved to "build-scripts"
(or should still even exist).
a few minor changes
one more minor changes
PR #4054 broke the macOS CI for pull requests and the nightly builds.
As a follow-up requested in the PR this is an attempt to fix it.
* Add a parameter to `configure.am` to define a build-time variable for
use in `Makefile.am` to specify the executables we will be depending
upon for the `dosbox-x.app` rule.
* Fix an issue in the first library scan section of the `dosbox-x.app`
rule in the `Makefile` causing a failure to build on an Apple Silicon
mac when there is no `x86_64` binary present.
* Fix failure to build SDL1 variant after a previous SDL2 build attempt
by deleting `vs/sdl2/linux-host` before attempting the SDL1 build.
* Use `make clean` instead of `make distclean` in the build scripts'
`do_cleanup` function to not clean absolutely everything.
* Make sure we remove the achitecture-specific copies we create of the
`dosbox-x` executable before building, as these are meant to be
used for the universal binary creation with `lipo` and the presence
of an old copy will cause the `dosbox-x.app` bundle to potentially
contain mismatched copies for each architecture, or contain an
architecture that is not intended to be included.
* Add a `distclean-local` rule to `src/Makefile.am` to remove the
architecture-specific temporary copies of the `dosbox-x` executable
when running `distclean` as these shouldn't remain in the tree.
Signed-off-by: Dani Llewellyn <dani@bowlhat.net>
Universal App Bundles require we build the executables twice. Update the build scripts to support building both arm64 and x86_64 architectures. By default the scripts should behave like they always did, despite the major overhaul, and only build for your host's architecture. To build *both* architectures, you *must* run the build on an Apple Silicon Mac *and* run the script with the word `universal` as the first parameter - any parameters thereafter are used as-is for the `configure` script of DosBox-X like the build script did before it supported the extra parameter.
Signed-off-by: Dani Llewellyn <dani@bowlhat.net>