# HG changeset patch # User simonis # Date 1553872083 0 # Node ID 7480582c7fdcfc86b5541a1887289a8416ef7f7d # Parent e0b7721459eec3a04ede8ffe21429c1b8bf14d26 8189761: COMPANY_NAME, IMPLEMENTOR, BUNDLE_VENDOR, VENDOR, but no configure flag Reviewed-by: erikj, dholmes diff -r e0b7721459ee -r 7480582c7fdc common/autoconf/generated-configure.sh --- a/common/autoconf/generated-configure.sh Wed Mar 20 16:32:54 2019 +0000 +++ b/common/autoconf/generated-configure.sh Fri Mar 29 15:08:03 2019 +0000 @@ -825,6 +825,9 @@ COOKED_JDK_UPDATE_VERSION JDK_VERSION COPYRIGHT_YEAR +VENDOR_URL_VM_BUG +VENDOR_URL_BUG +VENDOR_URL COMPANY_NAME MACOSX_BUNDLE_ID_BASE MACOSX_BUNDLE_NAME_BASE @@ -1058,6 +1061,9 @@ with_user_release_suffix with_build_number with_vendor_name +with_vendor_url +with_vendor_bug_url +with_vendor_vm_bug_url with_copyright_year with_boot_jdk with_boot_jdk_jvmargs @@ -1891,7 +1897,16 @@ Add a custom string to the version string if build number isn't set.[username_builddateb00] --with-build-number Set build number value for build [b00] - --with-vendor-name Set vendor name [not specified] + --with-vendor-name Set vendor name. Among others, used to set the + 'java.vendor' and 'java.vm.vendor' system + properties. [not specified] + --with-vendor-url Set the 'java.vendor.url' system property [not + specified] + --with-vendor-bug-url Set the 'java.vendor.url.bug' system property [not + specified] + --with-vendor-vm-bug-url + Sets the bug URL which will be displayed when the VM + crashes [not specified] --with-copyright-year Set copyright year value for build [current year] --with-boot-jdk path to Boot JDK (used to bootstrap build) [probed] --with-boot-jdk-jvmargs specify JVM arguments to be passed to all @@ -4360,7 +4375,7 @@ #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1552671404 +DATE_WHEN_GENERATED=1553405262 ############################################################################### # @@ -19883,12 +19898,62 @@ if test "x$with_vendor_name" = xyes; then as_fn_error $? "--with-vendor-name must have a value" "$LINENO" 5 elif ! [[ $with_vendor_name =~ ^[[:print:]]*$ ]] ; then - as_fn_error $? "--with--vendor-name contains non-printing characters: $with_vendor_name" "$LINENO" 5 - else + as_fn_error $? "--with-vendor-name contains non-printing characters: $with_vendor_name" "$LINENO" 5 + elif test "x$with_vendor_name" != x; then + # Only set COMPANY_NAME if '--with-vendor-name' was used and is not empty. + # Otherwise we will use the value from "version-numbers" included above. COMPANY_NAME="$with_vendor_name" fi + # The vendor URL, if any + +# Check whether --with-vendor-url was given. +if test "${with_vendor_url+set}" = set; then : + withval=$with_vendor_url; +fi + + if test "x$with_vendor_url" = xyes; then + as_fn_error $? "--with-vendor-url must have a value" "$LINENO" 5 + elif ! [[ $with_vendor_url =~ ^[[:print:]]*$ ]] ; then + as_fn_error $? "--with-vendor-url contains non-printing characters: $with_vendor_url" "$LINENO" 5 + else + VENDOR_URL="$with_vendor_url" + fi + + + # The vendor bug URL, if any + +# Check whether --with-vendor-bug-url was given. +if test "${with_vendor_bug_url+set}" = set; then : + withval=$with_vendor_bug_url; +fi + + if test "x$with_vendor_bug_url" = xyes; then + as_fn_error $? "--with-vendor-bug-url must have a value" "$LINENO" 5 + elif ! [[ $with_vendor_bug_url =~ ^[[:print:]]*$ ]] ; then + as_fn_error $? "--with-vendor-bug-url contains non-printing characters: $with_vendor_bug_url" "$LINENO" 5 + else + VENDOR_URL_BUG="$with_vendor_bug_url" + fi + + + # The vendor VM bug URL, if any + +# Check whether --with-vendor-vm-bug-url was given. +if test "${with_vendor_vm_bug_url+set}" = set; then : + withval=$with_vendor_vm_bug_url; +fi + + if test "x$with_vendor_vm_bug_url" = xyes; then + as_fn_error $? "--with-vendor-vm-bug-url must have a value" "$LINENO" 5 + elif ! [[ $with_vendor_vm_bug_url =~ ^[[:print:]]*$ ]] ; then + as_fn_error $? "--with-vendor-vm-bug-url contains non-printing characters: $with_vendor_vm_bug_url" "$LINENO" 5 + else + VENDOR_URL_VM_BUG="$with_vendor_vm_bug_url" + fi + + # Check whether --with-copyright-year was given. if test "${with_copyright_year+set}" = set; then : diff -r e0b7721459ee -r 7480582c7fdc common/autoconf/jdk-options.m4 --- a/common/autoconf/jdk-options.m4 Wed Mar 20 16:32:54 2019 +0000 +++ b/common/autoconf/jdk-options.m4 Fri Mar 29 15:08:03 2019 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -514,16 +514,55 @@ # The vendor name, if any AC_ARG_WITH(vendor-name, [AS_HELP_STRING([--with-vendor-name], - [Set vendor name @<:@not specified@:>@])]) + [Set vendor name. Among others, used to set the 'java.vendor' + and 'java.vm.vendor' system properties. @<:@not specified@:>@])]) if test "x$with_vendor_name" = xyes; then AC_MSG_ERROR([--with-vendor-name must have a value]) elif [ ! [[ $with_vendor_name =~ ^[[:print:]]*$ ]] ]; then - AC_MSG_ERROR([--with--vendor-name contains non-printing characters: $with_vendor_name]) - else + AC_MSG_ERROR([--with-vendor-name contains non-printing characters: $with_vendor_name]) + elif test "x$with_vendor_name" != x; then + # Only set COMPANY_NAME if '--with-vendor-name' was used and is not empty. + # Otherwise we will use the value from "version-numbers" included above. COMPANY_NAME="$with_vendor_name" fi AC_SUBST(COMPANY_NAME) + # The vendor URL, if any + AC_ARG_WITH(vendor-url, [AS_HELP_STRING([--with-vendor-url], + [Set the 'java.vendor.url' system property @<:@not specified@:>@])]) + if test "x$with_vendor_url" = xyes; then + AC_MSG_ERROR([--with-vendor-url must have a value]) + elif [ ! [[ $with_vendor_url =~ ^[[:print:]]*$ ]] ]; then + AC_MSG_ERROR([--with-vendor-url contains non-printing characters: $with_vendor_url]) + else + VENDOR_URL="$with_vendor_url" + fi + AC_SUBST(VENDOR_URL) + + # The vendor bug URL, if any + AC_ARG_WITH(vendor-bug-url, [AS_HELP_STRING([--with-vendor-bug-url], + [Set the 'java.vendor.url.bug' system property @<:@not specified@:>@])]) + if test "x$with_vendor_bug_url" = xyes; then + AC_MSG_ERROR([--with-vendor-bug-url must have a value]) + elif [ ! [[ $with_vendor_bug_url =~ ^[[:print:]]*$ ]] ]; then + AC_MSG_ERROR([--with-vendor-bug-url contains non-printing characters: $with_vendor_bug_url]) + else + VENDOR_URL_BUG="$with_vendor_bug_url" + fi + AC_SUBST(VENDOR_URL_BUG) + + # The vendor VM bug URL, if any + AC_ARG_WITH(vendor-vm-bug-url, [AS_HELP_STRING([--with-vendor-vm-bug-url], + [Sets the bug URL which will be displayed when the VM crashes @<:@not specified@:>@])]) + if test "x$with_vendor_vm_bug_url" = xyes; then + AC_MSG_ERROR([--with-vendor-vm-bug-url must have a value]) + elif [ ! [[ $with_vendor_vm_bug_url =~ ^[[:print:]]*$ ]] ]; then + AC_MSG_ERROR([--with-vendor-vm-bug-url contains non-printing characters: $with_vendor_vm_bug_url]) + else + VENDOR_URL_VM_BUG="$with_vendor_vm_bug_url" + fi + AC_SUBST(VENDOR_URL_VM_BUG) + AC_ARG_WITH(copyright-year, [AS_HELP_STRING([--with-copyright-year], [Set copyright year value for build @<:@current year@:>@])]) if test "x$with_copyright_year" = xyes; then diff -r e0b7721459ee -r 7480582c7fdc common/autoconf/spec.gmk.in --- a/common/autoconf/spec.gmk.in Wed Mar 20 16:32:54 2019 +0000 +++ b/common/autoconf/spec.gmk.in Fri Mar 29 15:08:03 2019 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -150,6 +150,18 @@ NASHORN_TOPDIR:=@NASHORN_TOPDIR@ COPYRIGHT_YEAR:=@COPYRIGHT_YEAR@ +# Platform naming variables +LAUNCHER_NAME:=@LAUNCHER_NAME@ +PRODUCT_NAME:=@PRODUCT_NAME@ +PRODUCT_SUFFIX:=@PRODUCT_SUFFIX@ +JDK_RC_PLATFORM_NAME:=@JDK_RC_PLATFORM_NAME@ +COMPANY_NAME:=@COMPANY_NAME@ +MACOSX_BUNDLE_NAME_BASE=@MACOSX_BUNDLE_NAME_BASE@ +MACOSX_BUNDLE_ID_BASE=@MACOSX_BUNDLE_ID_BASE@ +VENDOR_URL:=@VENDOR_URL@ +VENDOR_URL_BUG:=@VENDOR_URL_BUG@ +VENDOR_URL_VM_BUG:=@VENDOR_URL_VM_BUG@ + # Location where build customization files may be found CUSTOM_MAKE_DIR:=@CUSTOM_MAKE_DIR@ @@ -160,15 +172,33 @@ JDK_UPDATE_VERSION:=@JDK_UPDATE_VERSION@ JDK_BUILD_NUMBER:=@JDK_BUILD_NUMBER@ MILESTONE:=@MILESTONE@ -LAUNCHER_NAME:=@LAUNCHER_NAME@ -PRODUCT_NAME:=@PRODUCT_NAME@ -PRODUCT_SUFFIX:=@PRODUCT_SUFFIX@ -JDK_RC_PLATFORM_NAME:=@JDK_RC_PLATFORM_NAME@ -COMPANY_NAME:=@COMPANY_NAME@ -MACOSX_BUNDLE_NAME_BASE=@MACOSX_BUNDLE_NAME_BASE@ -MACOSX_BUNDLE_ID_BASE=@MACOSX_BUNDLE_ID_BASE@ USER_RELEASE_SUFFIX=@USER_RELEASE_SUFFIX@ +ifneq ($(COMPANY_NAME),) + # COMPANY_NAME is set to "N/A" in $AUTOCONF_DIR/version-numbers by default, + # but can be customized with the '--with-vendor-name' configure option. + # Only export "VENDOR" to the build if COMPANY_NAME contains a real value. + # Otherwise the default value for VENDOR, which is used to set the "java.vendor" + # and "java.vm.vendor" properties is hard-coded into the source code (i.e. in + # System.c in the jdk for "vm.vendor" and vm_version.cpp in the VM for "java.vm.vendor") + ifneq ($(COMPANY_NAME), N/A) + VERSION_CFLAGS += -DVENDOR='"$(COMPANY_NAME)"' + endif +endif + +# Only export VENDOR_URL, VENDOR_URL_BUG and VENDOR_VM_URL_BUG to the build if +# they are not empty. Otherwise, default values which are defined in the sources +# will be used. +ifneq ($(VENDOR_URL),) + VERSION_CFLAGS += -DVENDOR_URL='"$(VENDOR_URL)"' +endif +ifneq ($(VENDOR_URL_BUG),) + VERSION_CFLAGS += -DVENDOR_URL_BUG='"$(VENDOR_URL_BUG)"' +endif +ifneq ($(VENDOR_URL_VM_BUG),) + VERSION_CFLAGS += -DVENDOR_URL_VM_BUG='"$(VENDOR_URL_VM_BUG)"' +endif + # Different version strings generated from the above information. JDK_VERSION:=@JDK_VERSION@ RUNTIME_NAME=$(PRODUCT_NAME) $(PRODUCT_SUFFIX)