make/Defs-internal.gmk
changeset 0 fd16c54261b3
child 16 13adabd0ff72
equal deleted inserted replaced
-1:000000000000 0:fd16c54261b3
       
     1 #
       
     2 # Copyright 1995-2007 Sun Microsystems, Inc.  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.  Sun designates this
       
     8 # particular file as subject to the "Classpath" exception as provided
       
     9 # by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
       
    22 # CA 95054 USA or visit www.sun.com if you need additional information or
       
    23 # have any questions.
       
    24 #
       
    25 
       
    26 #
       
    27 # Common variables used by all the Java makefiles.  This file should
       
    28 # not contain rules.
       
    29 #
       
    30 
       
    31 # Define absolute paths to TOPDIRs
       
    32 ABS_CONTROL_TOPDIR:=$(call OptFullPath,"$(CONTROL_TOPDIR)")
       
    33 ABS_LANGTOOLS_TOPDIR:=$(call OptFullPath,"$(LANGTOOLS_TOPDIR)")
       
    34 ABS_CORBA_TOPDIR:=$(call OptFullPath,"$(CORBA_TOPDIR)")
       
    35 ABS_JAXP_TOPDIR:=$(call OptFullPath,"$(JAXP_TOPDIR)")
       
    36 ABS_JAXWS_TOPDIR:=$(call OptFullPath,"$(JAXWS_TOPDIR)")
       
    37 ABS_JDK_TOPDIR:=$(call OptFullPath,"$(JDK_TOPDIR)")
       
    38 ABS_HOTSPOT_TOPDIR:=$(call OptFullPath,"$(HOTSPOT_TOPDIR)")
       
    39 ABS_INSTALL_TOPDIR:=$(call OptFullPath,"$(INSTALL_TOPDIR)")
       
    40 ABS_SPONSORS_TOPDIR:=$(call OptFullPath,"$(SPONSORS_TOPDIR)")
       
    41 ABS_DEPLOY_TOPDIR:=$(call OptFullPath,"$(DEPLOY_TOPDIR)")
       
    42 
       
    43 # Macro to return true or false if a file exists and is readable
       
    44 define MkExists
       
    45 $(shell if [ -r $1 ]; then $(ECHO) true; else $(ECHO) false; fi)
       
    46 endef
       
    47 
       
    48 HOTSPOT_SRC_AVAILABLE := $(call MkExists,$(HOTSPOT_TOPDIR)/make/Makefile)
       
    49 ifndef BUILD_HOTSPOT
       
    50   ifdef ALT_HOTSPOT_IMPORT_PATH
       
    51     BUILD_HOTSPOT := false
       
    52   else
       
    53     BUILD_HOTSPOT := $(HOTSPOT_SRC_AVAILABLE)
       
    54   endif
       
    55 endif
       
    56 
       
    57 LANGTOOLS_SRC_AVAILABLE := $(call MkExists,$(LANGTOOLS_TOPDIR)/make/Makefile)
       
    58 ifndef BUILD_LANGTOOLS
       
    59   ifdef ALT_LANGTOOLS_DIST
       
    60     BUILD_LANGTOOLS := false
       
    61   else
       
    62     BUILD_LANGTOOLS := $(LANGTOOLS_SRC_AVAILABLE)
       
    63   endif
       
    64 endif
       
    65 
       
    66 CORBA_SRC_AVAILABLE := $(call MkExists,$(CORBA_TOPDIR)/make/Makefile)
       
    67 ifndef BUILD_CORBA
       
    68   ifdef ALT_CORBA_DIST
       
    69     BUILD_CORBA := false
       
    70   else
       
    71     BUILD_CORBA := $(CORBA_SRC_AVAILABLE)
       
    72   endif
       
    73 endif
       
    74 
       
    75 JAXP_SRC_AVAILABLE := $(call MkExists,$(JAXP_TOPDIR)/make/Makefile)
       
    76 ifndef BUILD_JAXP
       
    77   ifdef ALT_JAXP_DIST
       
    78     BUILD_JAXP := false
       
    79   else
       
    80     BUILD_JAXP := $(JAXP_SRC_AVAILABLE)
       
    81   endif
       
    82 endif
       
    83 
       
    84 JAXWS_SRC_AVAILABLE := $(call MkExists,$(JAXWS_TOPDIR)/make/Makefile)
       
    85 ifndef BUILD_JAXWS
       
    86   ifdef ALT_JAXWS_DIST
       
    87     BUILD_JAXWS := false
       
    88   else
       
    89     BUILD_JAXWS := $(JAXWS_SRC_AVAILABLE)
       
    90   endif
       
    91 endif
       
    92 
       
    93 JDK_SRC_AVAILABLE := $(call MkExists,$(JDK_TOPDIR)/make/Makefile)
       
    94 ifndef BUILD_JDK
       
    95   BUILD_JDK := $(JDK_SRC_AVAILABLE)
       
    96 endif
       
    97 ifeq ($(JDK_SRC_AVAILABLE),true)
       
    98   JDK_CLOSED_SRC_AVAILABLE := $(call MkExists,$(JDK_TOPDIR)/src/closed)
       
    99   ifndef OPENJDK
       
   100     ifeq ($(JDK_CLOSED_SRC_AVAILABLE),false)
       
   101       OPENJDK = true
       
   102     endif
       
   103   endif
       
   104 endif
       
   105 
       
   106 DEPLOY_SRC_AVAILABLE := $(call MkExists,$(DEPLOY_TOPDIR)/make/Makefile)
       
   107 ifndef BUILD_DEPLOY
       
   108   BUILD_DEPLOY := $(DEPLOY_SRC_AVAILABLE)
       
   109 endif
       
   110 
       
   111 INSTALL_SRC_AVAILABLE := $(call MkExists,$(INSTALL_TOPDIR)/make/Makefile)
       
   112 ifndef BUILD_INSTALL
       
   113   ifdef DEV_ONLY
       
   114     BUILD_INSTALL := false
       
   115   else
       
   116     BUILD_INSTALL := $(INSTALL_SRC_AVAILABLE)
       
   117   endif
       
   118 endif
       
   119 
       
   120 SPONSORS_SRC_AVAILABLE := $(call MkExists,$(SPONSORS_TOPDIR)/make/Makefile)
       
   121 ifndef BUILD_SPONSORS
       
   122   ifdef DEV_ONLY
       
   123     BUILD_SPONSORS := false
       
   124   else
       
   125     BUILD_SPONSORS := $(SPONSORS_SRC_AVAILABLE)
       
   126   endif
       
   127 endif
       
   128 
       
   129 
       
   130 # Do we build the source and openjdk binary plug bundles?
       
   131 BUNDLE_RULES = $(JDK_TOPDIR)/make/closed/bundles.gmk
       
   132 BUNDLE_RULES_AVAILABLE := $(call MkExists,$(BUNDLE_RULES))
       
   133 
       
   134 # Current things we do NOT build for OPENJDK
       
   135 ifdef OPENJDK
       
   136   BUILD_DEPLOY = false
       
   137   BUILD_INSTALL = false
       
   138   BUILD_SPONSORS = false
       
   139   BUNDLE_RULES_AVAILABLE := false
       
   140   # These could be over-ridden on the command line or in environment
       
   141   ifndef SKIP_FASTDEBUG_BUILD
       
   142     SKIP_FASTDEBUG_BUILD = true
       
   143   endif
       
   144   ifndef SKIP_DEBUG_BUILD
       
   145     SKIP_DEBUG_BUILD = true
       
   146   endif
       
   147   ifndef SKIP_COMPARE_IMAGES
       
   148     SKIP_COMPARE_IMAGES = true
       
   149   endif
       
   150   SKIP_OPENJDK_BUILD = true
       
   151 else
       
   152   ifndef SKIP_OPENJDK_BUILD
       
   153     SKIP_OPENJDK_BUILD = false
       
   154     # FIXUP: until freetype fixed on linux and solaris rmi build fixed
       
   155     SKIP_OPENJDK_BUILD = true
       
   156   endif
       
   157 endif
       
   158 
       
   159 # Solaris 64 bit builds are not complete enough to ever do this
       
   160 ifeq ($(PLATFORM)$(ARCH_DATA_MODEL),solaris64)
       
   161   SKIP_OPENJDK_BUILD = true
       
   162 endif
       
   163 
       
   164 # Many reasons why we would want to skip the comparison to previous jdk
       
   165 ifndef SKIP_COMPARE_IMAGES
       
   166   ifeq ($(BUILD_JDK), false)
       
   167     SKIP_COMPARE_IMAGES = true
       
   168   endif
       
   169   ifeq ($(BUILD_DEPLOY), false)
       
   170     SKIP_COMPARE_IMAGES = true
       
   171   endif
       
   172   ifeq ($(BUILD_INSTALL), false)
       
   173     SKIP_COMPARE_IMAGES = true
       
   174   endif
       
   175   ifdef DEV_ONLY
       
   176     SKIP_COMPARE_IMAGES = true
       
   177   endif
       
   178 endif
       
   179 
       
   180 # Select defaults if these are not set to true or false
       
   181 ifndef SKIP_DEBUG_BUILD
       
   182   SKIP_DEBUG_BUILD=true
       
   183 endif
       
   184 ifndef SKIP_FASTDEBUG_BUILD
       
   185   SKIP_FASTDEBUG_BUILD=false
       
   186 endif
       
   187 
       
   188 # Output directory for hotspot build
       
   189 HOTSPOT_DIR = $(ABS_OUTPUTDIR)/hotspot
       
   190 
       
   191 # If we are building components
       
   192 ifndef ALT_LANGTOOLS_DIST
       
   193   LANGTOOLS_OUTPUTDIR = $(ABS_OUTPUTDIR)/langtools
       
   194   ABS_LANGTOOLS_DIST = $(LANGTOOLS_OUTPUTDIR)/dist
       
   195 endif
       
   196 ifndef ALT_CORBA_DIST
       
   197   CORBA_OUTPUTDIR = $(ABS_OUTPUTDIR)/corba
       
   198   ABS_CORBA_DIST = $(CORBA_OUTPUTDIR)/dist
       
   199 endif
       
   200 ifndef ALT_JAXP_DIST
       
   201   JAXP_OUTPUTDIR = $(ABS_OUTPUTDIR)/jaxp
       
   202   ABS_JAXP_DIST = $(JAXP_OUTPUTDIR)/dist
       
   203 endif
       
   204 ifndef ALT_JAXWS_DIST
       
   205   JAXWS_OUTPUTDIR = $(ABS_OUTPUTDIR)/jaxws
       
   206   ABS_JAXWS_DIST = $(JAXWS_OUTPUTDIR)/dist
       
   207 endif
       
   208 
       
   209 # Common make arguments (supplied to all component builds)
       
   210 COMMON_BUILD_ARGUMENTS = \
       
   211     JDK_TOPDIR=$(ABS_JDK_TOPDIR) \
       
   212     JDK_MAKE_SHARED_DIR=$(ABS_JDK_TOPDIR)/make/common/shared \
       
   213     EXTERNALSANITYCONTROL=true \
       
   214     TARGET_CLASS_VERSION=$(TARGET_CLASS_VERSION) \
       
   215     MILESTONE=$(MILESTONE) \
       
   216     BUILD_NUMBER=$(BUILD_NUMBER) \
       
   217     JDK_BUILD_NUMBER=$(JDK_BUILD_NUMBER) \
       
   218     FULL_VERSION=$(FULL_VERSION) \
       
   219     PREVIOUS_JDK_VERSION=$(PREVIOUS_JDK_VERSION) \
       
   220     JDK_VERSION=$(JDK_VERSION) \
       
   221     JDK_MKTG_VERSION=$(JDK_MKTG_VERSION) \
       
   222     JDK_MAJOR_VERSION=$(JDK_MAJOR_VERSION) \
       
   223     JDK_MINOR_VERSION=$(JDK_MINOR_VERSION) \
       
   224     JDK_MICRO_VERSION=$(JDK_MICRO_VERSION)
       
   225 
       
   226 ifdef ARCH_DATA_MODEL
       
   227   COMMON_BUILD_ARGUMENTS += ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)
       
   228 endif
       
   229 
       
   230 ifeq ($(DEBUG_NAME), debug)
       
   231   COMMON_BUILD_ARGUMENTS += VARIANT=DBG DEBUG_CLASSFILES=true
       
   232 endif
       
   233 
       
   234 ifeq ($(DEBUG_NAME), fastdebug)
       
   235   COMMON_BUILD_ARGUMENTS += VARIANT=DBG FASTDEBUG=true DEBUG_CLASSFILES=true
       
   236 endif
       
   237 
       
   238 ifdef COOKED_JDK_UPDATE_VERSION
       
   239   COMMON_BUILD_ARGUMENTS += COOKED_JDK_UPDATE_VERSION=$(COOKED_JDK_UPDATE_VERSION)
       
   240 endif
       
   241 
       
   242 ifdef COOKED_BUILD_NUMBER
       
   243   COMMON_BUILD_ARGUMENTS += COOKED_BUILD_NUMBER=$(COOKED_BUILD_NUMBER)
       
   244 endif
       
   245 
       
   246 ifdef ANT_HOME
       
   247   COMMON_BUILD_ARGUMENTS += ANT_HOME="$(ANT_HOME)"
       
   248 endif
       
   249 
       
   250 ifdef FINDBUGS_HOME
       
   251   COMMON_BUILD_ARGUMENTS += FINDBUGS_HOME="$(FINDBUGS_HOME)"
       
   252 endif
       
   253 
       
   254