From a557e4cd968c4bad0eae95057b9245281e621a03 Mon Sep 17 00:00:00 2001 From: alex Date: Sat, 17 Apr 2021 12:53:34 +0100 Subject: [PATCH] Fix configure on macOS (#261) * root-level configure script * fix configure on macos? --- INSTALL.md | 2 +- Jenkinsfile | 2 +- configure | 2 ++ configure.py | 1 - tools/build/configure.py | 4 ++-- 5 files changed, 6 insertions(+), 5 deletions(-) create mode 100755 configure delete mode 120000 configure.py diff --git a/INSTALL.md b/INSTALL.md index ba0a912e3d..62c3142ae5 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -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: diff --git a/Jenkinsfile b/Jenkinsfile index 62142f9531..a5fc927fd6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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') { diff --git a/configure b/configure new file mode 100755 index 0000000000..e7e5102321 --- /dev/null +++ b/configure @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +python3 tools/build/configure.py "$@" diff --git a/configure.py b/configure.py deleted file mode 120000 index fc3870c53f..0000000000 --- a/configure.py +++ /dev/null @@ -1 +0,0 @@ -tools/build/configure.py \ No newline at end of file diff --git a/tools/build/configure.py b/tools/build/configure.py index d8c07f69a2..806167f23d 100755 --- a/tools/build/configure.py +++ b/tools/build/configure.py @@ -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