Makefile
author ohair
Tue, 25 Mar 2008 14:38:56 -0700
changeset 20 41658053480c
parent 17 bb9f330cd95a
child 668 982030fabc32
permissions -rw-r--r--
6623832: Cleanup old j2se makefile targets Summary: Just removing unneeded makefile rules and 'control' logic. Reviewed-by: xdono
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
     1
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
     2
# Copyright 1995-2007 Sun Microsystems, Inc.  All Rights Reserved.
fd16c54261b3 Initial load
duke
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
fd16c54261b3 Initial load
duke
parents:
diff changeset
     4
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
fd16c54261b3 Initial load
duke
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
fd16c54261b3 Initial load
duke
parents:
diff changeset
     7
# published by the Free Software Foundation.  Sun designates this
fd16c54261b3 Initial load
duke
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
fd16c54261b3 Initial load
duke
parents:
diff changeset
     9
# by Sun in the LICENSE file that accompanied this code.
fd16c54261b3 Initial load
duke
parents:
diff changeset
    10
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
fd16c54261b3 Initial load
duke
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
fd16c54261b3 Initial load
duke
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
fd16c54261b3 Initial load
duke
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
fd16c54261b3 Initial load
duke
parents:
diff changeset
    15
# accompanied this code).
fd16c54261b3 Initial load
duke
parents:
diff changeset
    16
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
fd16c54261b3 Initial load
duke
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
fd16c54261b3 Initial load
duke
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
fd16c54261b3 Initial load
duke
parents:
diff changeset
    20
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
    21
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
fd16c54261b3 Initial load
duke
parents:
diff changeset
    22
# CA 95054 USA or visit www.sun.com if you need additional information or
fd16c54261b3 Initial load
duke
parents:
diff changeset
    23
# have any questions.
fd16c54261b3 Initial load
duke
parents:
diff changeset
    24
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
    25
17
bb9f330cd95a 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 16
diff changeset
    26
BUILD_PARENT_DIRECTORY=.
bb9f330cd95a 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 16
diff changeset
    27
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
    28
ifndef TOPDIR
20
41658053480c 6623832: Cleanup old j2se makefile targets
ohair
parents: 17
diff changeset
    29
  TOPDIR:=.
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
    30
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
    31
fd16c54261b3 Initial load
duke
parents:
diff changeset
    32
ifndef CONTROL_TOPDIR
20
41658053480c 6623832: Cleanup old j2se makefile targets
ohair
parents: 17
diff changeset
    33
  CONTROL_TOPDIR=$(TOPDIR)
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
    34
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
    35
16
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
    36
# Openjdk sources (only used if SKIP_OPENJDK_BUILD!=true)
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
    37
OPENJDK_SOURCETREE=$(TOPDIR)/openjdk
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
    38
OPENJDK_BUILDDIR:=$(shell \
20
41658053480c 6623832: Cleanup old j2se makefile targets
ohair
parents: 17
diff changeset
    39
  if [ -r $(OPENJDK_SOURCETREE)/Makefile ]; then \
16
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
    40
    echo "$(OPENJDK_SOURCETREE)"; \
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
    41
  else \
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
    42
    echo "."; \
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
    43
  fi)
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
    44
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
    45
ifndef JDK_TOPDIR
fd16c54261b3 Initial load
duke
parents:
diff changeset
    46
  JDK_TOPDIR=$(TOPDIR)/jdk
fd16c54261b3 Initial load
duke
parents:
diff changeset
    47
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
    48
ifndef JDK_MAKE_SHARED_DIR
fd16c54261b3 Initial load
duke
parents:
diff changeset
    49
  JDK_MAKE_SHARED_DIR=$(JDK_TOPDIR)/make/common/shared
fd16c54261b3 Initial load
duke
parents:
diff changeset
    50
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
    51
fd16c54261b3 Initial load
duke
parents:
diff changeset
    52
include $(JDK_MAKE_SHARED_DIR)/Defs-control.gmk
fd16c54261b3 Initial load
duke
parents:
diff changeset
    53
fd16c54261b3 Initial load
duke
parents:
diff changeset
    54
include ./make/Defs-internal.gmk
fd16c54261b3 Initial load
duke
parents:
diff changeset
    55
fd16c54261b3 Initial load
duke
parents:
diff changeset
    56
all::
fd16c54261b3 Initial load
duke
parents:
diff changeset
    57
	@$(ECHO) $(PLATFORM) $(ARCH) $(RELEASE) build started: `$(DATE) '+%y-%m-%d %H:%M'`
17
bb9f330cd95a 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 16
diff changeset
    58
	$(MKDIR) -p $(OUTPUTDIR)
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
    59
