> The UTIL macros have several problematic flaws that may not seem apparent > initially, the worst of which include parsing commas as actual argument > separators to the underlying m4 macros, and completely, but very subtly > wrecking shell constructs. I've done my best here to fix some of these issues > in this commit, so others don't end up suffering like I did while I was > trying to implement [8296478](https://github.com/openjdk/jdk/pull/11020). > Most notably, DESC and CHECKING_MSG should now function correctly when a > comma is included as part of their description strings (Other named arguments > do not yet have this fix implemented, it was simply far too tedious, but it > should be straightforward after this commit to fix those as well). I've also > fixed several bugs that seem to have flown under the radar (Such as > UTIL_DEFUN_NAMED always adding an extra space in between the parameter name > and actual value, even if not required). Majority of the fix involved > UTIL_DEFUN_NAMED, however while it n ow properly passes along arguments it receives to macros that use it to implement their logic, the latter still need to be mindful of macro expansions inside their _own_ body > > > > A couple of limitations from the original implementation still remain: You > still cannot have the parameter specifier inside its own block, for instance > IF_GIVEN: [IF_GIVEN: []] would not work properly (IF_GIVEN: [IF_GIVEN []] > without the colon in the inner string will, however). Additionally, if a > space is not given in between the parameter and its value (Eg DEFAULT:[] > instead of the usual DEFAULT: []) the processing that UTIL_DEFUN_NAMED > performs to correct this problem will still interfere with shell code that > relies on the : token. Unfortunately, despite my best efforts I was unable to > properly resolve these last 2 limitations
Julian Waters 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 eight additional commits since the last revision: - Merge branch 'openjdk:master' into patch-2 - Comment - Slightly overproofed code can be removed - Merge branch 'openjdk:master' into patch-2 - FLAGS_COMPILER_CHECK_ARGUMENTS should not quote ARG_ arguments - Remove special ARG_ handling in UTIL_DEFUN_NAMED - Wording - Partially fix string expansion issues in autoconf UTIL macros ------------- Changes: - all: https://git.openjdk.org/jdk/pull/11458/files - new: https://git.openjdk.org/jdk/pull/11458/files/4143c484..50b755fc Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=11458&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=11458&range=04-05 Stats: 361 lines in 29 files changed: 275 ins; 38 del; 48 mod Patch: https://git.openjdk.org/jdk/pull/11458.diff Fetch: git fetch https://git.openjdk.org/jdk pull/11458/head:pull/11458 PR: https://git.openjdk.org/jdk/pull/11458