On Tue, 6 Dec 2022 14:07:59 GMT, Julian Waters <jwat...@openjdk.org> wrote:
>> 8285093 introduced the new UTIL_ARG_WITH definition, which was not available >> when both 8282948 and 8282700 were written. They can now be moved to using >> the cleaner logic that UTIL_ARG_WITH grants. >> >> There are many more options that still use AC_ARG_WITH in jdk-version.m4. >> They are out of the scope of this commit, which aims only to rework the >> previous integrated commits mentioned above. > > Julian Waters has updated the pull request incrementally with one additional > commit since the last revision: > > CHECK_VALUE make/autoconf/jdk-version.m4 line 94: > 92: properties of MS Windows binaries.], > 93: DEFAULT_DESC: [not specified], > 94: CHECK_VALUE: [ I see that this check is repeated all over the place. I suggest that you create a new `TYPE` for this. I suggest calling it `identifier`. Then you replace `TYPE: string` with `TYPE: identifier` in all places where we check that the value is non-empty and contains only printable characters. The type itself is declared in line 692 in util.m4 (and documented on line 582). Then you need to add a type checking method: AC_DEFUN([UTIL_CHECK_TYPE_identifier], [ # Check that the argument is non-empty and only contains printable characters if test "x$1" = x; then FAILURE="Value cannot be empty" elif [ ! [[ $1 =~ ^[[:print:]]*$ ]] ]; then FAILURE="Value contains non-printing characters: $1" fi ]) ------------- PR: https://git.openjdk.org/jdk/pull/11020