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