common/autoconf/jdk-options.m4

changeset 573
b284980b7d9a
parent 562
14d7ebe42c8d
child 575
6f8f7a5449f6
equal deleted inserted replaced
572:64a9ebad39fe 573:b284980b7d9a
380 380
381 # Get the settings from parameters 381 # Get the settings from parameters
382 AC_ARG_WITH(milestone, [AS_HELP_STRING([--with-milestone], 382 AC_ARG_WITH(milestone, [AS_HELP_STRING([--with-milestone],
383 [Set milestone value for build @<:@internal@:>@])]) 383 [Set milestone value for build @<:@internal@:>@])])
384 if test "x$with_milestone" = xyes; then 384 if test "x$with_milestone" = xyes; then
385 AC_MSG_ERROR([Milestone must have a value]) 385 AC_MSG_ERROR([Milestone must have a value])
386 elif test "x$with_milestone" != x; then 386 elif test "x$with_milestone" != x; then
387 MILESTONE="$with_milestone" 387 MILESTONE="$with_milestone"
388 else 388 else
389 MILESTONE=internal 389 MILESTONE=internal
390 fi 390 fi
391 391
392 AC_ARG_WITH(build-number, [AS_HELP_STRING([--with-build-number], 392 AC_ARG_WITH(build-number, [AS_HELP_STRING([--with-build-number],
393 [Set build number value for build @<:@b00@:>@])]) 393 [Set build number value for build @<:@b00@:>@])])
394 if test "x$with_build_number" = xyes; then 394 if test "x$with_build_number" = xyes; then
395 AC_MSG_ERROR([Build number must have a value]) 395 AC_MSG_ERROR([Build number must have a value])
396 elif test "x$with_build_number" != x; then 396 elif test "x$with_build_number" != x; then
397 JDK_BUILD_NUMBER="$with_build_number" 397 JDK_BUILD_NUMBER="$with_build_number"
398 fi 398 fi
399 if test "x$JDK_BUILD_NUMBER" = x; then 399 if test "x$JDK_BUILD_NUMBER" = x; then
400 JDK_BUILD_NUMBER=b00 400 JDK_BUILD_NUMBER=b00
401 fi 401 fi
402
403 AC_ARG_WITH(user-release-suffix, [AS_HELP_STRING([--with-user-release-suffix],
404 [Add a custom string to the version string if build number isn't set.@<:@username_builddateb00@:>@])])
405 if test "x$with_user_release_suffix" = xyes; then
406 AC_MSG_ERROR([Release suffix must have a value])
407 elif test "x$with_user_release_suffix" != x; then
408 USER_RELEASE_SUFFIX="$with_user_release_suffix"
409 else
410 BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
411 # Avoid [:alnum:] since it depends on the locale.
412 CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
413 USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
414 fi
415 AC_SUBST(USER_RELEASE_SUFFIX)
402 416
403 # Now set the JDK version, milestone, build number etc. 417 # Now set the JDK version, milestone, build number etc.
404 AC_SUBST(JDK_MAJOR_VERSION) 418 AC_SUBST(JDK_MAJOR_VERSION)
405 AC_SUBST(JDK_MINOR_VERSION) 419 AC_SUBST(JDK_MINOR_VERSION)
406 AC_SUBST(JDK_MICRO_VERSION) 420 AC_SUBST(JDK_MICRO_VERSION)
417 431
418 COPYRIGHT_YEAR=`date +'%Y'` 432 COPYRIGHT_YEAR=`date +'%Y'`
419 AC_SUBST(COPYRIGHT_YEAR) 433 AC_SUBST(COPYRIGHT_YEAR)
420 434
421 if test "x$JDK_UPDATE_VERSION" != x; then 435 if test "x$JDK_UPDATE_VERSION" != x; then
422 JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}" 436 JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
423 else 437 else
424 JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}" 438 JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
425 fi 439 fi
426 AC_SUBST(JDK_VERSION) 440 AC_SUBST(JDK_VERSION)
427
428 BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
429 # Avoid [:alnum:] since it depends on the locale.
430 CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
431 USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
432 AC_SUBST(USER_RELEASE_SUFFIX)
433 441
434 COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'` 442 COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
435 AC_SUBST(COOKED_BUILD_NUMBER) 443 AC_SUBST(COOKED_BUILD_NUMBER)
436 ]) 444 ])
437 445
441 AC_SUBST(HOTSPOT_MAKE_ARGS) 449 AC_SUBST(HOTSPOT_MAKE_ARGS)
442 450
443 # The name of the Service Agent jar. 451 # The name of the Service Agent jar.
444 SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}" 452 SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
445 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then 453 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
446 SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}" 454 SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
447 fi 455 fi
448 AC_SUBST(SALIB_NAME) 456 AC_SUBST(SALIB_NAME)
449 457
450 ]) 458 ])
451 459

mercurial