> I've recently tried to use UTIL_ARG_WITH for new configure arguments in a 
> project repository and discovered some issues. The project in question may or 
> may not end up in mainline at some point in the future, but I think fixing 
> these general issues in UTIL_ARG_WITH is worth it independent of my specific 
> use case.
> 
> For TYPE "directory" the check if the value is a valid directory is supposed 
> to optionally check for files in the CHECK_FOR_FILES list. The default value 
> of this list is ":" (due to autoconf peculiarities) but the check is 
> performed if the value is non empty. This means that if you call 
> UTIL_ARG_WITH with TYPE "directory" and no CHECK_FOR_FILES, it will always 
> fail because there is no file ":" in the given directory. This patch changes 
> the conditional to check for ":" instead of the empty string.
> 
> When an optional arg is defined, the validation check is still being 
> performed when the arg has been disabled (--without-arg). This makes it 
> impossible to disable something of for example TYPE "directory" as the 
> directory check will fail. The current configure script in OpenJDK only has 
> macro calls of type "string" and "literal" where this doesn't cause problems, 
> because an empty string as value passes validation. This patch moves the 
> validation so that it's only performed when the arg isn't disabled.

Erik Joelsson has updated the pull request incrementally with one additional 
commit since the last revision:

  copyright year

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/14558/files
  - new: https://git.openjdk.org/jdk/pull/14558/files/ed341822..40edd4f4

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=14558&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=14558&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/14558.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/14558/head:pull/14558

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

Reply via email to