Fix configure on macOS (#261)

* root-level configure script

* fix configure on macos?
This commit is contained in:
alex 2021-04-17 12:53:34 +01:00 committed by GitHub
parent f822f04c07
commit a557e4cd96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 5 deletions

View File

@ -27,7 +27,7 @@ Copy an unmodified Paper Mario (USA) ROM (sha1: `3837f44cda784b466c9a2d99df70d77
Configure the build and extract assets from the base ROM:
```sh
./configure.py
./configure
```
Compile the game:

2
Jenkinsfile vendored
View File

@ -8,7 +8,7 @@ pipeline {
steps {
sh 'cp /usr/local/etc/roms/papermario.us.z64 ver/us/baserom.z64'
sh 'cp /usr/local/etc/roms/papermario.jp.z64 ver/jp/baserom.z64'
sh './configure.py'
sh './configure'
}
}
stage('Build') {

2
configure vendored Executable file
View File

@ -0,0 +1,2 @@
#!/usr/bin/env bash
python3 tools/build/configure.py "$@"

View File

@ -1 +0,0 @@
tools/build/configure.py

View File

@ -420,11 +420,11 @@ if __name__ == "__main__":
exec_shell(["make", "-C", str(ROOT / args.splat)])
# on macOS, /usr/bin/cpp defaults to clang rather than gcc (but we need gcc's)
if args.cpp is None and sys.platform == "darwin" and "Free Software Foundation" not in shell("cpp --version"):
if args.cpp is None and sys.platform == "darwin" and "Free Software Foundation" not in exec_shell("cpp --version"):
print("error: system C preprocessor is not GNU!")
print("This is a known issue on macOS - only clang's cpp is installed by default.")
print("Use 'brew' to obtain GNU cpp, then run this script again with the --cpp option, e.g.")
print(" ./configure.py --cpp cpp-10")
print(" ./configure --cpp cpp-10")
exit(1)
# default version behaviour is to only do those that exist