Makefile
author igor
Wed, 08 Dec 2010 00:35:33 -0800
changeset 7310 4a42e58ee6c3
parent 6623 b2e02fea81b0
child 7649 b63dcad65b80
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
     1
#
5743
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
     2
# Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
0
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
5499
eb0b3e373167 6943119: Rebrand source copyright notices
ohair
parents: 4309
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
5499
eb0b3e373167 6943119: Rebrand source copyright notices
ohair
parents: 4309
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
0
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
#
5499
eb0b3e373167 6943119: Rebrand source copyright notices
ohair
parents: 4309
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
eb0b3e373167 6943119: Rebrand source copyright notices
ohair
parents: 4309
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
eb0b3e373167 6943119: Rebrand source copyright notices
ohair
parents: 4309
diff changeset
    23
# questions.
0
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
16
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
    32
# 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
    33
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
    34
OPENJDK_BUILDDIR:=$(shell \
20
41658053480c 6623832: Cleanup old j2se makefile targets
ohair
parents: 17
diff changeset
    35
  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
    36
    echo "$(OPENJDK_SOURCETREE)"; \
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
    37
  else \
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
    38
    echo "."; \
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
    39
  fi)
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
    40
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
    41
ifndef JDK_TOPDIR
fd16c54261b3 Initial load
duke
parents:
diff changeset
    42
  JDK_TOPDIR=$(TOPDIR)/jdk
fd16c54261b3 Initial load
duke
parents:
diff changeset
    43
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
    44
ifndef JDK_MAKE_SHARED_DIR
fd16c54261b3 Initial load
duke
parents:
diff changeset
    45
  JDK_MAKE_SHARED_DIR=$(JDK_TOPDIR)/make/common/shared
fd16c54261b3 Initial load
duke
parents:
diff changeset
    46
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
    47
874
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    48
# For start and finish echo lines
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    49
TITLE_TEXT = Control $(PLATFORM) $(ARCH) $(RELEASE)
4309
39ca605f0647 6727046: Add message when docs are skipped in control build
ohair
parents: 2099
diff changeset
    50
DATE_STAMP = `$(DATE) '+%y-%m-%d %H:%M'`
874
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    51
START_ECHO  = echo "$(TITLE_TEXT) $@ build started: $(DATE_STAMP)"
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    52
FINISH_ECHO = echo "$(TITLE_TEXT) $@ build finished: $(DATE_STAMP)"
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
    53
874
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    54
default: all
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
    55
874
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    56
include $(JDK_MAKE_SHARED_DIR)/Defs-control.gmk
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    57
include ./make/Defs-internal.gmk
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    58
include ./make/sanity-rules.gmk
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
    59
include ./make/hotspot-rules.gmk
fd16c54261b3 Initial load
duke
parents:
diff changeset
    60
include ./make/langtools-rules.gmk
fd16c54261b3 Initial load
duke
parents:
diff changeset
    61
include ./make/corba-rules.gmk
fd16c54261b3 Initial load
duke
parents:
diff changeset
    62
include ./make/jaxp-rules.gmk
fd16c54261b3 Initial load
duke
parents:
diff changeset
    63
include ./make/jaxws-rules.gmk
fd16c54261b3 Initial load
duke
parents:
diff changeset
    64
include ./make/jdk-rules.gmk
fd16c54261b3 Initial load
duke
parents:
diff changeset
    65
include ./make/install-rules.gmk
fd16c54261b3 Initial load
duke
parents:
diff changeset
    66
include ./make/sponsors-rules.gmk
fd16c54261b3 Initial load
duke
parents:
diff changeset
    67
include ./make/deploy-rules.gmk
fd16c54261b3 Initial load
duke
parents:
diff changeset
    68
874
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    69
# What "all" means
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    70
all::
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    71
	@$(START_ECHO)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    72
948
5d6b06900843 6737659: debug bundles are empty
ohair
parents: 874
diff changeset
    73
all:: openjdk_check sanity
874
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    74
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    75
ifeq ($(SKIP_FASTDEBUG_BUILD), false)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    76
  all:: fastdebug_build
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    77
endif
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    78
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    79
ifeq ($(SKIP_DEBUG_BUILD), false)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    80
  all:: debug_build
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    81
endif
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    82
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    83
ifneq ($(SKIP_OPENJDK_BUILD), true)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    84
  all:: openjdk_build
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    85
endif
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    86
948
5d6b06900843 6737659: debug bundles are empty
ohair
parents: 874
diff changeset
    87
