Makefile
author duke
Wed, 05 Jul 2017 18:40:20 +0200
changeset 15572 d17eb2e13e36
parent 15064 049338f0fb4e
child 15903 bc0e6cd9d760
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
     1
#
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 9618
diff changeset
     2
# Copyright (c) 1995, 2012, 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
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 9618
diff changeset
    26
# If NEWBUILD is defined, use the new build-infra Makefiles and configure.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 9618
diff changeset
    27
#     See NewMakefile.gmk for more information.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 9618
diff changeset
    28
15064
049338f0fb4e 8004229: build-infra: Umbrella for switch of default "make" to new makefiles
ohair
parents: 13697
diff changeset
    29
# If not specified, select what the default build is
049338f0fb4e 8004229: build-infra: Umbrella for switch of default "make" to new makefiles
ohair
parents: 13697
diff changeset
    30
ifndef NEWBUILD
049338f0fb4e 8004229: build-infra: Umbrella for switch of default "make" to new makefiles
ohair
parents: 13697
diff changeset
    31
  NEWBUILD=true
049338f0fb4e 8004229: build-infra: Umbrella for switch of default "make" to new makefiles
ohair
parents: 13697
diff changeset
    32
endif
049338f0fb4e 8004229: build-infra: Umbrella for switch of default "make" to new makefiles
ohair
parents: 13697
diff changeset
    33
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 9618
diff changeset
    34
ifeq ($(NEWBUILD),true)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 9618
diff changeset
    35
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 9618
diff changeset
    36
  # The new top level Makefile
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 9618
diff changeset
    37
  include NewMakefile.gmk
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 9618
diff changeset
    38
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 9618
diff changeset
    39
else # Original Makefile logic
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 9618
diff changeset
    40
17
bb9f330cd95a 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 16
diff changeset
    41
BUILD_PARENT_DIRECTORY=.
bb9f330cd95a 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 16
diff changeset
    42
9618
83db8167c9f6 7043700: Regression for IcedTea builds
ohair
parents: 9309
diff changeset
    43
# Basename of any originally supplied ALT_OUTPUTDIR directory
83db8167c9f6 7043700: Regression for IcedTea builds
ohair
parents: 9309
diff changeset
    44
ifndef ORIG_OUTPUTDIR_BASENAME
83db8167c9f6 7043700: Regression for IcedTea builds
ohair
parents: 9309
diff changeset
    45
  ifdef ALT_OUTPUTDIR
83db8167c9f6 7043700: Regression for IcedTea builds
ohair
parents: 9309
diff changeset
    46
    ORIG_OUTPUTDIR_BASENAME := $(shell basename $(ALT_OUTPUTDIR))
83db8167c9f6 7043700: Regression for IcedTea builds
ohair
parents: 9309
diff changeset
    47
  else
83db8167c9f6 7043700: Regression for IcedTea builds
ohair
parents: 9309
diff changeset
    48
    ORIG_OUTPUTDIR_BASENAME  = $(PLATFORM)-$(ARCH)
83db8167c9f6 7043700: Regression for IcedTea builds
ohair
parents: 9309
diff changeset
    49
  endif
83db8167c9f6 7043700: Regression for IcedTea builds
ohair
parents: 9309
diff changeset
    50
endif
83db8167c9f6 7043700: Regression for IcedTea builds
ohair
parents: 9309
diff changeset
    51
export ORIG_OUTPUTDIR_BASENAME
83db8167c9f6 7043700: Regression for IcedTea builds
ohair
parents: 9309
diff changeset
    52
83db8167c9f6 7043700: Regression for IcedTea builds
ohair
parents: 9309
diff changeset
    53
# The three possible directories created for output (3 build flavors)
83db8167c9f6 7043700: Regression for IcedTea builds
ohair
parents: 9309
diff changeset
    54
OUTPUTDIR_BASENAME-          = $(ORIG_OUTPUTDIR_BASENAME)
83db8167c9f6 7043700: Regression for IcedTea builds
ohair
parents: 9309
diff changeset
    55
OUTPUTDIR_BASENAME-debug     = $(ORIG_OUTPUTDIR_BASENAME)-debug
83db8167c9f6 7043700: Regression for IcedTea builds
ohair
parents: 9309
diff changeset
    56
OUTPUTDIR_BASENAME-fastdebug = $(ORIG_OUTPUTDIR_BASENAME)-fastdebug
83db8167c9f6 7043700: Regression for IcedTea builds
ohair
parents: 9309
diff changeset
    57
83db8167c9f6 7043700: Regression for IcedTea builds
ohair
parents: 9309
diff changeset
    58
# Relative path to a debug output area
83db8167c9f6 7043700: Regression for IcedTea builds
ohair
parents: 9309
diff changeset
    59
