source: trunk/openjdk/jdk/make/common/shared/Defs-control.gmk

Last change on this file was 278, checked in by dmik, 14 years ago

trunk: Merged in openjdk6 b22 from branches/vendor/oracle.

File size: 4.3 KB
Line 
1#
2# Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4#
5# This code is free software; you can redistribute it and/or modify it
6# under the terms of the GNU General Public License version 2 only, as
7# published by the Free Software Foundation. Oracle designates this
8# particular file as subject to the "Classpath" exception as provided
9# by Oracle in the LICENSE file that accompanied this code.
10#
11# This code is distributed in the hope that it will be useful, but WITHOUT
12# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14# version 2 for more details (a copy is included in the LICENSE file that
15# accompanied this code).
16#
17# You should have received a copy of the GNU General Public License version
18# 2 along with this work; if not, write to the Free Software Foundation,
19# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20#
21# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22# or visit www.oracle.com if you need additional information or have any
23# questions.
24#
25
26#
27# Common variables used by all the Java makefiles. This file should
28# not contain rules.
29#
30
31# WARNING: This file is shared with other components.
32#
33
34ifndef JDK_MAKE_SHARED_DIR
35 JDK_MAKE_SHARED_DIR = $(JDK_TOPDIR)/make/common/shared
36endif
37
38ifndef HOTSPOT_TOPDIR
39 HOTSPOT_TOPDIR=$(TOPDIR)/hotspot
40endif
41ifndef LANGTOOLS_TOPDIR
42 LANGTOOLS_TOPDIR=$(TOPDIR)/langtools
43endif
44ifndef CORBA_TOPDIR
45 CORBA_TOPDIR=$(TOPDIR)/corba
46endif
47ifndef JAXP_TOPDIR
48 JAXP_TOPDIR=$(TOPDIR)/jaxp
49endif
50ifndef JAXWS_TOPDIR
51 JAXWS_TOPDIR=$(TOPDIR)/jaxws
52endif
53ifndef JDK_TOPDIR
54 JDK_TOPDIR=$(TOPDIR)/jdk
55endif
56
57# Get shared platform settings
58include $(JDK_MAKE_SHARED_DIR)/Platform.gmk
59
60# Default output directory
61_OUTPUTDIR=$(TOPDIR)/build/$(PLATFORM)-$(ARCH)
62
63# Get platform specific settings
64include $(JDK_MAKE_SHARED_DIR)/Defs.gmk
65
66SRC_BUNDLEDIR = $(OUTPUTDIR)/source-bundles
67ABS_SRC_BUNDLEDIR = $(ABS_OUTPUTDIR)/source-bundles
68BIN_BUNDLEDIR = $(OUTPUTDIR)/bundles
69ABS_BIN_BUNDLEDIR = $(ABS_OUTPUTDIR)/bundles
70JRL_BUNDLEDIR = $(OUTPUTDIR)/java.net
71ABS_JRL_BUNDLEDIR = $(ABS_OUTPUTDIR)/java.net
72
73dummy := $(shell $(MKDIR) -p $(BIN_BUNDLEDIR))
74dummy := $(shell $(MKDIR) -p $(SRC_BUNDLEDIR) )
75dummy := $(shell $(MKDIR) -p $(JRL_BUNDLEDIR) )
76
77TEMP_DIR = $(OUTPUTDIR)/tmp
78ABS_TEMP_DIR = $(ABS_OUTPUTDIR)/tmp
79
80dummy := $(shell $(MKDIR) -p $(TEMP_DIR))
81
82# The class version we want for this jdk build
83TARGET_CLASS_VERSION=5
84
85# The MESSAGE, WARNING and ERROR files are used to store sanity check and
86# source check messages, warnings and errors.
87export ERROR_FILE := $(ABS_OUTPUTDIR)/sanityCheckErrors.txt
88export WARNING_FILE := $(ABS_OUTPUTDIR)/sanityCheckWarnings.txt
89export MESSAGE_FILE := $(ABS_OUTPUTDIR)/sanityCheckMessages.txt
90
91# source bundle generation definitions
92BUNDLE_DATE := $(shell $(DATE) '+%d_%b_%Y' | $(TR) "[A-Z]" "[a-z]")
93ifdef ALT_BUNDLE_DATE
94 BUNDLE_DATE := $(ALT_BUNDLE_DATE)
95endif
96
97# If the update version contains non-numeric characters, we need
98# to massage it into a numeric format. Unfortunately, the
99# Windows VERSIONINFO resource that we stick in jvm.dll cannot
100# handle non-numeric characters. We have to do this here because
101# Hotspot (nmake) cannot handle calculations. So we use the
102# following formula:
103# COOKED_JDK_UPDATE_VERSION = JDK_UPDATE_VERSION * 10 + EXCEPTION_VERSION
104#
105# Here are some examples:
106# 1.5.0 b01 -> 5,0,0,1
107# 1.5.0_10 b01 -> 5,0,100,1
108# 1.4.2 b01 -> 4,2,0,1
109# 1.4.2_02 b01 -> 4,2,20,1
110# 1.4.2_02a b01 -> 4,2,21,1
111# 1.4.2_02b b01 -> 4,2,22,1
112ifdef JDK_UPDATE_VERSION
113 VTMP := $(shell $(ECHO) $(JDK_UPDATE_VERSION) | $(TR) "abcde" "12345")
114 CHAR1 := $(shell $(ECHO) $(VTMP) | $(NAWK) '{print substr($$1, 1, 1);}')
115 CHAR2 := $(shell $(ECHO) $(VTMP) | $(NAWK) '{print substr($$1, 2, 1);}')
116 CHAR3 := $(shell $(ECHO) $(VTMP) | $(NAWK) '{print substr($$1, 3, 1);}')
117 ifeq ($(CHAR3),)
118 CHAR3 := 0
119 endif
120 ifeq ($(CHAR1), 0)
121 COOKED_JDK_UPDATE_VERSION := $(CHAR2)$(CHAR3)
122 else
123 COOKED_JDK_UPDATE_VERSION := $(CHAR1)$(CHAR2)$(CHAR3)
124 endif
125endif
126
127ifneq ($(JDK_BUILD_NUMBER),)
128 COOKED_BUILD_NUMBER = $(shell $(ECHO) $(JDK_BUILD_NUMBER) \
129 | $(SED) -e 's/^b//' | $(SED) -e 's/^0//')
130else
131 COOKED_BUILD_NUMBER = 0
132endif
133
Note: See TracBrowser for help on using the repository browser.