8294549: configure script should detect unsupported path
Co-authored-by: Mike Duigou <mduigou@openjdk.org> Reviewed-by: erikj
This commit is contained in:
parent
4977922a3f
commit
a006d7eae0
12
configure
vendored
12
configure
vendored
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@ -26,10 +26,14 @@
|
|||||||
# make sure that is called using bash.
|
# make sure that is called using bash.
|
||||||
|
|
||||||
# Get an absolute path to this script, since that determines the top-level directory.
|
# Get an absolute path to this script, since that determines the top-level directory.
|
||||||
this_script_dir=`dirname $0`
|
source_path="$(dirname ${0})"
|
||||||
this_script_dir=`cd $this_script_dir > /dev/null && pwd`
|
this_script_dir="$(cd -- "${source_path}" > /dev/null && pwd)"
|
||||||
|
if test -z "${this_script_dir}"; then
|
||||||
|
echo "Error: Could not determine location of configure script"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Delegate to wrapper, forcing wrapper to believe $0 is this script by using -c.
|
# Delegate to wrapper, forcing wrapper to believe $0 is this script by using -c.
|
||||||
# This trick is needed to get autoconf to co-operate properly.
|
# This trick is needed to get autoconf to co-operate properly.
|
||||||
# The ${-:+-$-} construction passes on bash options.
|
# The ${-:+-$-} construction passes on bash options.
|
||||||
bash ${-:+-$-} -c ". $this_script_dir/make/autoconf/configure" $this_script_dir/configure CHECKME $this_script_dir "$@"
|
bash ${-:+-$-} -c ". \"${this_script_dir}/make/autoconf/configure\"" "${this_script_dir}/configure" CHECKME "${this_script_dir}" "$@"
|
||||||
|
8
make/autoconf/configure
vendored
8
make/autoconf/configure
vendored
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@ -39,6 +39,12 @@ if test "x$BASH" = x; then
|
|||||||
echo "Error: This script must be run using bash." 1>&2
|
echo "Error: This script must be run using bash." 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "$TOPDIR" =~ .*[[:space:]]+.* ]]; then
|
||||||
|
echo "Error: Build path containing space character is not supported" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Force autoconf to use bash. This also means we must disable autoconf re-exec.
|
# Force autoconf to use bash. This also means we must disable autoconf re-exec.
|
||||||
export CONFIG_SHELL=$BASH
|
export CONFIG_SHELL=$BASH
|
||||||
export _as_can_reexec=no
|
export _as_can_reexec=no
|
||||||
|
Loading…
Reference in New Issue
Block a user