REL_JDK_OUTPUTDIR = ../$(OUTPUTDIR_BASENAME-$(DEBUG_NAME))
83db8167c9f6 7043700: Regression for IcedTea builds
ohair
parents: 9309
diff changeset
    60
83db8167c9f6 7043700: Regression for IcedTea builds
ohair
parents: 9309
diff changeset
    61
# The created jdk image directory
83db8167c9f6 7043700: Regression for IcedTea builds
ohair
parents: 9309
diff changeset
    62
JDK_IMAGE_DIRNAME = j2sdk-image
83db8167c9f6 7043700: Regression for IcedTea builds
ohair
parents: 9309
diff changeset
    63
JDK_IMAGE_DIR     = $(OUTPUTDIR)/$(JDK_IMAGE_DIRNAME)
83db8167c9f6 7043700: Regression for IcedTea builds
ohair
parents: 9309
diff changeset
    64
ABS_JDK_IMAGE_DIR = $(ABS_OUTPUTDIR)/$(JDK_IMAGE_DIRNAME)
83db8167c9f6 7043700: Regression for IcedTea builds
ohair
parents: 9309
diff changeset
    65
83db8167c9f6 7043700: Regression for IcedTea builds
ohair
parents: 9309
diff changeset
    66
# Relative path from an output directory to the image directory
83db8167c9f6 7043700: Regression for IcedTea builds
ohair
parents: 9309
diff changeset
    67
REL_JDK_IMAGE_DIR = ../$(OUTPUTDIR_BASENAME-$(DEBUG_NAME))/$(JDK_IMAGE_DIRNAME)
83db8167c9f6 7043700: Regression for IcedTea builds
ohair
parents: 9309
diff changeset
    68
REL_JDK_DEBUG_IMAGE_DIR = ../$(OUTPUTDIR_BASENAME-debug)/$(JDK_IMAGE_DIRNAME)
83db8167c9f6 7043700: Regression for IcedTea builds
ohair
parents: 9309
diff changeset
    69
REL_JDK_FASTDEBUG_IMAGE_DIR = ../$(OUTPUTDIR_BASENAME-fastdebug)/$(JDK_IMAGE_DIRNAME)
83db8167c9f6 7043700: Regression for IcedTea builds
ohair
parents: 9309
diff changeset
    70
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
    71
ifndef TOPDIR
20
41658053480c 6623832: Cleanup old j2se makefile targets
ohair
parents: 17
diff changeset
    72
  TOPDIR:=.
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
    73
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
    74
fd16c54261b3 Initial load
duke
parents:
diff changeset
    75
ifndef JDK_TOPDIR
fd16c54261b3 Initial load
duke
parents:
diff changeset
    76
  JDK_TOPDIR=$(TOPDIR)/jdk
fd16c54261b3 Initial load
duke
parents:
diff changeset
    77
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
    78
ifndef JDK_MAKE_SHARED_DIR
fd16c54261b3 Initial load
duke
parents:
diff changeset
    79
  JDK_MAKE_SHARED_DIR=$(JDK_TOPDIR)/make/common/shared
fd16c54261b3 Initial load
duke
parents:
diff changeset
    80
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
    81
874
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    82
default: all
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
    83
874
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    84
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
    85
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
    86
include ./make/sanity-rules.gmk
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
    87
include ./make/hotspot-rules.gmk
fd16c54261b3 Initial load
duke
parents:
diff changeset
    88
include ./make/langtools-rules.gmk
fd16c54261b3 Initial load
duke
parents:
diff changeset
    89
include ./make/corba-rules.gmk
fd16c54261b3 Initial load
duke
parents:
diff changeset
    90
include ./make/jaxp-rules.gmk
fd16c54261b3 Initial load
duke
parents:
diff changeset
    91
include ./make/jaxws-rules.gmk
fd16c54261b3 Initial load
duke
parents:
diff changeset
    92
include ./make/jdk-rules.gmk
fd16c54261b3 Initial load
duke
parents:
diff changeset
    93
include ./make/install-rules.gmk
fd16c54261b3 Initial load
duke
parents:
diff changeset
    94
include ./make/sponsors-rules.gmk
fd16c54261b3 Initial load
duke
parents:
diff changeset
    95
include ./make/deploy-rules.gmk
fd16c54261b3 Initial load
duke
parents:
diff changeset
    96
7873
4ff5acee11e8 7009969: Remove SKIP_OPENJDK_BUILD from top Makefile
ohair
parents: 7652
diff changeset
    97
all:: sanity
874
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    98
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
    99
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
   100
  all:: fastdebug_build
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   101
endif
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   102
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   103
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
   104
  all:: debug_build
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   105
endif
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   106
948
5d6b06900843 6737659: debug bundles are empty
ohair
parents: 874
diff changeset
   107
