From 8548644595bb6d43fd0069556263bb29a610f3cc Mon Sep 17 00:00:00 2001 From: Andrew Tonner Date: Sun, 22 Jan 2017 16:28:32 -0800 Subject: [PATCH 1/2] don't show "Will install to" output if that is disabled --- SheepShaver/src/Windows/build_on_msys.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SheepShaver/src/Windows/build_on_msys.py b/SheepShaver/src/Windows/build_on_msys.py index d168baba..a5a48920 100644 --- a/SheepShaver/src/Windows/build_on_msys.py +++ b/SheepShaver/src/Windows/build_on_msys.py @@ -644,7 +644,8 @@ def main(): if num_threads > 1: make_args.append("-j%d" % num_threads) - log("Will install to %s" % options.install_to_dir) + if options.install_to_dir is not None: + log("Will install to %s" % options.install_to_dir) install(make_args, options.show_build_environment, options.use_precompiled_dyngen, options.build_jit, options.debug_build, install_to_dir=options.install_to_dir, add_path=options.add_path) From e3fe441709fea56190c8d4a9fa66fb0041af53f2 Mon Sep 17 00:00:00 2001 From: Andrew Tonner Date: Sun, 22 Jan 2017 16:49:23 -0800 Subject: [PATCH 2/2] python build script: build arg for passing --build to configure scripts --- SheepShaver/src/Windows/build_on_msys.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/SheepShaver/src/Windows/build_on_msys.py b/SheepShaver/src/Windows/build_on_msys.py index a5a48920..592f523b 100644 --- a/SheepShaver/src/Windows/build_on_msys.py +++ b/SheepShaver/src/Windows/build_on_msys.py @@ -69,6 +69,9 @@ def parse_args(): parser.add_argument("--add-path", default=None, help="Add something to the PATH used for builds, with highest priority") + parser.add_argument("--build", + default=None, + help="Build platform to pass to configure scripts") return parser.parse_args() @@ -133,7 +136,7 @@ def log(msg): def install(make_args, show_build_environment, use_precompiled_dyngen, build_jit, debug_build, - install_to_dir=None, add_path=None): + install_to_dir=None, add_path=None, build=None): root_dir = os.path.abspath(os.path.join(script_path, "..", "..", "..")) dep_tracker = BuildDepTracker(root_dir) @@ -210,7 +213,10 @@ def install(make_args, show_build_environment, use_precompiled_dyngen, build_jit run([msys_bash, "./autogen.sh"], cwd=sdl_dir, env=our_env) with dep_tracker.rebuilding_if_needed("sdl_configure", "configure", base_dir=sdl_dir) as needs_rebuild: if needs_rebuild: - run([msys_bash, "./configure", "--disable-shared", "--prefix=/usr"], cwd=sdl_dir, env=our_env) + sdl_configure_args = [msys_bash, "./configure", "--disable-shared", "--prefix=/usr"] + if build is not None: + sdl_configure_args += ["--build", build] + run(sdl_configure_args, cwd=sdl_dir, env=our_env) run([make_bin] + make_args + ["clean"], cwd=sdl_dir, env=our_env) run([make_bin] + make_args, cwd=sdl_dir, env=our_env) @@ -647,7 +653,8 @@ def main(): if options.install_to_dir is not None: log("Will install to %s" % options.install_to_dir) install(make_args, options.show_build_environment, options.use_precompiled_dyngen, options.build_jit, - options.debug_build, install_to_dir=options.install_to_dir, add_path=options.add_path) + options.debug_build, install_to_dir=options.install_to_dir, add_path=options.add_path, + build=options.build) if __name__ == "__main__":