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