Skip to content

Commit d7a6e6a

Browse files
committed
8285093: Introduce UTIL_ARG_WITH
8285755: JDK-8285093 changed the default for --with-output-sync 8285919: Remove debug printout from JDK-8285093 Reviewed-by: mbaesken Backport-of: 5b77b574685ee043dfce2b5b17cb0f166b339485
1 parent 1f0e77e commit d7a6e6a

File tree

2 files changed

+373
-29
lines changed

2 files changed

+373
-29
lines changed

make/autoconf/basic_tools.m4

Lines changed: 25 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -156,25 +156,23 @@ AC_DEFUN([BASIC_CHECK_MAKE_VERSION],
156156
AC_DEFUN([BASIC_CHECK_MAKE_OUTPUT_SYNC],
157157
[
158158
# Check if make supports the output sync option and if so, setup using it.
159-
AC_MSG_CHECKING([if make --output-sync is supported])
160-
if $MAKE --version -O > /dev/null 2>&1; then
161-
OUTPUT_SYNC_SUPPORTED=true
162-
AC_MSG_RESULT([yes])
163-
AC_MSG_CHECKING([for output-sync value])
164-
AC_ARG_WITH([output-sync], [AS_HELP_STRING([--with-output-sync],
165-
[set make output sync type if supported by make. @<:@recurse@:>@])],
166-
[OUTPUT_SYNC=$with_output_sync])
167-
if test "x$OUTPUT_SYNC" = "x"; then
168-
OUTPUT_SYNC=none
169-
fi
170-
AC_MSG_RESULT([$OUTPUT_SYNC])
171-
if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
172-
AC_MSG_ERROR([Make did not the support the value $OUTPUT_SYNC as output sync type.])
173-
fi
174-
else
175-
OUTPUT_SYNC_SUPPORTED=false
176-
AC_MSG_RESULT([no])
177-
fi
159+
UTIL_ARG_WITH(NAME: output-sync, TYPE: literal,
160+
VALID_VALUES: [none recurse line target], DEFAULT: none,
161+
OPTIONAL: true, ENABLED_DEFAULT: true,
162+
ENABLED_RESULT: OUTPUT_SYNC_SUPPORTED,
163+
CHECKING_MSG: [for make --output-sync value],
164+
DESC: [set make --output-sync type if supported by make],
165+
CHECK_AVAILABLE:
166+
[
167+
AC_MSG_CHECKING([if make --output-sync is supported])
168+
if ! $MAKE --version -O > /dev/null 2>&1; then
169+
AC_MSG_RESULT([no])
170+
AVAILABLE=false
171+
else
172+
AC_MSG_RESULT([yes])
173+
fi
174+
]
175+
)
178176
AC_SUBST(OUTPUT_SYNC_SUPPORTED)
179177
AC_SUBST(OUTPUT_SYNC)
180178
])
@@ -372,17 +370,15 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
372370
UTIL_REQUIRE_PROGS(XATTR, xattr)
373371
UTIL_LOOKUP_PROGS(CODESIGN, codesign)
374372
375-
if test "x$CODESIGN" != "x"; then
376-
# Check for user provided code signing identity.
377-
# If no identity was provided, fall back to "openjdk_codesign".
378-
AC_ARG_WITH([macosx-codesign-identity], [AS_HELP_STRING([--with-macosx-codesign-identity],
379-
[specify the code signing identity])],
380-
[MACOSX_CODESIGN_IDENTITY=$with_macosx_codesign_identity],
381-
[MACOSX_CODESIGN_IDENTITY=openjdk_codesign]
382-
)
383-
384-
AC_SUBST(MACOSX_CODESIGN_IDENTITY)
373+
# Check for user provided code signing identity.
374+
UTIL_ARG_WITH(NAME: macosx-codesign-identity, TYPE: string,
375+
DEFAULT: openjdk_codesign, CHECK_VALUE: UTIL_CHECK_STRING_NON_EMPTY,
376+
DESC: [specify the macosx code signing identity],
377+
CHECKING_MSG: [for macosx code signing identity]
378+
)
379+
AC_SUBST(MACOSX_CODESIGN_IDENTITY)
385380
381+
if test "x$CODESIGN" != "x"; then
386382
# Verify that the codesign certificate is present
387383
AC_MSG_CHECKING([if codesign certificate is present])
388384
$RM codesign-testfile

0 commit comments

Comments
 (0)