fd16c54261b3 Initial load
duke
parents:
diff changeset
    60
# Rules for sanity checks
fd16c54261b3 Initial load
duke
parents:
diff changeset
    61
include ./make/sanity-rules.gmk
fd16c54261b3 Initial load
duke
parents:
diff changeset
    62
fd16c54261b3 Initial load
duke
parents:
diff changeset
    63
dev : dev-build
fd16c54261b3 Initial load
duke
parents:
diff changeset
    64
fd16c54261b3 Initial load
duke
parents:
diff changeset
    65
dev-build:
fd16c54261b3 Initial load
duke
parents:
diff changeset
    66
	$(MAKE) DEV_ONLY=true all
fd16c54261b3 Initial load
duke
parents:
diff changeset
    67
dev-sanity:
fd16c54261b3 Initial load
duke
parents:
diff changeset
    68
	$(MAKE) DEV_ONLY=true sanity
fd16c54261b3 Initial load
duke
parents:
diff changeset
    69
dev-clobber:
fd16c54261b3 Initial load
duke
parents:
diff changeset
    70
	$(MAKE) DEV_ONLY=true clobber
fd16c54261b3 Initial load
duke
parents:
diff changeset
    71
fd16c54261b3 Initial load
duke
parents:
diff changeset
    72
# Rules for various components
fd16c54261b3 Initial load
duke
parents:
diff changeset
    73
include ./make/hotspot-rules.gmk
fd16c54261b3 Initial load
duke
parents:
diff changeset
    74
include ./make/langtools-rules.gmk
fd16c54261b3 Initial load
duke
parents:
diff changeset
    75
include ./make/corba-rules.gmk
fd16c54261b3 Initial load
duke
parents:
diff changeset
    76
include ./make/jaxp-rules.gmk
fd16c54261b3 Initial load
duke
parents:
diff changeset
    77
include ./make/jaxws-rules.gmk
fd16c54261b3 Initial load
duke
parents:
diff changeset
    78
include ./make/jdk-rules.gmk
fd16c54261b3 Initial load
duke
parents:
diff changeset
    79
include ./make/install-rules.gmk
fd16c54261b3 Initial load
duke
parents:
diff changeset
    80
include ./make/sponsors-rules.gmk
fd16c54261b3 Initial load
duke
parents:
diff changeset
    81
include ./make/deploy-rules.gmk
fd16c54261b3 Initial load
duke
parents:
diff changeset
    82
fd16c54261b3 Initial load
duke
parents:
diff changeset
    83
all:: setup build
fd16c54261b3 Initial load
duke
parents:
diff changeset
    84
16
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
    85
setup: openjdk_check
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
    86
	$(MKDIR) -p $(OUTPUTDIR)/j2sdk-image
fd16c54261b3 Initial load
duke
parents:
diff changeset
    87
16
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
    88
# Check on whether we really can build the openjdk, need source etc.
17
bb9f330cd95a 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 16
diff changeset
    89
openjdk_check: FRC
16
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
    90
ifneq ($(SKIP_OPENJDK_BUILD), true)
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
    91
	@$(ECHO) " "
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
    92
	@$(ECHO) "================================================="
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
    93
	@if [ ! -r $(OPENJDK_BUILDDIR)/Makefile ] ; then \
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
    94
	    $(ECHO) "ERROR: No openjdk source tree available at: $(OPENJDK_BUILDDIR)"; \
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
    95
	    exit 1; \
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
    96
	else \
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
    97
	    $(ECHO) "OpenJDK will be built after JDK is built"; \
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
    98
	    $(ECHO) "  OPENJDK_BUILDDIR=$(OPENJDK_BUILDDIR)"; \
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
    99
	fi
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   100
	@$(ECHO) "================================================="
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   101
	@$(ECHO) " "
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   102
endif
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   103
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   104
build:: sanity 
fd16c54261b3 Initial load
duke
parents:
diff changeset
   105
fd16c54261b3 Initial load
duke
parents:
diff changeset
   106
clobber::
fd16c54261b3 Initial load
duke
parents:
diff changeset
   107
fd16c54261b3 Initial load
duke
parents:
diff changeset
   108
