Skip to content

Commit

Permalink
8285093: Introduce UTIL_ARG_WITH
Browse files Browse the repository at this point in the history
Backport-of: 94afb366b2ec76669e1aac38dbadc223ccafda3d
  • Loading branch information
Ben Taylor authored and Paul Hohensee committed Nov 30, 2022
1 parent a10bb08 commit 5b77b57
Show file tree
Hide file tree
Showing 2 changed files with 376 additions and 32 deletions.
54 changes: 25 additions & 29 deletions make/autoconf/basic_tools.m4
Expand Up @@ -160,25 +160,23 @@ AC_DEFUN([BASIC_CHECK_MAKE_VERSION],
AC_DEFUN([BASIC_CHECK_MAKE_OUTPUT_SYNC],
[
# Check if make supports the output sync option and if so, setup using it.
AC_MSG_CHECKING([if make --output-sync is supported])
if $MAKE --version -O > /dev/null 2>&1; then
OUTPUT_SYNC_SUPPORTED=true
AC_MSG_RESULT([yes])
AC_MSG_CHECKING([for output-sync value])
AC_ARG_WITH([output-sync], [AS_HELP_STRING([--with-output-sync],
[set make output sync type if supported by make. @<:@recurse@:>@])],
[OUTPUT_SYNC=$with_output_sync])
if test "x$OUTPUT_SYNC" = "x"; then
OUTPUT_SYNC=none
fi
AC_MSG_RESULT([$OUTPUT_SYNC])
if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
AC_MSG_ERROR([Make did not the support the value $OUTPUT_SYNC as output sync type.])
fi
else
OUTPUT_SYNC_SUPPORTED=false
AC_MSG_RESULT([no])
fi
UTIL_ARG_WITH(NAME: output-sync, TYPE: literal,
VALID_VALUES: [none recurse line target], DEFAULT: recurse,
OPTIONAL: true, ENABLED_DEFAULT: true,
ENABLED_RESULT: OUTPUT_SYNC_SUPPORTED,
CHECKING_MSG: [for make --output-sync value],
DESC: [set make --output-sync type if supported by make],
CHECK_AVAILABLE:
[
AC_MSG_CHECKING([if make --output-sync is supported])
if ! $MAKE --version -O > /dev/null 2>&1; then
AC_MSG_RESULT([no])
AVAILABLE=false
else
AC_MSG_RESULT([yes])
fi
]
)
AC_SUBST(OUTPUT_SYNC_SUPPORTED)
AC_SUBST(OUTPUT_SYNC)
])
Expand Down Expand Up @@ -379,17 +377,15 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
UTIL_REQUIRE_PROGS(XATTR, xattr)
UTIL_LOOKUP_PROGS(CODESIGN, codesign)
if test "x$CODESIGN" != "x"; then
# Check for user provided code signing identity.
# If no identity was provided, fall back to "openjdk_codesign".
AC_ARG_WITH([macosx-codesign-identity], [AS_HELP_STRING([--with-macosx-codesign-identity],
[specify the code signing identity])],
[MACOSX_CODESIGN_IDENTITY=$with_macosx_codesign_identity],
[MACOSX_CODESIGN_IDENTITY=openjdk_codesign]
)
AC_SUBST(MACOSX_CODESIGN_IDENTITY)
# Check for user provided code signing identity.
UTIL_ARG_WITH(NAME: macosx-codesign-identity, TYPE: string,
DEFAULT: openjdk_codesign, CHECK_VALUE: UTIL_CHECK_STRING_NON_EMPTY,
DESC: [specify the macosx code signing identity],
CHECKING_MSG: [for macosx code signing identity]
)
AC_SUBST(MACOSX_CODESIGN_IDENTITY)
if test "x$CODESIGN" != "x"; then
# Verify that the codesign certificate is present
AC_MSG_CHECKING([if codesign certificate is present])
$RM codesign-testfile
Expand Down

3 comments on commit 5b77b57

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RealCLanger
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jdk11u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on 5b77b57 Feb 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RealCLanger Could not automatically backport 5b77b574 to openjdk/jdk11u-dev due to conflicts in the following files:

  • make/autoconf/util.m4

Please fetch the appropriate branch/commit and manually resolve these conflicts by using the following commands in your personal fork of openjdk/jdk11u-dev. Note: these commands are just some suggestions and you can use other equivalent commands you know.

# Fetch the up-to-date version of the target branch
$ git fetch --no-tags https://git.openjdk.org/jdk11u-dev master:master

# Check out the target branch and create your own branch to backport
$ git checkout master
$ git checkout -b RealCLanger-backport-5b77b574

# Fetch the commit you want to backport
$ git fetch --no-tags https://git.openjdk.org/jdk17u-dev 5b77b574685ee043dfce2b5b17cb0f166b339485

# Backport the commit
$ git cherry-pick --no-commit 5b77b574685ee043dfce2b5b17cb0f166b339485
# Resolve conflicts now

# Commit the files you have modified
$ git add files/with/resolved/conflicts
$ git commit -m 'Backport 5b77b574685ee043dfce2b5b17cb0f166b339485'

Once you have resolved the conflicts as explained above continue with creating a pull request towards the openjdk/jdk11u-dev with the title Backport 5b77b574685ee043dfce2b5b17cb0f166b339485.

Please sign in to comment.