7040096: Fix broken hg tip for 'make source'
Reviewed-by: katleman
## Copyright (c) 1995, 2011, 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# under the terms of the GNU General Public License version 2 only, as# published by the Free Software Foundation. Oracle designates this# particular file as subject to the "Classpath" exception as provided# by Oracle in the LICENSE file that accompanied this code.## This code is distributed in the hope that it will be useful, but WITHOUT# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License# version 2 for more details (a copy is included in the LICENSE file that# accompanied this code).## You should have received a copy of the GNU General Public License version# 2 along with this work; if not, write to the Free Software Foundation,# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.## Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA# or visit www.oracle.com if you need additional information or have any# questions.### Common variables used by all the Java makefiles. This file should# not contain rules.## WARNING: This file is shared with other components.#ifndef JDK_MAKE_SHARED_DIR JDK_MAKE_SHARED_DIR = $(JDK_TOPDIR)/make/common/sharedendififndef HOTSPOT_TOPDIR HOTSPOT_TOPDIR=$(TOPDIR)/hotspotendififndef LANGTOOLS_TOPDIR LANGTOOLS_TOPDIR=$(TOPDIR)/langtoolsendififndef CORBA_TOPDIR CORBA_TOPDIR=$(TOPDIR)/corbaendififndef JAXP_TOPDIR JAXP_TOPDIR=$(TOPDIR)/jaxpendififndef JAXWS_TOPDIR JAXWS_TOPDIR=$(TOPDIR)/jaxwsendififndef JDK_TOPDIR JDK_TOPDIR=$(TOPDIR)/jdkendififndef INSTALL_TOPDIR INSTALL_TOPDIR=$(TOPDIR)/installendififndef SPONSORS_TOPDIR SPONSORS_TOPDIR=$(TOPDIR)/sponsorsendififndef DEPLOY_TOPDIR DEPLOY_TOPDIR=$(TOPDIR)/deployendif# Get shared platform settingsinclude $(JDK_MAKE_SHARED_DIR)/Platform.gmk# Default directory immediately above the "build" output directory (OUTPUTDIR)BUILD_PARENT_DIRECTORY=$(TOPDIR)# Get platform specific settingsinclude $(JDK_MAKE_SHARED_DIR)/Defs.gmkSRC_BUNDLEDIR = $(OUTPUTDIR)/source-bundlesABS_SRC_BUNDLEDIR = $(ABS_OUTPUTDIR)/source-bundlesBIN_BUNDLEDIR = $(OUTPUTDIR)/bundlesABS_BIN_BUNDLEDIR = $(ABS_OUTPUTDIR)/bundlesdummy := $(shell $(MKDIR) -p $(BIN_BUNDLEDIR))dummy := $(shell $(MKDIR) -p $(SRC_BUNDLEDIR) )TEMP_DIR = $(OUTPUTDIR)/tmpABS_TEMP_DIR = $(ABS_OUTPUTDIR)/tmpdummy := $(shell $(MKDIR) -p $(TEMP_DIR))# The language version we want for this jdk buildSOURCE_LANGUAGE_VERSION=7# The class version we want for this jdk buildTARGET_CLASS_VERSION=7# The MESSAGE, WARNING and ERROR files are used to store sanity check and # source check messages, warnings and errors. export ERROR_FILE := $(ABS_OUTPUTDIR)/sanityCheckErrors.txtexport WARNING_FILE := $(ABS_OUTPUTDIR)/sanityCheckWarnings.txtexport MESSAGE_FILE := $(ABS_OUTPUTDIR)/sanityCheckMessages.txt# source bundle generation definitionsBUNDLE_DATE := $(shell $(DATE) '+%d_%b_%Y' | $(TR) "[A-Z]" "[a-z]")ifdef ALT_BUNDLE_DATE BUNDLE_DATE := $(ALT_BUNDLE_DATE)endif# If the update version contains non-numeric characters, we need# to massage it into a numeric format. Unfortunately, the# Windows VERSIONINFO resource that we stick in jvm.dll cannot# handle non-numeric characters. We have to do this here because# Hotspot (nmake) cannot handle calculations. So we use the# following formula:# COOKED_JDK_UPDATE_VERSION = JDK_UPDATE_VERSION * 10 + EXCEPTION_VERSION# # Here are some examples:# 1.5.0 b01 -> 5,0,0,1# 1.5.0_10 b01 -> 5,0,100,1 # 1.4.2 b01 -> 4,2,0,1# 1.4.2_02 b01 -> 4,2,20,1# 1.4.2_02a b01 -> 4,2,21,1# 1.4.2_02b b01 -> 4,2,22,1ifdef JDK_UPDATE_VERSION VTMP := $(shell $(ECHO) $(JDK_UPDATE_VERSION) | $(TR) "abcde" "12345") CHAR1 := $(shell $(ECHO) $(VTMP) | $(NAWK) '{print substr($$1, 1, 1);}') CHAR2 := $(shell $(ECHO) $(VTMP) | $(NAWK) '{print substr($$1, 2, 1);}') CHAR3 := $(shell $(ECHO) $(VTMP) | $(NAWK) '{print substr($$1, 3, 1);}') ifeq ($(CHAR3),) CHAR3 := 0 endif ifeq ($(CHAR1), 0) COOKED_JDK_UPDATE_VERSION := $(CHAR2)$(CHAR3) else COOKED_JDK_UPDATE_VERSION := $(CHAR1)$(CHAR2)$(CHAR3) endifendififneq ($(JDK_BUILD_NUMBER),) COOKED_BUILD_NUMBER = $(shell $(ECHO) $(JDK_BUILD_NUMBER) \ | $(SED) -e 's/^b//' | $(SED) -e 's/^0//')else COOKED_BUILD_NUMBER = 0endif