ifeq ($(BUILD_LANGTOOLS), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   109
  build:: langtools
fd16c54261b3 Initial load
duke
parents:
diff changeset
   110
  clobber:: langtools-clobber
fd16c54261b3 Initial load
duke
parents:
diff changeset
   111
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   112
fd16c54261b3 Initial load
duke
parents:
diff changeset
   113
ifeq ($(BUILD_CORBA), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   114
  build:: corba
fd16c54261b3 Initial load
duke
parents:
diff changeset
   115
  clobber:: corba-clobber
fd16c54261b3 Initial load
duke
parents:
diff changeset
   116
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   117
fd16c54261b3 Initial load
duke
parents:
diff changeset
   118
ifeq ($(BUILD_JAXP), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   119
  build:: jaxp
fd16c54261b3 Initial load
duke
parents:
diff changeset
   120
  clobber:: jaxp-clobber
fd16c54261b3 Initial load
duke
parents:
diff changeset
   121
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   122
fd16c54261b3 Initial load
duke
parents:
diff changeset
   123
ifeq ($(BUILD_JAXWS), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   124
  build:: jaxws
fd16c54261b3 Initial load
duke
parents:
diff changeset
   125
  clobber:: jaxws-clobber
fd16c54261b3 Initial load
duke
parents:
diff changeset
   126
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   127
fd16c54261b3 Initial load
duke
parents:
diff changeset
   128
ifeq ($(BUILD_HOTSPOT), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   129
  build:: $(HOTSPOT) 
fd16c54261b3 Initial load
duke
parents:
diff changeset
   130
  clobber:: hotspot-clobber
fd16c54261b3 Initial load
duke
parents:
diff changeset
   131
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   132
fd16c54261b3 Initial load
duke
parents:
diff changeset
   133
ifeq ($(BUILD_JDK), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   134
  build:: $(JDK_JAVA_EXE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   135
  clobber:: jdk-clobber
fd16c54261b3 Initial load
duke
parents:
diff changeset
   136
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   137
fd16c54261b3 Initial load
duke
parents:
diff changeset
   138
ifeq ($(BUILD_DEPLOY), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   139
  build:: $(DEPLOY)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   140
  clobber:: deploy-clobber
fd16c54261b3 Initial load
duke
parents:
diff changeset
   141
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   142
fd16c54261b3 Initial load
duke
parents:
diff changeset
   143
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
   144
# Generic debug build, fastdebug or debug. Needs special handling.
fd16c54261b3 Initial load
duke
parents:
diff changeset
   145
#  Note that debug builds do NOT do INSTALL steps, but must be done
fd16c54261b3 Initial load
duke
parents:
diff changeset
   146
#  after the product build and before the INSTALL step of the product build.
fd16c54261b3 Initial load
duke
parents:
diff changeset
   147
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
   148
#   DEBUG_NAME is fastdebug or debug
fd16c54261b3 Initial load
duke
parents:
diff changeset
   149
#   ALT_OUTPUTDIR is changed to have -debug or -fastdebug suffix
fd16c54261b3 Initial load
duke
parents:
diff changeset
   150
#   The resulting j2sdk-image is used by the install makefiles to create a
fd16c54261b3 Initial load
duke
parents:
diff changeset
   151
#     debug install bundle jdk-*-debug-** bundle (tar or zip) 
fd16c54261b3 Initial load
duke
parents:
diff changeset
   152
#     which will install in the debug or fastdebug subdirectory of the
fd16c54261b3 Initial load
duke
parents:
diff changeset
   153
#     normal product install area.
fd16c54261b3 Initial load
duke
parents:
diff changeset
   154
#     The install process needs to know what the DEBUG_NAME is, so
fd16c54261b3 Initial load
duke
parents:
diff changeset
   155
#     look for INSTALL_DEBUG_NAME in the install rules.
fd16c54261b3 Initial load
duke
parents:
diff changeset
   156
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
   157
fd16c54261b3 Initial load
duke
parents:
diff changeset
   158
COMMON_DEBUG_FLAGS= \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   159
	DEBUG_NAME=$(DEBUG_NAME) \
17
bb9f330cd95a 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 16
diff changeset
   160
	ALT_OUTPUTDIR=$(ABS_OUTPUTDIR)-$(DEBUG_NAME) \
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   161
	NO_DOCS=true
fd16c54261b3 Initial load
duke
parents:
diff changeset
   162
fd16c54261b3 Initial load
duke
parents:
diff changeset
   163
product_build: setup
fd16c54261b3 Initial load
duke
parents:
diff changeset
   164
	@$(ECHO) $@ build started: `$(DATE) '+%y-%m-%d %H:%M'`
fd16c54261b3 Initial load
duke
parents:
diff changeset
   165
	$(MAKE) SKIP_FASTDEBUG_BUILD=true SKIP_DEBUG_BUILD=true all
fd16c54261b3 Initial load
duke
parents:
diff changeset
   166
	@$(ECHO) $@ build finished: `$(DATE) '+%y-%m-%d %H:%M'`
fd16c54261b3 Initial load
duke
parents:
diff changeset
   167
fd16c54261b3 Initial load
duke
parents:
diff changeset
   168
generic_debug_build:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   169
	@$(ECHO) $@ build started: `$(DATE) '+%y-%m-%d %H:%M'`
fd16c54261b3 Initial load
duke
parents:
diff changeset
   170
	$(MAKE) $(COMMON_DEBUG_FLAGS) setup build
fd16c54261b3 Initial load
duke
parents:
diff changeset
   171
	@$(ECHO) $@ build finished: `$(DATE) '+%y-%m-%d %H:%M'`
fd16c54261b3 Initial load
duke
parents:
diff changeset
   172
fd16c54261b3 Initial load
duke
parents:
diff changeset
   173
debug_build: setup
fd16c54261b3 Initial load
duke
parents:
diff changeset
   174
	$(MAKE) DEBUG_NAME=debug generic_debug_build
fd16c54261b3 Initial load
duke
parents:
diff changeset
   175
fd16c54261b3 Initial load
duke
parents:
diff changeset
   176
fastdebug_build: setup
fd16c54261b3 Initial load
duke
parents:
diff changeset
   177
	$(MAKE) DEBUG_NAME=fastdebug generic_debug_build
fd16c54261b3 Initial load
duke
parents:
diff changeset
   178
fd16c54261b3 Initial load
duke
parents:
diff changeset
   179
ifeq ($(SKIP_FASTDEBUG_BUILD), false)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   180
  all:: fastdebug_build
fd16c54261b3 Initial load
duke
parents:
diff changeset
   181
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   182
fd16c54261b3 Initial load
duke
parents:
diff changeset
   183
ifeq ($(SKIP_DEBUG_BUILD), false)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   184
  all:: debug_build
fd16c54261b3 Initial load
duke
parents:
diff changeset
   185
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   186
fd16c54261b3 Initial load
duke
parents:
diff changeset
   187
ifeq ($(BUILD_JDK), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   188
  ifeq ($(BUNDLE_RULES_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   189
    all:: openjdk-binary-plugs-bundles
fd16c54261b3 Initial load
duke
parents:
diff changeset
   190
  endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   191
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   192
fd16c54261b3 Initial load
duke
parents:
diff changeset
   193
ifeq ($(BUILD_INSTALL), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   194
  all :: $(INSTALL)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   195
  clobber:: install-clobber
fd16c54261b3 Initial load
duke
parents:
diff changeset
   196
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   197
fd16c54261b3 Initial load
duke
parents:
diff changeset
   198
ifeq ($(BUILD_SPONSORS), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   199
  all :: $(SPONSORS)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   200
  clobber:: sponsors-clobber
fd16c54261b3 Initial load
duke
parents:
diff changeset
   201
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   202
fd16c54261b3 Initial load
duke
parents:
diff changeset
   203
ifneq ($(SKIP_COMPARE_IMAGES), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   204
  all :: compare-image
fd16c54261b3 Initial load
duke
parents:
diff changeset
   205
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   206
16
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   207
ifneq ($(SKIP_OPENJDK_BUILD), true)
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   208
  all :: openjdk_build
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   209
endif
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   210
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   211
# If we have bundle rules, we have a chance here to do a complete cycle
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   212
#   build, of production and open build.
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   213
# FIXUP: We should create the openjdk source bundle and build that?
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   214
#   But how do we reliable create or get at a formal openjdk source tree?
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   215
#   The one we have needs to be trimmed of built bits and closed dirs.
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   216
#   The repositories might not be available.
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   217
#   The openjdk source bundle is probably not available.
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   218
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   219
ifneq ($(SKIP_OPENJDK_BUILD), true)
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   220
  ifeq ($(BUILD_JDK), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   221
    ifeq ($(BUNDLE_RULES_AVAILABLE), true)
16
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   222
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   223
OPENJDK_PLUGS=$(ABS_OUTPUTDIR)/$(OPENJDK_BINARY_PLUGS_INAME)
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   224
OPENJDK_OUTPUTDIR=$(ABS_OUTPUTDIR)/open-output
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   225
OPENJDK_BUILD_NAME \
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   226
  = openjdk-$(JDK_MINOR_VERSION)-$(BUILD_NUMBER)-$(PLATFORM)-$(ARCH)-$(BUNDLE_DATE)
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   227
OPENJDK_BUILD_BINARY_ZIP=$(ABS_BIN_BUNDLEDIR)/$(OPENJDK_BUILD_NAME).zip
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   228
BUILT_IMAGE=$(ABS_OUTPUTDIR)/j2sdk-image
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   229
ifeq ($(PLATFORM)$(ARCH_DATA_MODEL),solaris64)
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   230
  OPENJDK_BOOTDIR=$(BOOTDIR)
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   231
  OPENJDK_IMPORTJDK=$(JDK_IMPORT_PATH)
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   232
else
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   233
  OPENJDK_BOOTDIR=$(BUILT_IMAGE)
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   234
  OPENJDK_IMPORTJDK=$(BUILT_IMAGE)
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   235
endif
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   236
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   237
openjdk_build:
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   238
	@$(ECHO) " "
fd16c54261b3 Initial load
duke
parents:
diff changeset
   239
	@$(ECHO) "================================================="
fd16c54261b3 Initial load
duke
parents:
diff changeset
   240
	@$(ECHO) "Starting openjdk build"
16
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   241
	@$(ECHO) " Using: ALT_JDK_DEVTOOLS_DIR=$(JDK_DEVTOOLS_DIR)"
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   242
	@$(ECHO) "================================================="
fd16c54261b3 Initial load
duke
parents:
diff changeset
   243
	@$(ECHO) " "
16
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   244
	$(RM) -r $(OPENJDK_OUTPUTDIR)
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   245
	$(MKDIR) -p $(OPENJDK_OUTPUTDIR)
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   246
	($(CD) $(OPENJDK_BUILDDIR) && $(MAKE) \
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   247
	  OPENJDK=true \
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   248
	  ALT_JDK_DEVTOOLS_DIR=$(JDK_DEVTOOLS_DIR) \
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   249
	  ALT_OUTPUTDIR=$(OPENJDK_OUTPUTDIR) \
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   250
	  ALT_BINARY_PLUGS_PATH=$(OPENJDK_PLUGS) \
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   251
	  ALT_BOOTDIR=$(OPENJDK_BOOTDIR) \
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   252
	  ALT_JDK_IMPORT_PATH=$(OPENJDK_IMPORTJDK) \
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   253
		product_build )
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   254
	$(RM) $(OPENJDK_BUILD_BINARY_ZIP)
16
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   255
	( $(CD) $(OPENJDK_OUTPUTDIR)/j2sdk-image && \
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   256
	  $(ZIPEXE) -q -r $(OPENJDK_BUILD_BINARY_ZIP) .)
16
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   257
	$(RM) -r $(OPENJDK_OUTPUTDIR)
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   258
	@$(ECHO) " "
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   259
	@$(ECHO) "================================================="
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   260
	@$(ECHO) "Finished openjdk build"
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   261
	@$(ECHO) " Binary Bundle: $(OPENJDK_BUILD_BINARY_ZIP)"
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   262
	@$(ECHO) "================================================="
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   263
	@$(ECHO) " "
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   264
    
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   265
    endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   266
  endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   267
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   268
fd16c54261b3 Initial load
duke
parents:
diff changeset
   269
clobber::
fd16c54261b3 Initial load
duke
parents:
diff changeset
   270
	$(RM) -r $(OUTPUTDIR)/*
fd16c54261b3 Initial load
duke
parents:
diff changeset
   271
	$(RM) -r $(OUTPUTDIR)-debug/*
fd16c54261b3 Initial load
duke
parents:
diff changeset
   272
	$(RM) -r $(OUTPUTDIR)-fastdebug/*
fd16c54261b3 Initial load
duke
parents:
diff changeset
   273
	-($(RMDIR) -p $(OUTPUTDIR) > $(DEV_NULL) 2>&1; $(TRUE))
fd16c54261b3 Initial load
duke
parents:
diff changeset
   274
fd16c54261b3 Initial load
duke
parents:
diff changeset
   275
clean: clobber
fd16c54261b3 Initial load
duke
parents:
diff changeset
   276
fd16c54261b3 Initial load
duke
parents:
diff changeset
   277
all:: 
fd16c54261b3 Initial load
duke
parents:
diff changeset
   278
	@$(ECHO) Control build finished: `$(DATE) '+%y-%m-%d %H:%M'`
fd16c54261b3 Initial load
duke
parents:
diff changeset
   279
fd16c54261b3 Initial load
duke
parents:
diff changeset
   280
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
   281
# Quick jdk verification build
fd16c54261b3 Initial load
duke
parents:
diff changeset
   282
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
   283
jdk_only:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   284
	$(MAKE) SKIP_FASTDEBUG_BUILD=true BUILD_HOTSPOT=false all
fd16c54261b3 Initial load
duke
parents:
diff changeset
   285
fd16c54261b3 Initial load
duke
parents:
diff changeset
   286
fd16c54261b3 Initial load
duke
parents:
diff changeset
   287
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
   288
# Quick jdk verification fastdebug build
fd16c54261b3 Initial load
duke
parents:
diff changeset
   289
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
   290
jdk_fastdebug_only:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   291
	$(MAKE) DEBUG_NAME=fastdebug BUILD_HOTSPOT=false BUILD_DEPLOY=false \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   292
	    BUILD_INSTALL=false BUILD_SPONSORS=false generic_debug_build
fd16c54261b3 Initial load
duke
parents:
diff changeset
   293
fd16c54261b3 Initial load
duke
parents:
diff changeset
   294
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
   295
# Quick deploy verification fastdebug build
fd16c54261b3 Initial load
duke
parents:
diff changeset
   296
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
   297
deploy_fastdebug_only:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   298
	$(MAKE) \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   299
	    DEBUG_NAME=fastdebug \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   300
	    BUILD_HOTSPOT=false \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   301
	    BUILD_JDK=false \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   302
	    BUILD_LANGTOOLS=false \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   303
	    BUILD_CORBA=false \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   304
	    BUILD_JAXP=false \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   305
	    BUILD_JAXWS=false \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   306
	    BUILD_INSTALL=false \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   307
	    BUILD_SPONSORS=false \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   308
	    generic_debug_build
fd16c54261b3 Initial load
duke
parents:
diff changeset
   309
fd16c54261b3 Initial load
duke
parents:
diff changeset
   310
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
   311
# Product build (skip debug builds)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   312
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
   313
product_only:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   314
	$(MAKE) SKIP_FASTDEBUG_BUILD=true all
fd16c54261b3 Initial load
duke
parents:
diff changeset
   315
fd16c54261b3 Initial load
duke
parents:
diff changeset
   316
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
   317
# Check target
fd16c54261b3 Initial load
duke
parents:
diff changeset
   318
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
   319
fd16c54261b3 Initial load
duke
parents:
diff changeset
   320
check: variable_check
fd16c54261b3 Initial load
duke
parents:
diff changeset
   321
fd16c54261b3 Initial load
duke
parents:
diff changeset
   322
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
   323
# Help target
fd16c54261b3 Initial load
duke
parents:
diff changeset
   324
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
   325
help: intro_help target_help variable_help notes_help examples_help
fd16c54261b3 Initial load
duke
parents:
diff changeset
   326
fd16c54261b3 Initial load
duke
parents:
diff changeset
   327
# Intro help message
fd16c54261b3 Initial load
duke
parents:
diff changeset
   328
intro_help:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   329
	@$(ECHO) "\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   330
Makefile for the JDK builds (all the JDK). \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   331
"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   332
fd16c54261b3 Initial load
duke
parents:
diff changeset
   333
# Target help
fd16c54261b3 Initial load
duke
parents:
diff changeset
   334
target_help:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   335
	@$(ECHO) "\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   336
--- Common Targets ---  \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   337
all               -- build the core JDK (default target) \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   338
help              -- Print out help information \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   339
check             -- Check make variable values for correctness \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   340
sanity            -- Perform detailed sanity checks on system and settings \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   341
fastdebug_build   -- build the core JDK in 'fastdebug' mode (-g -O) \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   342
debug_build       -- build the core JDK in 'debug' mode (-g) \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   343
clean             -- remove all built and imported files \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   344
clobber           -- same as clean \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   345
"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   346
fd16c54261b3 Initial load
duke
parents:
diff changeset
   347
# Variable help (only common ones used by this Makefile)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   348
variable_help: variable_help_intro variable_list variable_help_end
fd16c54261b3 Initial load
duke
parents:
diff changeset
   349
variable_help_intro:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   350
	@$(ECHO) "--- Common Variables ---"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   351
variable_help_end:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   352
	@$(ECHO) " "
fd16c54261b3 Initial load
duke
parents:
diff changeset
   353
fd16c54261b3 Initial load
duke
parents:
diff changeset
   354
# One line descriptions for the variables
fd16c54261b3 Initial load
duke
parents:
diff changeset
   355
OUTPUTDIR.desc             = Output directory
fd16c54261b3 Initial load
duke
parents:
diff changeset
   356
PARALLEL_COMPILE_JOBS.desc = Solaris/Linux parallel compile run count
fd16c54261b3 Initial load
duke
parents:
diff changeset
   357
SLASH_JAVA.desc            = Root of all build tools, e.g. /java or J:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   358
BOOTDIR.desc               = JDK used to boot the build
fd16c54261b3 Initial load
duke
parents:
diff changeset
   359
JDK_IMPORT_PATH.desc       = JDK used to import components of the build
fd16c54261b3 Initial load
duke
parents:
diff changeset
   360
COMPILER_PATH.desc         = Compiler install directory
fd16c54261b3 Initial load
duke
parents:
diff changeset
   361
CACERTS_FILE.desc          = Location of certificates file
fd16c54261b3 Initial load
duke
parents:
diff changeset
   362
DEVTOOLS_PATH.desc         = Directory containing zip and gnumake
fd16c54261b3 Initial load
duke
parents:
diff changeset
   363
CUPS_HEADERS_PATH.desc     = Include directory location for CUPS header files
fd16c54261b3 Initial load
duke
parents:
diff changeset
   364
DXSDK_PATH.desc            = Root directory of DirectX SDK
fd16c54261b3 Initial load
duke
parents:
diff changeset
   365
MSDEVTOOLS_PATH.desc       = Root directory of VC++ tools (e.g. rc.exe)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   366
MSVCRT_DLL_PATH.desc       = Directory containing mscvrt.dll
fd16c54261b3 Initial load
duke
parents:
diff changeset
   367
fd16c54261b3 Initial load
duke
parents:
diff changeset
   368
# Make variables to print out (description and value)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   369
VARIABLE_PRINTVAL_LIST +=       \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   370
    OUTPUTDIR                   \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   371
    PARALLEL_COMPILE_JOBS       \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   372
    SLASH_JAVA                  \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   373
    BOOTDIR                     \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   374
    JDK_IMPORT_PATH             \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   375
    COMPILER_PATH               \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   376
    CACERTS_FILE                \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   377
    DEVTOOLS_PATH
fd16c54261b3 Initial load
duke
parents:
diff changeset
   378
fd16c54261b3 Initial load
duke
parents:
diff changeset
   379
# Make variables that should refer to directories that exist
fd16c54261b3 Initial load
duke
parents:
diff changeset
   380
VARIABLE_CHECKDIR_LIST +=       \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   381
    SLASH_JAVA                  \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   382
    BOOTDIR                     \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   383
    JDK_IMPORT_PATH             \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   384
    COMPILER_PATH               \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   385
    DEVTOOLS_PATH 
fd16c54261b3 Initial load
duke
parents:
diff changeset
   386
fd16c54261b3 Initial load
duke
parents:
diff changeset
   387
# Make variables that should refer to files that exist
fd16c54261b3 Initial load
duke
parents:
diff changeset
   388
VARIABLE_CHECKFIL_LIST +=       \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   389
    CACERTS_FILE
fd16c54261b3 Initial load
duke
parents:
diff changeset
   390
fd16c54261b3 Initial load
duke
parents:
diff changeset
   391
# Some are windows specific
fd16c54261b3 Initial load
duke
parents:
diff changeset
   392
ifeq ($(PLATFORM), windows)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   393
fd16c54261b3 Initial load
duke
parents:
diff changeset
   394
VARIABLE_PRINTVAL_LIST +=       \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   395
    DXSDK_PATH                  \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   396
    MSDEVTOOLS_PATH             \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   397
    MSVCRT_DLL_PATH
fd16c54261b3 Initial load
duke
parents:
diff changeset
   398
fd16c54261b3 Initial load
duke
parents:
diff changeset
   399
VARIABLE_CHECKDIR_LIST +=       \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   400
    DXSDK_PATH                  \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   401
    MSDEVTOOLS_PATH             \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   402
    MSVCRT_DLL_PATH
fd16c54261b3 Initial load
duke
parents:
diff changeset
   403
fd16c54261b3 Initial load
duke
parents:
diff changeset
   404
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   405
fd16c54261b3 Initial load
duke
parents:
diff changeset
   406
# For pattern rules below, so all are treated the same
fd16c54261b3 Initial load
duke
parents:
diff changeset
   407
DO_PRINTVAL_LIST=$(VARIABLE_PRINTVAL_LIST:%=%.printval)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   408
DO_CHECKDIR_LIST=$(VARIABLE_CHECKDIR_LIST:%=%.checkdir)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   409
DO_CHECKFIL_LIST=$(VARIABLE_CHECKFIL_LIST:%=%.checkfil)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   410
fd16c54261b3 Initial load
duke
parents:
diff changeset
   411
# Complete variable check
fd16c54261b3 Initial load
duke
parents:
diff changeset
   412
variable_check: $(DO_CHECKDIR_LIST) $(DO_CHECKFIL_LIST)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   413
variable_list: $(DO_PRINTVAL_LIST) variable_check
fd16c54261b3 Initial load
duke
parents:
diff changeset
   414
fd16c54261b3 Initial load
duke
parents:
diff changeset
   415
# Pattern rule for printing out a variable
fd16c54261b3 Initial load
duke
parents:
diff changeset
   416
%.printval:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   417
	@$(ECHO) "  ALT_$* - $($*.desc)"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   418
	@$(ECHO) "  \t $*=$($*)"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   419
fd16c54261b3 Initial load
duke
parents:
diff changeset
   420
# Pattern rule for checking to see if a variable with a directory exists
fd16c54261b3 Initial load
duke
parents:
diff changeset
   421
%.checkdir:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   422
	@if [ ! -d $($*) ] ; then \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   423
	    $(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   424
	fi
fd16c54261b3 Initial load
duke
parents:
diff changeset
   425
fd16c54261b3 Initial load
duke
parents:
diff changeset
   426
# Pattern rule for checking to see if a variable with a file exists
fd16c54261b3 Initial load
duke
parents:
diff changeset
   427
%.checkfil:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   428
	@if [ ! -f $($*) ] ; then \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   429
	    $(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   430
	fi
fd16c54261b3 Initial load
duke
parents:
diff changeset
   431
fd16c54261b3 Initial load
duke
parents:
diff changeset
   432
# Misc notes on help
fd16c54261b3 Initial load
duke
parents:
diff changeset
   433
notes_help:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   434
	@$(ECHO) "\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   435
--- Notes --- \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   436
- All builds use same output directory unless overridden with \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   437
 \t ALT_OUTPUTDIR=<dir>, changing from product to fastdebug you may want \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   438
 \t to use the clean target first. \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   439
- JDK_IMPORT_PATH must refer to a compatible build, not all past promoted \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   440
 \t builds or previous release JDK builds will work. \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   441
- The fastest builds have been when the sources and the BOOTDIR are on \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   442
 \t local disk. \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   443
"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   444
fd16c54261b3 Initial load
duke
parents:
diff changeset
   445
examples_help:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   446
	@$(ECHO) "\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   447
--- Examples --- \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   448
  $(MAKE) fastdebug_build \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   449
  $(MAKE) ALT_OUTPUTDIR=/tmp/foobar all \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   450
  $(MAKE) ALT_OUTPUTDIR=/tmp/foobar fastdebug_build \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   451
  $(MAKE) ALT_OUTPUTDIR=/tmp/foobar all \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   452
  $(MAKE) ALT_BOOTDIR=/opt/java/jdk1.5.0 \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   453
  $(MAKE) ALT_JDK_IMPORT_PATH=/opt/java/jdk1.6.0 \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   454
"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   455
fd16c54261b3 Initial load
duke
parents:
diff changeset
   456
################################################################
fd16c54261b3 Initial load
duke
parents:
diff changeset
   457
# Source and binary plug bundling
fd16c54261b3 Initial load
duke
parents:
diff changeset
   458
################################################################
fd16c54261b3 Initial load
duke
parents:
diff changeset
   459
ifeq ($(BUNDLE_RULES_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   460
  include $(BUNDLE_RULES)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   461
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   462
fd16c54261b3 Initial load
duke
parents:
diff changeset
   463
################################################################
fd16c54261b3 Initial load
duke
parents:
diff changeset
   464
# Cycle build. Build the jdk, use it to build the jdk again.
fd16c54261b3 Initial load
duke
parents:
diff changeset
   465
################################################################
fd16c54261b3 Initial load
duke
parents:
diff changeset
   466
  
16
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   467
ABS_BOOTDIR_OUTPUTDIR=$(ABS_OUTPUTDIR)/bootjdk
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   468
  
fd16c54261b3 Initial load
duke
parents:
diff changeset
   469
boot_cycle:
16
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   470
	$(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) product_build
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   471
	$(MAKE) ALT_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/j2sdk-image product_build
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   472
fd16c54261b3 Initial load
duke
parents:
diff changeset
   473
################################################################
fd16c54261b3 Initial load
duke
parents:
diff changeset
   474
# JPRT rule to build
fd16c54261b3 Initial load
duke
parents:
diff changeset
   475
################################################################
fd16c54261b3 Initial load
duke
parents:
diff changeset
   476
fd16c54261b3 Initial load
duke
parents:
diff changeset
   477
include ./make/jprt.gmk
fd16c54261b3 Initial load
duke
parents:
diff changeset
   478
fd16c54261b3 Initial load
duke
parents:
diff changeset
   479
################################################################
fd16c54261b3 Initial load
duke
parents:
diff changeset
   480
#  PHONY
fd16c54261b3 Initial load
duke
parents:
diff changeset
   481
################################################################
fd16c54261b3 Initial load
duke
parents:
diff changeset
   482
fd16c54261b3 Initial load
duke
parents:
diff changeset
   483
.PHONY: all build what clobber insane \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   484
	fastdebug_build debug_build product_build setup \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   485
        dev dev-build dev-sanity dev-clobber
fd16c54261b3 Initial load
duke
parents:
diff changeset
   486
17
bb9f330cd95a 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 16
diff changeset
   487
# Force target
bb9f330cd95a 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 16
diff changeset
   488
FRC:
bb9f330cd95a 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 16
diff changeset
   489