all:: all_product_build 
5d6b06900843 6737659: debug bundles are empty
ohair
parents: 874
diff changeset
    88
874
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    89
all:: 
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    90
	@$(FINISH_ECHO)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    91
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    92
# Everything for a full product build
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    93
all_product_build::
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    94
	@$(START_ECHO)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    95
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    96
ifeq ($(SKIP_PRODUCT_BUILD), false)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    97
  
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    98
  all_product_build:: product_build
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    99
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   100
  ifeq ($(BUILD_INSTALL), true)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   101
    all_product_build:: $(INSTALL)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   102
    clobber:: install-clobber
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   103
  endif
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   104
  
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   105
  ifeq ($(BUILD_SPONSORS), true)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   106
    all_product_build:: $(SPONSORS)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   107
    clobber:: sponsors-clobber
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   108
  endif
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   109
  
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   110
  ifneq ($(SKIP_COMPARE_IMAGES), true)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   111
    all_product_build:: compare-image
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   112
  endif
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   113
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   114
endif
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   115
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   116
all_product_build:: 
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   117
	@$(FINISH_ECHO)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   118
5743
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   119
# Generic build of basic repo series
874
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   120
generic_build_repo_series::
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   121
	$(MKDIR) -p $(OUTPUTDIR)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   122
	$(MKDIR) -p $(OUTPUTDIR)/j2sdk-image
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   123
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   124
ifeq ($(BUILD_LANGTOOLS), true)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   125
  generic_build_repo_series:: langtools
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   126
  clobber:: langtools-clobber
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   127
endif
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   128
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   129
ifeq ($(BUILD_CORBA), true)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   130
  generic_build_repo_series:: corba
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   131
  clobber:: corba-clobber
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   132
endif
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   133
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   134
ifeq ($(BUILD_JAXP), true)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   135
  generic_build_repo_series:: jaxp
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   136
  clobber:: jaxp-clobber
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   137
endif
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   138
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   139
ifeq ($(BUILD_JAXWS), true)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   140
  generic_build_repo_series:: jaxws
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   141
  clobber:: jaxws-clobber
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   142
endif
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   143
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   144
ifeq ($(BUILD_HOTSPOT), true)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   145
  generic_build_repo_series:: $(HOTSPOT) 
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   146
  clobber:: hotspot-clobber
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   147
endif
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   148
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   149
ifeq ($(BUILD_JDK), true)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   150
  generic_build_repo_series:: $(JDK_JAVA_EXE)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   151
  clobber:: jdk-clobber
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   152
endif
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   153
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   154
ifeq ($(BUILD_DEPLOY), true)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   155
  generic_build_repo_series:: $(DEPLOY)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   156
  clobber:: deploy-clobber
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   157
endif
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   158
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   159
ifeq ($(BUILD_JDK), true)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   160
  ifeq ($(BUNDLE_RULES_AVAILABLE), true)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   161
    generic_build_repo_series:: openjdk-binary-plugs-bundles
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   162
  endif
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   163
endif
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   164
874
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   165
# The debug build, fastdebug or debug. Needs special handling.
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   166
#  Note that debug builds do NOT do INSTALL steps, but must be done
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   167
#  after the product build and before the INSTALL step of the product build.
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   168
#
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   169
#   DEBUG_NAME is fastdebug or debug
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   170
#   ALT_OUTPUTDIR is changed to have -debug or -fastdebug suffix
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   171
#   The resulting j2sdk-image is used by the install makefiles to create a
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   172
#     debug install bundle jdk-*-debug-** bundle (tar or zip) 
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   173
#     which will install in the debug or fastdebug subdirectory of the
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   174
#     normal product install area.
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   175
#     The install process needs to know what the DEBUG_NAME is, so
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   176
#     look for INSTALL_DEBUG_NAME in the install rules.
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   177
#
5743
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   178
#   NOTE: On windows, do not use $(ABS_BOOTDIR_OUTPUTDIR)-$(DEBUG_NAME).
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   179
#         Due to the use of short paths in $(ABS_OUTPUTDIR), this may 
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   180
#         not be the same location.
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   181
#
874
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   182
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   183
# Location of fresh bootdir output
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   184
ABS_BOOTDIR_OUTPUTDIR=$(ABS_OUTPUTDIR)/bootjdk
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   185
FRESH_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/j2sdk-image
5743
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   186
FRESH_DEBUG_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/../$(PLATFORM)-$(ARCH)-$(DEBUG_NAME)/j2sdk-image
874
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   187
  
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   188
create_fresh_product_bootdir: FRC
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   189
	@$(START_ECHO)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   190
	$(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) \