all:: all_product_build 
5d6b06900843 6737659: debug bundles are empty
ohair
parents: 874
diff changeset
   108
8445
309991ddb9a1 7026167: Broken fastdebug only build
ohair
parents: 8441
diff changeset
   109
all_product_build::
309991ddb9a1 7026167: Broken fastdebug only build
ohair
parents: 8441
diff changeset
   110
8441
30f5ad688d4a 7021753: Add a build times report
ohrstrom
parents: 7876
diff changeset
   111
# Everything for a full product build
30f5ad688d4a 7021753: Add a build times report
ohrstrom
parents: 7876
diff changeset
   112
ifeq ($(SKIP_PRODUCT_BUILD), false)
874
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
  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
   115
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   116
  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
   117
    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
   118
    clobber:: install-clobber
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   119
  endif
8441
30f5ad688d4a 7021753: Add a build times report
ohrstrom
parents: 7876
diff changeset
   120
874
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   121
  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
   122
    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
   123
    clobber:: sponsors-clobber
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   124
  endif
8441
30f5ad688d4a 7021753: Add a build times report
ohrstrom
parents: 7876
diff changeset
   125
874
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   126
  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
   127
    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
   128
  endif
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   129
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   130
endif
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   131
8441
30f5ad688d4a 7021753: Add a build times report
ohrstrom
parents: 7876
diff changeset
   132
define StartTimer
30f5ad688d4a 7021753: Add a build times report
ohrstrom
parents: 7876
diff changeset
   133
	$(MKDIR) -p $(BUILDTIMESDIR)
30f5ad688d4a 7021753: Add a build times report
ohrstrom
parents: 7876
diff changeset
   134
	$(RM) $(BUILDTIMESDIR)/build_time_*
30f5ad688d4a 7021753: Add a build times report
ohrstrom
parents: 7876
diff changeset
   135
	$(call RecordStartTime,TOTAL)
30f5ad688d4a 7021753: Add a build times report
ohrstrom
parents: 7876
diff changeset
   136
endef
30f5ad688d4a 7021753: Add a build times report
ohrstrom
parents: 7876
diff changeset
   137
30f5ad688d4a 7021753: Add a build times report
ohrstrom
parents: 7876
diff changeset
   138
define StopTimer
30f5ad688d4a 7021753: Add a build times report
ohrstrom
parents: 7876
diff changeset
   139
	$(if $(REPORT_BUILD_TIMES),$(call RecordEndTime,TOTAL) && $(call ReportBuildTimes,$1),)
30f5ad688d4a 7021753: Add a build times report
ohrstrom
parents: 7876
diff changeset
   140
endef
874
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   141
5743
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   142
# Generic build of basic repo series
9309
334bea52fc16 6631003: Add hg tip changeset to build image
ohair
parents: 8917
diff changeset
   143
generic_build_repo_series:: $(SOURCE_TIPS)
9618
83db8167c9f6 7043700: Regression for IcedTea builds
ohair
parents: 9309
diff changeset
   144
	$(MKDIR) -p $(JDK_IMAGE_DIR)
8441
30f5ad688d4a 7021753: Add a build times report
ohrstrom
parents: 7876
diff changeset
   145
	@$(call StartTimer)
874
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   146
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   147
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
   148
  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
   149
  clobber:: langtools-clobber
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   150
endif
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   151
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   152
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
   153
  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
   154
  clobber:: corba-clobber
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   155
endif
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   156
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   157
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
   158
  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
   159
  clobber:: jaxp-clobber
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   160
endif
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   161
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   162
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
   163
  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
   164
  clobber:: jaxws-clobber
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   165
endif
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   166
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   167
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
   168
  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
   169
  clobber:: hotspot-clobber
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   170
endif
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   171
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   172
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
   173
  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
   174
  clobber:: jdk-clobber
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   175
endif
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   176
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   177
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
   178
  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
   179
  clobber:: deploy-clobber
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   180
endif
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   181
8441
30f5ad688d4a 7021753: Add a build times report
ohrstrom
parents: 7876
diff changeset
   182
generic_build_repo_series::
30f5ad688d4a 7021753: Add a build times report
ohrstrom
parents: 7876
diff changeset
   183
	@$(call StopTimer,$(if $(DEBUG_NAME),$(DEBUG_NAME)_build,all_product_build))
30f5ad688d4a 7021753: Add a build times report
ohrstrom
parents: 7876
diff changeset
   184
874
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   185
# 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
   186
#  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
   187
#  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
   188
#
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   189
#   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
   190
#   ALT_OUTPUTDIR is changed to have -debug or -fastdebug suffix
9618
83db8167c9f6 7043700: Regression for IcedTea builds
ohair
parents: 9309
diff changeset
   191
#   The resulting image directory (j2sdk-image) is used by the install makefiles
83db8167c9f6 7043700: Regression for IcedTea builds
ohair
parents: 9309
diff changeset
   192
