On Mon, 7 Nov 2022 00:28:13 GMT, Mike Duigou <mdui...@openjdk.org> wrote:

>> The OpenJDK build system does not support building when the source code 
>> resides on a path that contains a space. This requirement is documented in 
>> the build instructions but not enforced by the configure script.
>> 
>> This change adds an explicit checks to the wrapper `configure` script that 
>> fail the build if the source code to be built is located in a directory 
>> who's path contains a space character or the build path cannot be determined.
>> 
>> Includes some idiom modernization and shell scripting best practices changes.
>
> Mike Duigou has updated the pull request with a new target base due to a 
> merge or a rebase. The incremental webrev excludes the unrelated changes 
> brought in by the merge/rebase. The pull request contains one additional 
> commit since the last revision:
> 
>   8294549: configure script should detect unsupported path
>   
>   The OpenJDK build system does not support building when the source code
>   resides on a path that contains a space. This requirement is documented in 
> the
>   build instructions but not enforced by the configure script.
>   
>   This change adds an explicit checks to the wrapper `configure` script that 
> fail
>   the build if the source code to be built is located in a directory who's 
> path
>   contains a space character or the build path cannot be determined.

I think you need to restore you original space-checking part, but put it in 
`make/autoconf/configure`. I tried to make this script pass on a path 
containing spaces to the autoconf configure script, but it was just too much 
work, for very little gain. Several places assumed space could be used to 
separate distinct pathes, and that would have forced a complete rewrite of that 
logic.

With the patch as currently in the PR, and this addition, this works fine for 
me:


diff --git a/make/autoconf/configure b/make/autoconf/configure
index 4b26e3d7061..e75dc3c7203 100644
--- a/make/autoconf/configure
+++ b/make/autoconf/configure
@@ -1,6 +1,6 @@
 #!/bin/bash
 #
-# Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # 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
   exit 1
 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.
 export CONFIG_SHELL=$BASH
 export _as_can_reexec=no

-------------

PR: https://git.openjdk.org/jdk/pull/10477

Reply via email to