4309
39ca605f0647 6727046: Add message when docs are skipped in control build
ohair
parents: 2099
diff changeset
   191
		GENERATE_DOCS=false \
874
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   192
		BOOT_CYCLE_SETTINGS= \
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   193
		build_product_image
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   194
	@$(FINISH_ECHO)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   195
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   196
create_fresh_debug_bootdir: FRC
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   197
	@$(START_ECHO)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   198
	$(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) \
4309
39ca605f0647 6727046: Add message when docs are skipped in control build
ohair
parents: 2099
diff changeset
   199
		GENERATE_DOCS=false \
874
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   200
		BOOT_CYCLE_DEBUG_SETTINGS= \
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   201
		build_debug_image
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   202
	@$(FINISH_ECHO)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   203
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   204
create_fresh_fastdebug_bootdir: FRC
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   205
	@$(START_ECHO)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   206
	$(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) \
4309
39ca605f0647 6727046: Add message when docs are skipped in control build
ohair
parents: 2099
diff changeset
   207
		GENERATE_DOCS=false \
874
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   208
		BOOT_CYCLE_DEBUG_SETTINGS= \
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   209
		build_fastdebug_image
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   210
	@$(FINISH_ECHO)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   211
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   212
# Create boot image?
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   213
ifeq ($(SKIP_BOOT_CYCLE),false)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   214
  ifneq ($(PLATFORM)$(ARCH_DATA_MODEL),solaris64)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   215
    DO_BOOT_CYCLE=true
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   216
  endif
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   217
endif
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   218
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   219
ifeq ($(DO_BOOT_CYCLE),true)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   220
  
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   221
  # Create the bootdir to use in the build
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   222
  product_build:: create_fresh_product_bootdir
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   223
  debug_build:: create_fresh_debug_bootdir
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   224
  fastdebug_build:: create_fresh_fastdebug_bootdir
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   225
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   226
  # Define variables to be used now for the boot jdk
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   227
  BOOT_CYCLE_SETTINGS= \
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   228
     ALT_BOOTDIR=$(FRESH_BOOTDIR) \
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   229
     ALT_JDK_IMPORT_PATH=$(FRESH_BOOTDIR)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   230
  BOOT_CYCLE_DEBUG_SETTINGS= \
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   231
     ALT_BOOTDIR=$(FRESH_DEBUG_BOOTDIR) \
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   232
     ALT_JDK_IMPORT_PATH=$(FRESH_DEBUG_BOOTDIR)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   233
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   234
else
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   235
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   236
  # Use the supplied ALT_BOOTDIR as the boot
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   237
  BOOT_CYCLE_SETTINGS=
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   238
  BOOT_CYCLE_DEBUG_SETTINGS=
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   239
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   240
endif
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   241
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   242
build_product_image:
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   243
	@$(START_ECHO)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   244
	$(MAKE) \
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   245
	        SKIP_FASTDEBUG_BUILD=true \
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   246
	        SKIP_DEBUG_BUILD=true \
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   247
	        $(BOOT_CYCLE_SETTINGS) \
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   248
	        generic_build_repo_series
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   249
	@$(FINISH_ECHO)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   250
5743
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   251
#   NOTE: On windows, do not use $(ABS_OUTPUTDIR)-$(DEBUG_NAME).
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   252
#         Due to the use of short paths in $(ABS_OUTPUTDIR), this may 
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   253
#         not be the same location.
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   254
874
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   255
generic_debug_build:
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   256
	@$(START_ECHO)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   257
	$(MAKE) \
5743
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   258
		ALT_OUTPUTDIR=$(ABS_OUTPUTDIR)/../$(PLATFORM)-$(ARCH)-$(DEBUG_NAME) \
874
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   259
	        DEBUG_NAME=$(DEBUG_NAME) \
4309
39ca605f0647 6727046: Add message when docs are skipped in control build
ohair
parents: 2099
diff changeset
   260
		GENERATE_DOCS=false \