#     to create a debug install bundle jdk-*-debug-** bundle (tar or zip) 
874
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   193
#     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
   194
#     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
   195
#     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
   196
#     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
   197
#
5743
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   198
#   NOTE: On windows, do not use $(ABS_BOOTDIR_OUTPUTDIR)-$(DEBUG_NAME).
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   199
#         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
   200
#         not be the same location.
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   201
#
874
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   202
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   203
# 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
   204
ABS_BOOTDIR_OUTPUTDIR=$(ABS_OUTPUTDIR)/bootjdk
9618
83db8167c9f6 7043700: Regression for IcedTea builds
ohair
parents: 9309
diff changeset
   205
FRESH_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/$(JDK_IMAGE_DIRNAME)
83db8167c9f6 7043700: Regression for IcedTea builds
ohair
parents: 9309
diff changeset
   206
FRESH_DEBUG_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/$(REL_JDK_IMAGE_DIR)
874
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   207
  
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   208
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
   209
	$(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) \
4309
39ca605f0647 6727046: Add message when docs are skipped in control build
ohair
parents: 2099
diff changeset
   210
		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
   211
		BOOT_CYCLE_SETTINGS= \
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   212
		build_product_image
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   213
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   214
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
   215
	$(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) \
4309
39ca605f0647 6727046: Add message when docs are skipped in control build
ohair
parents: 2099
diff changeset
   216
		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
   217
		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
   218
		build_debug_image
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   219
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   220
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
   221
	$(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) \
4309
39ca605f0647 6727046: Add message when docs are skipped in control build
ohair
parents: 2099
diff changeset
   222
		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
   223
		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
   224
		build_fastdebug_image
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
# Create boot image?
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   227
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
   228
  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
   229
    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
   230
  endif
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   231
endif
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   232
8441
30f5ad688d4a 7021753: Add a build times report
ohrstrom
parents: 7876
diff changeset
   233
30f5ad688d4a 7021753: Add a build times report
ohrstrom
parents: 7876
diff changeset
   234
874
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   235
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
   236
  
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   237
  # 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
   238
  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
   239
  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
   240
  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
   241
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   242
  # 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
   243
  BOOT_CYCLE_SETTINGS= \
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   244
     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
   245
     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
   246
  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
   247
     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
   248
     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
   249
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   250
else
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   251
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   252
  # 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
   253
  BOOT_CYCLE_SETTINGS=
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   254
  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
   255
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   256
endif
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   257
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   258
build_product_image:
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   259
	$(MAKE) \
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   260
	        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
   261
	        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
   262
	        $(BOOT_CYCLE_SETTINGS) \
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   263
	        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
   264
5743
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   265
#   NOTE: On windows, do not use $(ABS_OUTPUTDIR)-$(DEBUG_NAME).
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   266
#         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
   267
#         not be the same location.
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   268
874
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   269
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
	$(MAKE) \
9618
83db8167c9f6 7043700: Regression for IcedTea builds
ohair
parents: 9309
diff changeset
   271
		ALT_OUTPUTDIR=$(ABS_OUTPUTDIR)/$(REL_JDK_OUTPUTDIR) \
874
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   272
	        DEBUG_NAME=$(DEBUG_NAME) \
4309
39ca605f0647 6727046: Add message when docs are skipped in control build
ohair
parents: 2099
diff changeset
   273
		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
   274
	        $(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
   275
		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
   276
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   277
build_debug_image:
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   278
	$(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
   279
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   280
build_fastdebug_image:
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   281
	$(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
   282
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   283
# Build final image
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   284
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
   285
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
   286
fastdebug_build:: build_fastdebug_image
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   287
9309
334bea52fc16 6631003: Add hg tip changeset to build image
ohair
parents: 8917
diff changeset
   288
# The source tips are stored with the relative path to the repo.
334bea52fc16 6631003: Add hg tip changeset to build image
ohair
parents: 8917
diff changeset
   289
#   This file will be used when constructing the jdk image.
334bea52fc16 6631003: Add hg tip changeset to build image
ohair
parents: 8917
diff changeset
   290
source_tips: $(SOURCE_TIPS)
334bea52fc16 6631003: Add hg tip changeset to build image
ohair
parents: 8917
diff changeset
   291
	$(CAT) $<
334bea52fc16 6631003: Add hg tip changeset to build image
ohair
parents: 8917
diff changeset
   292
$(SOURCE_TIPS): FRC
334bea52fc16 6631003: Add hg tip changeset to build image
ohair
parents: 8917
diff changeset
   293
	@$(prep-target)
334bea52fc16 6631003: Add hg tip changeset to build image
ohair
parents: 8917
diff changeset
   294
	@$(call GetSourceTips)
334bea52fc16 6631003: Add hg tip changeset to build image
ohair
parents: 8917
diff changeset
   295
8441
30f5ad688d4a 7021753: Add a build times report
ohrstrom
parents: 7876
diff changeset
   296
clobber:: REPORT_BUILD_TIMES=
30f5ad688d4a 7021753: Add a build times report
ohrstrom
parents: 7876
diff changeset
   297
clobber:: 
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   298
	$(RM) -r $(OUTPUTDIR)/*
fd16c54261b3 Initial load
duke
parents:
diff changeset
   299
	-($(RMDIR) -p $(OUTPUTDIR) > $(DEV_NULL) 2>&1; $(TRUE))
fd16c54261b3 Initial load
duke
parents:
diff changeset
   300
fd16c54261b3 Initial load
duke
parents:
diff changeset
   301
clean: clobber
fd16c54261b3 Initial load
duke
parents:
diff changeset
   302
874
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   303
#
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   304
# Dev builds
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   305
#
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   306
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   307
dev : dev-build
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   308
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   309
dev-build:
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   310
	$(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
   311
dev-sanity:
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   312
	$(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
   313
dev-clobber:
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   314
	$(MAKE) DEV_ONLY=true clobber
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   315
fd16c54261b3 Initial load
duke
parents:
diff changeset
   316
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
   317
# Quick jdk verification build
fd16c54261b3 Initial load
duke
parents:
diff changeset
   318
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
   319
jdk_only:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   320
	$(MAKE) SKIP_FASTDEBUG_BUILD=true BUILD_HOTSPOT=false all
fd16c54261b3 Initial load
duke
parents:
diff changeset
   321
fd16c54261b3 Initial load
duke
parents:
diff changeset
   322
fd16c54261b3 Initial load
duke
parents:
diff changeset
   323
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
   324
# Quick jdk verification fastdebug build
fd16c54261b3 Initial load
duke
parents:
diff changeset
   325
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
   326
jdk_fastdebug_only:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   327
	$(MAKE) DEBUG_NAME=fastdebug BUILD_HOTSPOT=false BUILD_DEPLOY=false \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   328
	    BUILD_INSTALL=false BUILD_SPONSORS=false generic_debug_build
fd16c54261b3 Initial load
duke
parents:
diff changeset
   329
fd16c54261b3 Initial load
duke
parents:
diff changeset
   330
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
   331
# Quick deploy verification fastdebug build
fd16c54261b3 Initial load
duke
parents:
diff changeset
   332
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
   333
deploy_fastdebug_only:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   334
	$(MAKE) \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   335
	    DEBUG_NAME=fastdebug \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   336
	    BUILD_HOTSPOT=false \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   337
	    BUILD_JDK=false \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   338
	    BUILD_LANGTOOLS=false \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   339
	    BUILD_CORBA=false \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   340
	    BUILD_JAXP=false \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   341
	    BUILD_JAXWS=false \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   342
	    BUILD_INSTALL=false \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   343
	    BUILD_SPONSORS=false \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   344
	    generic_debug_build
fd16c54261b3 Initial load
duke
parents:
diff changeset
   345
fd16c54261b3 Initial load
duke
parents:
diff changeset
   346
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
   347
# Product build (skip debug builds)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   348
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
   349
product_only:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   350
	$(MAKE) SKIP_FASTDEBUG_BUILD=true all
fd16c54261b3 Initial load
duke
parents:
diff changeset
   351
fd16c54261b3 Initial load
duke
parents:
diff changeset
   352
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
   353
# Check target
fd16c54261b3 Initial load
duke
parents:
diff changeset
   354
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
   355
fd16c54261b3 Initial load
duke
parents:
diff changeset
   356
check: variable_check
fd16c54261b3 Initial load
duke
parents:
diff changeset
   357
fd16c54261b3 Initial load
duke
parents:
diff changeset
   358
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
   359
# Help target
fd16c54261b3 Initial load
duke
parents:
diff changeset
   360
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
   361
help: intro_help target_help variable_help notes_help examples_help
fd16c54261b3 Initial load
duke
parents:
diff changeset
   362
fd16c54261b3 Initial load
duke
parents:
diff changeset
   363
# Intro help message
fd16c54261b3 Initial load
duke
parents:
diff changeset
   364
intro_help:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   365
	@$(ECHO) "\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   366
Makefile for the JDK builds (all the JDK). \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   367
"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   368
fd16c54261b3 Initial load
duke
parents:
diff changeset
   369
# Target help
fd16c54261b3 Initial load
duke
parents:
diff changeset
   370
target_help:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   371
	@$(ECHO) "\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   372
--- Common Targets ---  \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   373
all               -- build the core JDK (default target) \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   374
help              -- Print out help information \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   375
check             -- Check make variable values for correctness \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   376
sanity            -- Perform detailed sanity checks on system and settings \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   377
fastdebug_build   -- build the core JDK in 'fastdebug' mode (-g -O) \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   378
debug_build       -- build the core JDK in 'debug' mode (-g) \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   379
clean             -- remove all built and imported files \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   380
clobber           -- same as clean \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   381
"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   382
fd16c54261b3 Initial load
duke
parents:
diff changeset
   383
# Variable help (only common ones used by this Makefile)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   384
variable_help: variable_help_intro variable_list variable_help_end
fd16c54261b3 Initial load
duke
parents:
diff changeset
   385
variable_help_intro:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   386
	@$(ECHO) "--- Common Variables ---"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   387
variable_help_end:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   388
	@$(ECHO) " "
fd16c54261b3 Initial load
duke
parents:
diff changeset
   389
fd16c54261b3 Initial load
duke
parents:
diff changeset
   390
# One line descriptions for the variables
fd16c54261b3 Initial load
duke
parents:
diff changeset
   391
OUTPUTDIR.desc             = Output directory
fd16c54261b3 Initial load
duke
parents:
diff changeset
   392
PARALLEL_COMPILE_JOBS.desc = Solaris/Linux parallel compile run count
fd16c54261b3 Initial load
duke
parents:
diff changeset
   393
SLASH_JAVA.desc            = Root of all build tools, e.g. /java or J:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   394
BOOTDIR.desc               = JDK used to boot the build
fd16c54261b3 Initial load
duke
parents:
diff changeset
   395
JDK_IMPORT_PATH.desc       = JDK used to import components of the build
fd16c54261b3 Initial load
duke
parents:
diff changeset
   396
COMPILER_PATH.desc         = Compiler install directory
fd16c54261b3 Initial load
duke
parents:
diff changeset
   397
CACERTS_FILE.desc          = Location of certificates file
fd16c54261b3 Initial load
duke
parents:
diff changeset
   398
DEVTOOLS_PATH.desc         = Directory containing zip and gnumake
fd16c54261b3 Initial load
duke
parents:
diff changeset
   399
CUPS_HEADERS_PATH.desc     = Include directory location for CUPS header files
fd16c54261b3 Initial load
duke
parents:
diff changeset
   400
DXSDK_PATH.desc            = Root directory of DirectX SDK
fd16c54261b3 Initial load
duke
parents:
diff changeset
   401
fd16c54261b3 Initial load
duke
parents:
diff changeset
   402
# Make variables to print out (description and value)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   403
VARIABLE_PRINTVAL_LIST +=       \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   404
    OUTPUTDIR                   \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   405
    PARALLEL_COMPILE_JOBS       \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   406
    SLASH_JAVA                  \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   407
    BOOTDIR                     \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   408
    JDK_IMPORT_PATH             \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   409
    COMPILER_PATH               \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   410
    CACERTS_FILE                \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   411
    DEVTOOLS_PATH
fd16c54261b3 Initial load
duke
parents:
diff changeset
   412
fd16c54261b3 Initial load
duke
parents:
diff changeset
   413
# Make variables that should refer to directories that exist
fd16c54261b3 Initial load
duke
parents:
diff changeset
   414
VARIABLE_CHECKDIR_LIST +=       \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   415
    SLASH_JAVA                  \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   416
    BOOTDIR                     \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   417
    JDK_IMPORT_PATH             \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   418
    COMPILER_PATH               \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   419
    DEVTOOLS_PATH 
fd16c54261b3 Initial load
duke
parents:
diff changeset
   420
fd16c54261b3 Initial load
duke
parents:
diff changeset
   421
# Make variables that should refer to files that exist
fd16c54261b3 Initial load
duke
parents:
diff changeset
   422
VARIABLE_CHECKFIL_LIST +=       \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   423
    CACERTS_FILE
fd16c54261b3 Initial load
duke
parents:
diff changeset
   424
fd16c54261b3 Initial load
duke
parents:
diff changeset
   425
# Some are windows specific
fd16c54261b3 Initial load
duke
parents:
diff changeset
   426
ifeq ($(PLATFORM), windows)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   427
fd16c54261b3 Initial load
duke
parents:
diff changeset
   428
VARIABLE_PRINTVAL_LIST +=       \
7876
c2a288bdcca1 6950375: Remove msvcrt.dll from the Windows JRE bundles
ohair
parents: 7873
diff changeset
   429
    DXSDK_PATH
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   430
fd16c54261b3 Initial load
duke
parents:
diff changeset
   431
VARIABLE_CHECKDIR_LIST +=       \
7876
c2a288bdcca1 6950375: Remove msvcrt.dll from the Windows JRE bundles
ohair
parents: 7873
diff changeset
   432
    DXSDK_PATH
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   433
fd16c54261b3 Initial load
duke
parents:
diff changeset
   434
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   435
fd16c54261b3 Initial load
duke
parents:
diff changeset
   436
# For pattern rules below, so all are treated the same
fd16c54261b3 Initial load
duke
parents:
diff changeset
   437
DO_PRINTVAL_LIST=$(VARIABLE_PRINTVAL_LIST:%=%.printval)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   438
DO_CHECKDIR_LIST=$(VARIABLE_CHECKDIR_LIST:%=%.checkdir)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   439
DO_CHECKFIL_LIST=$(VARIABLE_CHECKFIL_LIST:%=%.checkfil)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   440
fd16c54261b3 Initial load
duke
parents:
diff changeset
   441
# Complete variable check
fd16c54261b3 Initial load
duke
parents:
diff changeset
   442
variable_check: $(DO_CHECKDIR_LIST) $(DO_CHECKFIL_LIST)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   443
variable_list: $(DO_PRINTVAL_LIST) variable_check
fd16c54261b3 Initial load
duke
parents:
diff changeset
   444
fd16c54261b3 Initial load
duke
parents:
diff changeset
   445
# Pattern rule for printing out a variable
fd16c54261b3 Initial load
duke
parents:
diff changeset
   446
%.printval:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   447
	@$(ECHO) "  ALT_$* - $($*.desc)"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   448
	@$(ECHO) "  \t $*=$($*)"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   449
fd16c54261b3 Initial load
duke
parents:
diff changeset
   450
# Pattern rule for checking to see if a variable with a directory exists
fd16c54261b3 Initial load
duke
parents:
diff changeset
   451
%.checkdir:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   452
	@if [ ! -d $($*) ] ; then \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   453
	    $(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   454
	fi
fd16c54261b3 Initial load
duke
parents:
diff changeset
   455
fd16c54261b3 Initial load
duke
parents:
diff changeset
   456
# Pattern rule for checking to see if a variable with a file exists
fd16c54261b3 Initial load
duke
parents:
diff changeset
   457
%.checkfil:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   458
	@if [ ! -f $($*) ] ; then \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   459
	    $(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   460
	fi
fd16c54261b3 Initial load
duke
parents:
diff changeset
   461
fd16c54261b3 Initial load
duke
parents:
diff changeset
   462
# Misc notes on help
fd16c54261b3 Initial load
duke
parents:
diff changeset
   463
notes_help:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   464
	@$(ECHO) "\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   465
--- Notes --- \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   466
- All builds use same output directory unless overridden with \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   467
 \t ALT_OUTPUTDIR=<dir>, changing from product to fastdebug you may want \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   468
 \t to use the clean target first. \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   469
- JDK_IMPORT_PATH must refer to a compatible build, not all past promoted \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   470
 \t builds or previous release JDK builds will work. \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   471
- The fastest builds have been when the sources and the BOOTDIR are on \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   472
 \t local disk. \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   473
"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   474
fd16c54261b3 Initial load
duke
parents:
diff changeset
   475
examples_help:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   476
	@$(ECHO) "\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   477
--- Examples --- \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   478
  $(MAKE) fastdebug_build \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   479
  $(MAKE) ALT_OUTPUTDIR=/tmp/foobar all \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   480
  $(MAKE) ALT_OUTPUTDIR=/tmp/foobar fastdebug_build \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   481
  $(MAKE) ALT_OUTPUTDIR=/tmp/foobar all \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   482
  $(MAKE) ALT_BOOTDIR=/opt/java/jdk1.5.0 \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   483
  $(MAKE) ALT_JDK_IMPORT_PATH=/opt/java/jdk1.6.0 \n\
fd16c54261b3 Initial load
duke
parents:
diff changeset
   484
"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   485
fd16c54261b3 Initial load
duke
parents:
diff changeset
   486
################################################################
7652
803a0c91a1a2 7008723: Remove binary plugs creation and use from openjdk
ohair
parents: 7649
diff changeset
   487
# Source bundling
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   488
################################################################
fd16c54261b3 Initial load
duke
parents:
diff changeset
   489
ifeq ($(BUNDLE_RULES_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   490
  include $(BUNDLE_RULES)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   491
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   492
fd16c54261b3 Initial load
duke
parents:
diff changeset
   493
################################################################
5743
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   494
# rule to test
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   495
################################################################
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   496
6623
b2e02fea81b0 6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents: 5743
diff changeset
   497
.NOTPARALLEL: test_run
5743
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   498
6623
b2e02fea81b0 6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents: 5743
diff changeset
   499
test:
b2e02fea81b0 6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents: 5743
diff changeset
   500
	$(MAKE) test_run
b2e02fea81b0 6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents: 5743
diff changeset
   501
b2e02fea81b0 6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents: 5743
diff changeset
   502
test_run: test_clean test_start test_summary
5743
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   503
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   504
test_start:
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   505
	@$(ECHO) "Tests started at `$(DATE)`"
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   506
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   507
test_clean:
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   508
	$(RM) $(OUTPUTDIR)/test_failures.txt $(OUTPUTDIR)/test_log.txt
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   509
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   510
test_summary: $(OUTPUTDIR)/test_failures.txt
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   511
	@$(ECHO) "#################################################"
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   512
	@$(ECHO) "Tests completed at `$(DATE)`"
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   513
	@( $(EGREP) '^TEST STATS:' $(OUTPUTDIR)/test_log.txt \
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   514
          || $(ECHO) "No TEST STATS seen in log" )
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   515
	@$(ECHO) "For complete details see: $(OUTPUTDIR)/test_log.txt"
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   516
	@$(ECHO) "#################################################"
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   517
	@if [ -s $< ] ; then                                           \
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   518
          $(ECHO) "ERROR: Test failure count: `$(CAT) $< | $(WC) -l`"; \
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   519
          $(CAT) $<;                                                   \
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   520
          exit 1;                                                      \
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   521
        else                                                           \
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   522
          $(ECHO) "Success! No failures detected";                     \
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   523
        fi
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   524
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   525
# Get failure list from log
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   526
$(OUTPUTDIR)/test_failures.txt: $(OUTPUTDIR)/test_log.txt
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   527
	@$(RM) $@
6623
b2e02fea81b0 6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents: 5743
diff changeset
   528
	@( $(EGREP) '^FAILED:' $< || $(ECHO) "" ) | $(NAWK) 'length>0' > $@
5743
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   529
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   530
# Get log file of all tests run
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   531
JDK_TO_TEST := $(shell 							\
9618
83db8167c9f6 7043700: Regression for IcedTea builds
ohair
parents: 9309
diff changeset
   532
  if [ -d "$(ABS_JDK_IMAGE_DIR)" ] ; then 				\
83db8167c9f6 7043700: Regression for IcedTea builds
ohair
parents: 9309
diff changeset
   533
    $(ECHO) "$(ABS_JDK_IMAGE_DIR)"; 					\
5743
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   534
  elif [ -d "$(ABS_OUTPUTDIR)/bin" ] ; then 				\
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   535
    $(ECHO) "$(ABS_OUTPUTDIR)"; 					\
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   536
  elif [ "$(PRODUCT_HOME)" != "" -a -d "$(PRODUCT_HOME)/bin" ] ; then 	\
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   537
    $(ECHO) "$(PRODUCT_HOME)"; 						\
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   538
  fi 									\
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   539
)
6623
b2e02fea81b0 6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents: 5743
diff changeset
   540
TEST_TARGETS=all
5743
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   541
$(OUTPUTDIR)/test_log.txt:
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   542
	$(RM) $@
6623
b2e02fea81b0 6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents: 5743
diff changeset
   543
	( $(CD) test &&                                                     \
b2e02fea81b0 6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents: 5743
diff changeset
   544
          $(MAKE) NO_STOPPING=- PRODUCT_HOME=$(JDK_TO_TEST) $(TEST_TARGETS) \
5743
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   545
        ) | tee $@
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   546
e14fbdea5504 6960853: Cleanup makefiles, remove unused vars etc.
ohair
parents: 5499
diff changeset
   547
################################################################
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   548
# JPRT rule to build
fd16c54261b3 Initial load
duke
parents:
diff changeset
   549
################################################################
fd16c54261b3 Initial load
duke
parents:
diff changeset
   550
fd16c54261b3 Initial load
duke
parents:
diff changeset
   551
include ./make/jprt.gmk
fd16c54261b3 Initial load
duke
parents:
diff changeset
   552
fd16c54261b3 Initial load
duke
parents:
diff changeset
   553
################################################################
fd16c54261b3 Initial load
duke
parents:
diff changeset
   554
#  PHONY
fd16c54261b3 Initial load
duke
parents:
diff changeset
   555
################################################################
fd16c54261b3 Initial load
duke
parents:
diff changeset
   556
6623
b2e02fea81b0 6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents: 5743
diff changeset
   557
.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
   558
	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
   559
	what clobber insane \
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   560
        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
   561
        product_build \
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   562
        fastdebug_build \
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   563
        debug_build  \
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   564
        build_product_image  \
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   565
        build_debug_image  \
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   566
        build_fastdebug_image \
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 668
diff changeset
   567
        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
   568
        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
   569
        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
   570
        generic_debug_build
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   571
17
bb9f330cd95a 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 16
diff changeset
   572
# Force target
bb9f330cd95a 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 16
diff changeset
   573
FRC:
bb9f330cd95a 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 16
diff changeset
   574
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 9618
diff changeset
   575
endif # Original Makefile logic
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 9618
diff changeset
   576