874
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   261
	        $(BOOT_CYCLE_DEBUG_SETTINGS) \
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   262
		generic_build_repo_series
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   263
	@$(FINISH_ECHO)
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   264
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   265
build_debug_image:
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   266
	$(MAKE) DEBUG_NAME=debug generic_debug_build
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   267
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   268
build_fastdebug_image:
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   269
	$(MAKE) DEBUG_NAME=fastdebug generic_debug_build
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   270
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   271
# Build final image
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   272
product_build:: build_product_image
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   273
debug_build:: build_debug_image
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   274
fastdebug_build:: build_fastdebug_image
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   275
16
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   276
# 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
   277
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
   278
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
   279
	@$(ECHO) " "
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   280
	@$(ECHO) "================================================="
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   281
	@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
   282
	    $(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
   283
	    exit 1; \
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   284
	else \
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   285
	    $(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
   286
	    $(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
   287
	fi
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   288
	@$(ECHO) "================================================="
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   289
	@$(ECHO) " "
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   290
endif
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   291
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   292
# 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
   293
#   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
   294
# 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
   295
#   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
   296
#   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
   297
#   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
   298
#   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
   299
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   300
ifneq ($(SKIP_OPENJDK_BUILD), true)
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   301
  ifeq ($(BUILD_JDK), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   302
    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
   303
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   304
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
   305
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
   306
OPENJDK_BUILD_NAME \
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   307
  = 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
   308
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
   309
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
   310
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
   311
  OPENJDK_BOOTDIR=$(BOOTDIR)
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   312
  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
   313
else
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   314
  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
   315
  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
   316
endif
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   317
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   318
openjdk_build:
874
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   319
	@$(START_ECHO)
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   320
	@$(ECHO) " "
fd16c54261b3 Initial load
duke
parents:
diff changeset
   321
	@$(ECHO) "================================================="
fd16c54261b3 Initial load
duke
parents:
diff changeset
   322
	@$(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
   323
	@$(ECHO) " Using: ALT_JDK_DEVTOOLS_DIR=$(JDK_DEVTOOLS_DIR)"
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   324
	@$(ECHO) "================================================="
fd16c54261b3 Initial load
duke
parents:
diff changeset
   325
	@$(ECHO) " "
16
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   326
	$(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
   327
	$(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
   328
	($(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
   329
	  OPENJDK=true \
4309
39ca605f0647 6727046: Add message when docs are skipped in control build
ohair
parents: 2099
diff changeset
   330
	  GENERATE_DOCS=false \
16
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   331
	  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
   332
	  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
   333
	  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
   334
	  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
   335
	  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
   336
		product_build )
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   337
	$(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
   338
	( $(CD) $(OPENJDK_OUTPUTDIR)/j2sdk-image && \
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   339
	  $(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
   340
	$(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
   341
	@$(ECHO) " "
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   342
	@$(ECHO) "================================================="
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   343
	@$(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
   344
	@$(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
   345
	@$(ECHO) "================================================="
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   346
	@$(ECHO) " "
874
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   347
	@$(FINISH_ECHO)
16
13adabd0ff72 6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents: 0
diff changeset
   348
    
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   349
    endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   350
  endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   351
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   352
fd16c54261b3 Initial load
duke
parents:
diff changeset
   353
clobber::
fd16c54261b3 Initial load
duke
parents:
diff changeset
   354
	$(RM) -r $(OUTPUTDIR)/*
5743
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   355
	$(RM) -r $(OUTPUTDIR)/../$(PLATFORM)-$(ARCH)-debug/*
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   356
	$(RM) -r $(OUTPUTDIR)/../$(PLATFORM)-$(ARCH)-fastdebug/*
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   357
	-($(RMDIR) -p $(OUTPUTDIR) > $(DEV_NULL) 2>&1; $(TRUE))
fd16c54261b3 Initial load
duke
parents:
diff changeset
   358
fd16c54261b3 Initial load
duke
parents:
diff changeset
   359
clean: clobber
fd16c54261b3 Initial load
duke
parents:
diff changeset
   360
874
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   361
#
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   362
# Dev builds
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   363
#
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   364
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   365
dev : dev-build
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   366
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   367
dev-build:
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   368
	$(MAKE) DEV_ONLY=true all
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   369
dev-sanity:
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   370
	$(MAKE) DEV_ONLY=true sanity
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   371
dev-clobber:
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   372
	$(MAKE) DEV_ONLY=true clobber
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   373
fd16c54261b3 Initial load
duke
parents:
diff changeset
   374
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
   375
# Quick jdk verification build
fd16c54261b3 Initial load
duke
parents:
diff changeset
   376
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
   377
jdk_only:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   378
	$(MAKE) SKIP_FASTDEBUG_BUILD=true BUILD_HOTSPOT=false all
fd16c54261b3 Initial load
duke
parents:
diff changeset
   379
fd16c54261b3 Initial load
duke
parents:
diff changeset
   380
fd16c54261b3 Initial load
duke
parents:
diff changeset
   381
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
   382
# Quick jdk verification fastdebug build
fd16c54261b3 Initial load
duke
parents:
diff changeset
   383
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
   384
jdk_fastdebug_only:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   385
	$(MAKE) DEBUG_NAME=fastdebug BUILD_HOTSPOT=false BUILD_DEPLOY=false \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   386
	    BUILD_INSTALL=false BUILD_SPONSORS=false generic_debug_build
fd16c54261b3 Initial load
duke
parents:
diff changeset
   387
fd16c54261b3 Initial load
duke
parents:
diff changeset
   388
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
   389
# Quick deploy verification fastdebug build
fd16c54261b3 Initial load
duke
parents:
diff changeset
   390
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
   391
deploy_fastdebug_only:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   392
	$(MAKE) \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   393
	    DEBUG_NAME=fastdebug \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   394
	    BUILD_HOTSPOT=false \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   395
	    BUILD_JDK=false \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   396
	    BUILD_LANGTOOLS=false \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   397
	    BUILD_CORBA=false \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   398
	    BUILD_JAXP=false \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   399
	    BUILD_JAXWS=false \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   400
	    BUILD_INSTALL=false \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   401
	    BUILD_SPONSORS=false \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   402
	    generic_debug_build
fd16c54261b3 Initial load
duke
parents:
diff changeset
   403
fd16c54261b3 Initial load
duke
parents:
diff changeset
   404
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
   405
# Product build (skip debug builds)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   406
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
   407
product_only:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   408
	$(MAKE) SKIP_FASTDEBUG_BUILD=true all
fd16c54261b3 Initial load
duke
parents:
diff changeset
   409
fd16c54261b3 Initial load
duke
parents:
diff changeset
   410
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
   411
# Check target
fd16c54261b3 Initial load
duke
parents:
diff changeset
   412
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
   413
fd16c54261b3 Initial load
duke
parents:
diff changeset
   414
check: variable_check
fd16c54261b3 Initial load
duke
parents:
diff changeset
   415
fd16c54261b3 Initial load
duke
parents:
diff changeset
   416
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
   417
# Help target
fd16c54261b3 Initial load
duke
parents:
diff changeset
   418
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
   419
help: intro_help target_help variable_help notes_help examples_help
fd16c54261b3 Initial load
duke
parents:
diff changeset
   420
fd16c54261b3 Initial load
duke
parents:
diff changeset
   421
# Intro help message
fd16c54261b3 Initial load
duke
parents:
diff changeset
   422
intro_help:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   423
	@$(ECHO) "\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   424
Makefile for the JDK builds (all the JDK). \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   425
"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   426
fd16c54261b3 Initial load
duke
parents:
diff changeset
   427
# Target help
fd16c54261b3 Initial load
duke
parents:
diff changeset
   428
target_help:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   429
	@$(ECHO) "\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   430
--- Common Targets ---  \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   431
all               -- build the core JDK (default target) \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   432
help              -- Print out help information \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   433
check             -- Check make variable values for correctness \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   434
sanity            -- Perform detailed sanity checks on system and settings \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   435
fastdebug_build   -- build the core JDK in 'fastdebug' mode (-g -O) \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   436
debug_build       -- build the core JDK in 'debug' mode (-g) \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   437
clean             -- remove all built and imported files \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   438
clobber           -- same as clean \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   439
"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   440
fd16c54261b3 Initial load
duke
parents:
diff changeset
   441
# Variable help (only common ones used by this Makefile)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   442
variable_help: variable_help_intro variable_list variable_help_end
fd16c54261b3 Initial load
duke
parents:
diff changeset
   443
variable_help_intro:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   444
	@$(ECHO) "--- Common Variables ---"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   445
variable_help_end:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   446
	@$(ECHO) " "
fd16c54261b3 Initial load
duke
parents:
diff changeset
   447
fd16c54261b3 Initial load
duke
parents:
diff changeset
   448
# One line descriptions for the variables
fd16c54261b3 Initial load
duke
parents:
diff changeset
   449
OUTPUTDIR.desc             = Output directory
fd16c54261b3 Initial load
duke
parents:
diff changeset
   450
PARALLEL_COMPILE_JOBS.desc = Solaris/Linux parallel compile run count
fd16c54261b3 Initial load
duke
parents:
diff changeset
   451
SLASH_JAVA.desc            = Root of all build tools, e.g. /java or J:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   452
BOOTDIR.desc               = JDK used to boot the build
fd16c54261b3 Initial load
duke
parents:
diff changeset
   453
JDK_IMPORT_PATH.desc       = JDK used to import components of the build
fd16c54261b3 Initial load
duke
parents:
diff changeset
   454
COMPILER_PATH.desc         = Compiler install directory
fd16c54261b3 Initial load
duke
parents:
diff changeset
   455
CACERTS_FILE.desc          = Location of certificates file
fd16c54261b3 Initial load
duke
parents:
diff changeset
   456
DEVTOOLS_PATH.desc         = Directory containing zip and gnumake
fd16c54261b3 Initial load
duke
parents:
diff changeset
   457
CUPS_HEADERS_PATH.desc     = Include directory location for CUPS header files
fd16c54261b3 Initial load
duke
parents:
diff changeset
   458
DXSDK_PATH.desc            = Root directory of DirectX SDK
fd16c54261b3 Initial load
duke
parents:
diff changeset
   459
MSDEVTOOLS_PATH.desc       = Root directory of VC++ tools (e.g. rc.exe)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   460
MSVCRT_DLL_PATH.desc       = Directory containing mscvrt.dll
fd16c54261b3 Initial load
duke
parents:
diff changeset
   461
fd16c54261b3 Initial load
duke
parents:
diff changeset
   462
# Make variables to print out (description and value)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   463
VARIABLE_PRINTVAL_LIST +=       \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   464
    OUTPUTDIR                   \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   465
    PARALLEL_COMPILE_JOBS       \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   466
    SLASH_JAVA                  \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   467
    BOOTDIR                     \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   468
    JDK_IMPORT_PATH             \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   469
    COMPILER_PATH               \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   470
    CACERTS_FILE                \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   471
    DEVTOOLS_PATH
fd16c54261b3 Initial load
duke
parents:
diff changeset
   472
fd16c54261b3 Initial load
duke
parents:
diff changeset
   473
# Make variables that should refer to directories that exist
fd16c54261b3 Initial load
duke
parents:
diff changeset
   474
VARIABLE_CHECKDIR_LIST +=       \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   475
    SLASH_JAVA                  \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   476
    BOOTDIR                     \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   477
    JDK_IMPORT_PATH             \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   478
    COMPILER_PATH               \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   479
    DEVTOOLS_PATH 
fd16c54261b3 Initial load
duke
parents:
diff changeset
   480
fd16c54261b3 Initial load
duke
parents:
diff changeset
   481
# Make variables that should refer to files that exist
fd16c54261b3 Initial load
duke
parents:
diff changeset
   482
VARIABLE_CHECKFIL_LIST +=       \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   483
    CACERTS_FILE
fd16c54261b3 Initial load
duke
parents:
diff changeset
   484
fd16c54261b3 Initial load
duke
parents:
diff changeset
   485
# Some are windows specific
fd16c54261b3 Initial load
duke
parents:
diff changeset
   486
ifeq ($(PLATFORM), windows)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   487
fd16c54261b3 Initial load
duke
parents:
diff changeset
   488
VARIABLE_PRINTVAL_LIST +=       \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   489
    DXSDK_PATH                  \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   490
    MSDEVTOOLS_PATH             \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   491
    MSVCRT_DLL_PATH
fd16c54261b3 Initial load
duke
parents:
diff changeset
   492
fd16c54261b3 Initial load
duke
parents:
diff changeset
   493
VARIABLE_CHECKDIR_LIST +=       \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   494
    DXSDK_PATH                  \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   495
    MSDEVTOOLS_PATH             \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   496
    MSVCRT_DLL_PATH
fd16c54261b3 Initial load
duke
parents:
diff changeset
   497
fd16c54261b3 Initial load
duke
parents:
diff changeset
   498
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   499
fd16c54261b3 Initial load
duke
parents:
diff changeset
   500
# For pattern rules below, so all are treated the same
fd16c54261b3 Initial load
duke
parents:
diff changeset
   501
DO_PRINTVAL_LIST=$(VARIABLE_PRINTVAL_LIST:%=%.printval)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   502
DO_CHECKDIR_LIST=$(VARIABLE_CHECKDIR_LIST:%=%.checkdir)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   503
DO_CHECKFIL_LIST=$(VARIABLE_CHECKFIL_LIST:%=%.checkfil)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   504
fd16c54261b3 Initial load
duke
parents:
diff changeset
   505
# Complete variable check
fd16c54261b3 Initial load
duke
parents:
diff changeset
   506
variable_check: $(DO_CHECKDIR_LIST) $(DO_CHECKFIL_LIST)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   507
variable_list: $(DO_PRINTVAL_LIST) variable_check
fd16c54261b3 Initial load
duke
parents:
diff changeset
   508
fd16c54261b3 Initial load
duke
parents:
diff changeset
   509
# Pattern rule for printing out a variable
fd16c54261b3 Initial load
duke
parents:
diff changeset
   510
%.printval:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   511
	@$(ECHO) "  ALT_$* - $($*.desc)"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   512
	@$(ECHO) "  \t $*=$($*)"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   513
fd16c54261b3 Initial load
duke
parents:
diff changeset
   514
# Pattern rule for checking to see if a variable with a directory exists
fd16c54261b3 Initial load
duke
parents:
diff changeset
   515
%.checkdir:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   516
	@if [ ! -d $($*) ] ; then \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   517
	    $(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   518
	fi
fd16c54261b3 Initial load
duke
parents:
diff changeset
   519
fd16c54261b3 Initial load
duke
parents:
diff changeset
   520
# Pattern rule for checking to see if a variable with a file exists
fd16c54261b3 Initial load
duke
parents:
diff changeset
   521
%.checkfil:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   522
	@if [ ! -f $($*) ] ; then \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   523
	    $(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   524
	fi
fd16c54261b3 Initial load
duke
parents:
diff changeset
   525
fd16c54261b3 Initial load
duke
parents:
diff changeset
   526
# Misc notes on help
fd16c54261b3 Initial load
duke
parents:
diff changeset
   527
notes_help:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   528
	@$(ECHO) "\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   529
--- Notes --- \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   530
- All builds use same output directory unless overridden with \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   531
 \t ALT_OUTPUTDIR=<dir>, changing from product to fastdebug you may want \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   532
 \t to use the clean target first. \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   533
- JDK_IMPORT_PATH must refer to a compatible build, not all past promoted \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   534
 \t builds or previous release JDK builds will work. \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   535
- The fastest builds have been when the sources and the BOOTDIR are on \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   536
 \t local disk. \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   537
"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   538
fd16c54261b3 Initial load
duke
parents:
diff changeset
   539
examples_help:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   540
	@$(ECHO) "\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   541
--- Examples --- \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   542
  $(MAKE) fastdebug_build \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   543
  $(MAKE) ALT_OUTPUTDIR=/tmp/foobar all \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   544
  $(MAKE) ALT_OUTPUTDIR=/tmp/foobar fastdebug_build \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   545
  $(MAKE) ALT_OUTPUTDIR=/tmp/foobar all \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   546
  $(MAKE) ALT_BOOTDIR=/opt/java/jdk1.5.0 \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   547
  $(MAKE) ALT_JDK_IMPORT_PATH=/opt/java/jdk1.6.0 \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   548
"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   549
fd16c54261b3 Initial load
duke
parents:
diff changeset
   550
################################################################
fd16c54261b3 Initial load
duke
parents:
diff changeset
   551
# Source and binary plug bundling
fd16c54261b3 Initial load
duke
parents:
diff changeset
   552
################################################################
fd16c54261b3 Initial load
duke
parents:
diff changeset
   553
ifeq ($(BUNDLE_RULES_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   554
  include $(BUNDLE_RULES)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   555
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   556
fd16c54261b3 Initial load
duke
parents:
diff changeset
   557
################################################################
5743
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   558
# rule to test
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   559
################################################################
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   560
6623
b2e02fea81b0 6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents: 5743
diff changeset
   561
.NOTPARALLEL: test_run
5743
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   562
6623
b2e02fea81b0 6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents: 5743
diff changeset
   563
test:
b2e02fea81b0 6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents: 5743
diff changeset
   564
	$(MAKE) test_run
b2e02fea81b0 6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents: 5743
diff changeset
   565
b2e02fea81b0 6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents: 5743
diff changeset
   566
test_run: test_clean test_start test_summary
5743
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   567
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   568
test_start:
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   569
	@$(ECHO) "Tests started at `$(DATE)`"
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   570
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   571
test_clean:
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   572
	$(RM) $(OUTPUTDIR)/test_failures.txt $(OUTPUTDIR)/test_log.txt
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   573
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   574
test_summary: $(OUTPUTDIR)/test_failures.txt
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   575
	@$(ECHO) "#################################################"
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   576
	@$(ECHO) "Tests completed at `$(DATE)`"
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   577
	@( $(EGREP) '^TEST STATS:' $(OUTPUTDIR)/test_log.txt \
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   578
          || $(ECHO) "No TEST STATS seen in log" )
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   579
	@$(ECHO) "For complete details see: $(OUTPUTDIR)/test_log.txt"
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   580
	@$(ECHO) "#################################################"
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   581
	@if [ -s $< ] ; then                                           \
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   582
          $(ECHO) "ERROR: Test failure count: `$(CAT) $< | $(WC) -l`"; \
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   583
          $(CAT) $<;                                                   \
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   584
          exit 1;                                                      \
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   585
        else                                                           \
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   586
          $(ECHO) "Success! No failures detected";                     \
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   587
        fi
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   588
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   589
# Get failure list from log
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   590
$(OUTPUTDIR)/test_failures.txt: $(OUTPUTDIR)/test_log.txt
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   591
	@$(RM) $@
6623
b2e02fea81b0 6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents: 5743
diff changeset
   592
	@( $(EGREP) '^FAILED:' $< || $(ECHO) "" ) | $(NAWK) 'length>0' > $@
5743
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   593
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   594
# Get log file of all tests run
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   595
JDK_TO_TEST := $(shell 							\
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   596
  if [ -d "$(ABS_OUTPUTDIR)/j2sdk-image" ] ; then 			\
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   597
    $(ECHO) "$(ABS_OUTPUTDIR)/j2sdk-image"; 				\
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   598
  elif [ -d "$(ABS_OUTPUTDIR)/bin" ] ; then 				\
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   599
    $(ECHO) "$(ABS_OUTPUTDIR)"; 					\
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   600
  elif [ "$(PRODUCT_HOME)" != "" -a -d "$(PRODUCT_HOME)/bin" ] ; then 	\
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   601
    $(ECHO) "$(PRODUCT_HOME)"; 						\
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   602
  fi 									\
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   603
)
6623
b2e02fea81b0 6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents: 5743
diff changeset
   604
TEST_TARGETS=all
5743
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   605
$(OUTPUTDIR)/test_log.txt:
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   606
	$(RM) $@
6623
b2e02fea81b0 6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents: 5743
diff changeset
   607
	( $(CD) test &&                                                     \
b2e02fea81b0 6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents: 5743
diff changeset
   608
          $(MAKE) NO_STOPPING=- PRODUCT_HOME=$(JDK_TO_TEST) $(TEST_TARGETS) \
5743
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   609
        ) | tee $@
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   610
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   611
################################################################
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   612
# JPRT rule to build
fd16c54261b3 Initial load
duke
parents:
diff changeset
   613
################################################################
fd16c54261b3 Initial load
duke
parents:
diff changeset
   614
fd16c54261b3 Initial load
duke
parents:
diff changeset
   615
include ./make/jprt.gmk
fd16c54261b3 Initial load
duke
parents:
diff changeset
   616
fd16c54261b3 Initial load
duke
parents:
diff changeset
   617
################################################################
fd16c54261b3 Initial load
duke
parents:
diff changeset
   618
#  PHONY
fd16c54261b3 Initial load
duke
parents:
diff changeset
   619
################################################################
fd16c54261b3 Initial load
duke
parents:
diff changeset
   620
6623
b2e02fea81b0 6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents: 5743
diff changeset
   621
.PHONY: all  test test_run test_start test_summary test_clean \
874
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   622
	generic_build_repo_series \
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   623
	what clobber insane \
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   624
        dev dev-build dev-sanity dev-clobber \
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   625
        product_build \
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   626
        fastdebug_build \
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   627
        debug_build  \
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   628
        build_product_image  \
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   629
        build_debug_image  \
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   630
        build_fastdebug_image \
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   631
        create_fresh_product_bootdir \
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   632
        create_fresh_debug_bootdir \
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   633
        create_fresh_fastdebug_bootdir \
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   634
        generic_debug_build
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   635
17
bb9f330cd95a 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 16
diff changeset
   636
# Force target
bb9f330cd95a 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 16
diff changeset
   637
FRC:
bb9f330cd95a 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 16
diff changeset
   638