make/Main.gmk
author dsamersoff
Thu, 10 Apr 2014 07:09:13 -0700
changeset 23739 2815f34a64c5
parent 22721 63761da45392
child 25854 98ce0879ab4c
permissions -rw-r--r--
8039368: Remove testcase from npt utf.c Summary: don't compile testcase by default Reviewed-by: sla, vkempik
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
     1
#
22714
a752920c4317 8034191: Move relevant parts of build system to new closed repo
ihse
parents: 22031
diff changeset
     2
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
     4
#
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    10
#
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    15
# accompanied this code).
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    16
#
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    20
#
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    23
# questions.
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    24
#
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    25
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    26
### This is the main part of the Makefile, for the normal case with SPEC specifying a single existing spec.gmk file.
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    27
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    28
# Now load the spec
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    29
include $(SPEC)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    30
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20047
diff changeset
    31
# Load the vital tools for all the makefiles.
21759
e24e22311718 8027566: Remove the old build system
ihse
parents: 21173
diff changeset
    32
include $(SRC_ROOT)/make/common/MakeBase.gmk
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    33
22714
a752920c4317 8034191: Move relevant parts of build system to new closed repo
ihse
parents: 22031
diff changeset
    34
# Hook to include the corresponding custom file, if present.
a752920c4317 8034191: Move relevant parts of build system to new closed repo
ihse
parents: 22031
diff changeset
    35
$(eval $(call IncludeCustomExtension, , Main.gmk))
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    36
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    37
### Clean up from previous run
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    38
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    39
# Remove any build.log from a previous run, if they exist
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    40
ifneq (,$(BUILD_LOG))
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20047
diff changeset
    41
  ifneq (,$(BUILD_LOG_PREVIOUS))
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20047
diff changeset
    42
    # Rotate old log
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20047
diff changeset
    43
    $(shell $(RM) $(BUILD_LOG_PREVIOUS) 2> /dev/null)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20047
diff changeset
    44
    $(shell $(MV) $(BUILD_LOG) $(BUILD_LOG_PREVIOUS) 2> /dev/null)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20047
diff changeset
    45
  else
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20047
diff changeset
    46
    $(shell $(RM) $(BUILD_LOG) 2> /dev/null)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20047
diff changeset
    47
  endif
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20047
diff changeset
    48
  $(shell $(RM) $(OUTPUT_ROOT)/build-trace-time.log 2> /dev/null)
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    49
endif
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    50
# Remove any javac server logs and port files. This
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    51
# prevents a new make run to reuse the previous servers.
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    52
ifneq (,$(SJAVAC_SERVER_DIR))
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20047
diff changeset
    53
  $(shell $(MKDIR) -p $(SJAVAC_SERVER_DIR) && $(RM) -rf $(SJAVAC_SERVER_DIR)/*)
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    54
endif
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    55
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    56
# Reset the build timers.
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    57
$(eval $(call ResetAllTimers))
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    58
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    59
# Setup number of jobs to use. -jN is unfortunately not available for us to parse from the command line,
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    60
# hence this workaround.
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    61
MAKE_ARGS:=$(MAKE_ARGS) -j$(JOBS)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    62
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    63
### Main targets
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    64
15053
64278cb83950 8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents: 14466
diff changeset
    65
default: jdk
64278cb83950 8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents: 14466
diff changeset
    66
	@$(call CheckIfMakeAtEnd)
64278cb83950 8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents: 14466
diff changeset
    67
64278cb83950 8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents: 14466
diff changeset
    68
all: images docs
64278cb83950 8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents: 14466
diff changeset
    69
	@$(call CheckIfMakeAtEnd)
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    70
15395
e5d837c6e999 8007093: build-infra: Make should fail if spec is older than configure files
erikj
parents: 15060
diff changeset
    71
# Setup a rule for SPEC file that fails if executed. This check makes sure the configuration
e5d837c6e999 8007093: build-infra: Make should fail if spec is older than configure files
erikj
parents: 15060
diff changeset
    72
# is up to date after changes to configure
e5d837c6e999 8007093: build-infra: Make should fail if spec is older than configure files
erikj
parents: 15060
diff changeset
    73
$(SPEC): $(wildcard $(SRC_ROOT)/common/autoconf/*)
22716
cf32fe2eb254 8034199: Add 'reconfigure' target for re-creating a configuration
ihse
parents: 22714
diff changeset
    74
	@$(ECHO) "ERROR: $(SPEC) is not up to date."
cf32fe2eb254 8034199: Add 'reconfigure' target for re-creating a configuration
ihse
parents: 22714
diff changeset
    75
	@$(ECHO) "Please rerun configure! Easiest way to do this is by running"
cf32fe2eb254 8034199: Add 'reconfigure' target for re-creating a configuration
ihse
parents: 22714
diff changeset
    76
	@$(ECHO) "'make reconfigure'."
15395
e5d837c6e999 8007093: build-infra: Make should fail if spec is older than configure files
erikj
parents: 15060
diff changeset
    77
	@if test "x$(IGNORE_OLD_CONFIG)" != "xtrue"; then exit 1; fi
e5d837c6e999 8007093: build-infra: Make should fail if spec is older than configure files
erikj
parents: 15060
diff changeset
    78
e5d837c6e999 8007093: build-infra: Make should fail if spec is older than configure files
erikj
parents: 15060
diff changeset
    79
start-make: $(SPEC)
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    80
	@$(call AtMakeStart)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    81
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    82
langtools: langtools-only
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    83
langtools-only: start-make
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    84
	@$(call TargetEnter)
21759
e24e22311718 8027566: Remove the old build system
ihse
parents: 21173
diff changeset
    85
	@($(CD) $(LANGTOOLS_TOPDIR)/make && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildLangtools.gmk)
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    86
	@$(call TargetExit)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    87
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    88
corba: langtools corba-only
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    89
corba-only: start-make
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    90
	@$(call TargetEnter)
21759
e24e22311718 8027566: Remove the old build system
ihse
parents: 21173
diff changeset
    91
	@($(CD) $(CORBA_TOPDIR)/make && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildCorba.gmk)
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    92
	@$(call TargetExit)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    93
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    94
jaxp: langtools jaxp-only
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    95
jaxp-only: start-make
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    96
	@$(call TargetEnter)
21759
e24e22311718 8027566: Remove the old build system
ihse
parents: 21173
diff changeset
    97
	@($(CD) $(JAXP_TOPDIR)/make && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJaxp.gmk)
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    98
	@$(call TargetExit)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    99
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   100
jaxws: langtools jaxp jaxws-only
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   101
jaxws-only: start-make
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   102
	@$(call TargetEnter)
21759
e24e22311718 8027566: Remove the old build system
ihse
parents: 21173
diff changeset
   103
	@($(CD) $(JAXWS_TOPDIR)/make && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJaxws.gmk)
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   104
	@$(call TargetExit)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   105
14378
0ef5d942b98e 8002028: build-infra: need no-hotspot partial build
tbell
parents: 14111
diff changeset
   106
ifeq ($(BUILD_HOTSPOT),true)
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20047
diff changeset
   107
  hotspot: hotspot-only
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20047
diff changeset
   108
  hotspot-only: start-make
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   109
	@$(call TargetEnter)
21759
e24e22311718 8027566: Remove the old build system
ihse
parents: 21173
diff changeset
   110
	@($(CD) $(SRC_ROOT)/make && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f HotspotWrapper.gmk)
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   111
	@$(call TargetExit)
14378
0ef5d942b98e 8002028: build-infra: need no-hotspot partial build
tbell
parents: 14111
diff changeset
   112
endif
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   113
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   114
jdk: langtools hotspot corba jaxp jaxws jdk-only
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   115
jdk-only: start-make
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   116
	@$(call TargetEnter)
21759
e24e22311718 8027566: Remove the old build system
ihse
parents: 21173
diff changeset
   117
	@($(CD) $(JDK_TOPDIR)/make && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk $(JDK_TARGET))
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   118
	@$(call TargetExit)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   119
15903
bc0e6cd9d760 8008914: Add nashorn to the tl build
jjg
parents: 15587
diff changeset
   120
nashorn: jdk nashorn-only
bc0e6cd9d760 8008914: Add nashorn to the tl build
jjg
parents: 15587
diff changeset
   121
nashorn-only: start-make
bc0e6cd9d760 8008914: Add nashorn to the tl build
jjg
parents: 15587
diff changeset
   122
	@$(call TargetEnter)
21759
e24e22311718 8027566: Remove the old build system
ihse
parents: 21173
diff changeset
   123
	@($(CD) $(NASHORN_TOPDIR)/make && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildNashorn.gmk)
15903
bc0e6cd9d760 8008914: Add nashorn to the tl build
jjg
parents: 15587
diff changeset
   124
	@$(call TargetExit)
bc0e6cd9d760 8008914: Add nashorn to the tl build
jjg
parents: 15587
diff changeset
   125
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   126
demos: jdk demos-only
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   127
demos-only: start-make
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   128
	@$(call TargetEnter)
21759
e24e22311718 8027566: Remove the old build system
ihse
parents: 21173
diff changeset
   129
	@($(CD) $(JDK_TOPDIR)/make && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk demos)
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   130
	@$(call TargetExit)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   131
15584
83a66923c332 8004265: Add build support for Compact Profiles
dholmes
parents: 15060
diff changeset
   132
# Note: This double-colon rule is intentional, to support
83a66923c332 8004265: Add build support for Compact Profiles
dholmes
parents: 15060
diff changeset
   133
# custom make file integration.
15903
bc0e6cd9d760 8008914: Add nashorn to the tl build
jjg
parents: 15587
diff changeset
   134
images:: source-tips demos nashorn images-only
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   135
images-only: start-make
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   136
	@$(call TargetEnter)
21759
e24e22311718 8027566: Remove the old build system
ihse
parents: 21173
diff changeset
   137
	@($(CD) $(JDK_TOPDIR)/make && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk images)
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   138
	@$(call TargetExit)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   139
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   140
overlay-images: source-tips demos overlay-images-only
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   141
overlay-images-only: start-make
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   142
	@$(call TargetEnter)
21759
e24e22311718 8027566: Remove the old build system
ihse
parents: 21173
diff changeset
   143
	@($(CD) $(JDK_TOPDIR)/make && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk overlay-images)
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   144
	@$(call TargetExit)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   145
15584
83a66923c332 8004265: Add build support for Compact Profiles
dholmes
parents: 15060
diff changeset
   146
profiles: profiles-oscheck source-tips jdk hotspot profiles-only
83a66923c332 8004265: Add build support for Compact Profiles
dholmes
parents: 15060
diff changeset
   147
profiles-only: start-make
83a66923c332 8004265: Add build support for Compact Profiles
dholmes
parents: 15060
diff changeset
   148
	@$(call TargetEnter)
21759
e24e22311718 8027566: Remove the old build system
ihse
parents: 21173
diff changeset
   149
	@($(CD) $(JDK_TOPDIR)/make && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk profiles)
15584
83a66923c332 8004265: Add build support for Compact Profiles
dholmes
parents: 15060
diff changeset
   150
	@$(call TargetExit)
83a66923c332 8004265: Add build support for Compact Profiles
dholmes
parents: 15060
diff changeset
   151
83a66923c332 8004265: Add build support for Compact Profiles
dholmes
parents: 15060
diff changeset
   152
profiles-oscheck:
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20047
diff changeset
   153
        ifneq ($(OPENJDK_TARGET_OS), linux)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20047
diff changeset
   154
	  @echo "Error: The Java SE 8 Compact Profiles are only implemented for Linux at this time" && exit 1
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20047
diff changeset
   155
        endif
15584
83a66923c332 8004265: Add build support for Compact Profiles
dholmes
parents: 15060
diff changeset
   156
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   157
install: images install-only
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   158
install-only: start-make
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   159
	@$(call TargetEnter)
21759
e24e22311718 8027566: Remove the old build system
ihse
parents: 21173
diff changeset
   160
	@($(CD) $(JDK_TOPDIR)/make && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk install)
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   161
	@$(call TargetExit)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   162
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   163
docs: jdk docs-only
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   164
docs-only: start-make
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   165
	@$(call TargetEnter)
21759
e24e22311718 8027566: Remove the old build system
ihse
parents: 21173
diff changeset
   166
	@($(CD) $(SRC_ROOT)/make && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f Javadoc.gmk docs)
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   167
	@$(call TargetExit)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   168
15057
6cdc13b4157e 8005355: build-infra: Java security signing (need a top-level make target).
erikj
parents: 15053
diff changeset
   169
sign-jars: jdk sign-jars-only
6cdc13b4157e 8005355: build-infra: Java security signing (need a top-level make target).
erikj
parents: 15053
diff changeset
   170
sign-jars-only: start-make
6cdc13b4157e 8005355: build-infra: Java security signing (need a top-level make target).
erikj
parents: 15053
diff changeset
   171
	@$(call TargetEnter)
21759
e24e22311718 8027566: Remove the old build system
ihse
parents: 21173
diff changeset
   172
	@($(CD) $(JDK_TOPDIR)/make && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk sign-jars)
15057
6cdc13b4157e 8005355: build-infra: Java security signing (need a top-level make target).
erikj
parents: 15053
diff changeset
   173
	@$(call TargetExit)
6cdc13b4157e 8005355: build-infra: Java security signing (need a top-level make target).
erikj
parents: 15053
diff changeset
   174
16578
7a35b47cb9e5 8006828: "SKIP_BOOT_CYCLE=false" must work in new building infrastructure
erikj
parents: 15911
diff changeset
   175
bootcycle-images: images bootcycle-images-only
7a35b47cb9e5 8006828: "SKIP_BOOT_CYCLE=false" must work in new building infrastructure
erikj
parents: 15911
diff changeset
   176
bootcycle-images-only: start-make
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   177
	@$(ECHO) Boot cycle build step 2: Building a new JDK image using previously built image
21759
e24e22311718 8027566: Remove the old build system
ihse
parents: 21173
diff changeset
   178
	@($(CD) $(SRC_ROOT) && $(BUILD_LOG_WRAPPER) $(MAKE) SPEC=$(dir $(SPEC))bootcycle-spec.gmk images)
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   179
15910
e57109801d9c 8009162: root repo "make test" target should run against image
mduigou
parents: 15903
diff changeset
   180
test: images test-only
e57109801d9c 8009162: root repo "make test" target should run against image
mduigou
parents: 15903
diff changeset
   181
test-only: start-make
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   182
	@$(call TargetEnter)
19520
527f461b65a3 8023491: Remove target names from test/Makefile and defer to sub-repo makefiles.
mduigou
parents: 18053
diff changeset
   183
	@($(CD) $(SRC_ROOT)/test && $(BUILD_LOG_WRAPPER) $(MAKE) -j1 -k MAKEFLAGS= JT_HOME=$(JT_HOME) PRODUCT_HOME=$(JDK_IMAGE_DIR) ALT_OUTPUTDIR=$(OUTPUT_ROOT) CONCURRENCY=$(JOBS) $(TEST)) || true
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   184
	@$(call TargetExit)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   185
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   186
# Stores the tips for each repository. This file is be used when constructing the jdk image and can be
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   187
# used to track the exact sources used to build that image.
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   188
source-tips: $(OUTPUT_ROOT)/source_tips
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   189
$(OUTPUT_ROOT)/source_tips: FRC
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   190
	@$(MKDIR) -p $(@D)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   191
	@$(RM) $@
18052
f326fa317a81 8012564: The SOURCE value in release file of JDK 8 doesn't contain valid changesets for some OS since b74
erikj
parents: 17664
diff changeset
   192
	@$(call GetSourceTips)
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   193
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   194
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   195
# Remove everything, except the output from configure.
16653
f7a6d4c675bb 8010267: Add test-clean for cleaning of testoutput directory from output directory. Add depedency on test-clean to clean
mduigou
parents: 15911
diff changeset
   196
clean: clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-jdk clean-nashorn clean-images clean-overlay-images clean-bootcycle-build clean-docs clean-test
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   197
	@($(CD) $(OUTPUT_ROOT) && $(RM) -r tmp source_tips build.log* build-trace*.log*)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   198
	@$(ECHO) Cleaned all build artifacts.
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   199
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   200
# Remove everything, including configure configuration.
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   201
# If the output directory was created by configure and now becomes empty, remove it as well.
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   202
# FIXME: tmp should not be here, fix ResetTimers instead. And remove spec.sh!
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   203
dist-clean: clean
19261
88c5871f519a 8023156: make dist-clean should remove javacservers directory
igerasim
parents: 18053
diff changeset
   204
	@($(CD) $(OUTPUT_ROOT) && $(RM) -r *spec.gmk config.* configure-arguments Makefile compare.sh spec.sh tmp javacservers)
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   205
	@$(if $(filter $(CONF_NAME),$(notdir $(OUTPUT_ROOT))), \
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20047
diff changeset
   206
	  if test "x`$(LS) $(OUTPUT_ROOT)`" != x; then \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20047
diff changeset
   207
	    $(ECHO) "Warning: Not removing non-empty configuration directory for '$(CONF_NAME)'" ; \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20047
diff changeset
   208
	  else \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20047
diff changeset
   209
	    ($(CD) $(SRC_ROOT) && $(ECHO) "Removing configuration directory for '$(CONF_NAME)'" && $(RM) -r $(OUTPUT_ROOT)) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20047
diff changeset
   210
	  fi \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20047
diff changeset
   211
	)
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   212
	@$(ECHO) Cleaned everything, you will have to re-run configure.
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   213
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   214
clean-langtools:
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   215
	$(call CleanComponent,langtools)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   216
clean-corba:
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   217
	$(call CleanComponent,corba)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   218
clean-jaxp:
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   219
	$(call CleanComponent,jaxp)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   220
clean-jaxws:
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   221
	$(call CleanComponent,jaxws)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   222
clean-hotspot:
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   223
	$(call CleanComponent,hotspot)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   224
clean-jdk:
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   225
	$(call CleanComponent,jdk)
15903
bc0e6cd9d760 8008914: Add nashorn to the tl build
jjg
parents: 15587
diff changeset
   226
clean-nashorn:
bc0e6cd9d760 8008914: Add nashorn to the tl build
jjg
parents: 15587
diff changeset
   227
	$(call CleanComponent,nashorn)
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   228
clean-images:
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   229
	$(call CleanComponent,images)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   230
clean-overlay-images:
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   231
	$(call CleanComponent,overlay-images)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   232
clean-bootcycle-build:
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   233
	$(call CleanComponent,bootcycle-build)
14466
2f85b948660b 8003844: build-infra: docs target isn't working properly
erikj
parents: 14378
diff changeset
   234
clean-docs:
2f85b948660b 8003844: build-infra: docs target isn't working properly
erikj
parents: 14378
diff changeset
   235
	$(call CleanComponent,docs)
2f85b948660b 8003844: build-infra: docs target isn't working properly
erikj
parents: 14378
diff changeset
   236
	$(call CleanComponent,docstemp)
16653
f7a6d4c675bb 8010267: Add test-clean for cleaning of testoutput directory from output directory. Add depedency on test-clean to clean
mduigou
parents: 15911
diff changeset
   237
clean-test:
f7a6d4c675bb 8010267: Add test-clean for cleaning of testoutput directory from output directory. Add depedency on test-clean to clean
mduigou
parents: 15911
diff changeset
   238
	$(call CleanComponent,testoutput)
22716
cf32fe2eb254 8034199: Add 'reconfigure' target for re-creating a configuration
ihse
parents: 22714
diff changeset
   239
	
cf32fe2eb254 8034199: Add 'reconfigure' target for re-creating a configuration
ihse
parents: 22714
diff changeset
   240
reconfigure:
cf32fe2eb254 8034199: Add 'reconfigure' target for re-creating a configuration
ihse
parents: 22714
diff changeset
   241
        ifneq ($(CONFIGURE_COMMAND_LINE), )
cf32fe2eb254 8034199: Add 'reconfigure' target for re-creating a configuration
ihse
parents: 22714
diff changeset
   242
	  @$(ECHO) "Re-running configure using arguments '$(CONFIGURE_COMMAND_LINE)'"
cf32fe2eb254 8034199: Add 'reconfigure' target for re-creating a configuration
ihse
parents: 22714
diff changeset
   243
        else
cf32fe2eb254 8034199: Add 'reconfigure' target for re-creating a configuration
ihse
parents: 22714
diff changeset
   244
	  @$(ECHO) "Re-running configure using default settings"
cf32fe2eb254 8034199: Add 'reconfigure' target for re-creating a configuration
ihse
parents: 22714
diff changeset
   245
        endif
22721
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22716
diff changeset
   246
	@( cd $(OUTPUT_ROOT) && $(BASH) $(TOPDIR)/configure $(CONFIGURE_COMMAND_LINE) )
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   247
17349
848f824ac538 8014269: Add missing .PHONY targets to Main.gmk
mduigou
parents: 16660
diff changeset
   248
.PHONY: langtools corba jaxp jaxws hotspot jdk nashorn images overlay-images install test docs
848f824ac538 8014269: Add missing .PHONY targets to Main.gmk
mduigou
parents: 16660
diff changeset
   249
.PHONY: langtools-only corba-only jaxp-only jaxws-only hotspot-only jdk-only nashorn-only images-only overlay-images-only install-only test-only docs-only
19527
0de984f85e10 8024155: Fix 'make CONF= <target>'
ihse
parents: 19261
diff changeset
   250
.PHONY: default all clean dist-clean bootcycle-images start-make
17349
848f824ac538 8014269: Add missing .PHONY targets to Main.gmk
mduigou
parents: 16660
diff changeset
   251
.PHONY: clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-jdk clean-nashorn clean-images clean-docs clean-test clean-overlay-images clean-bootcycle-build
15584
83a66923c332 8004265: Add build support for Compact Profiles
dholmes
parents: 15060
diff changeset
   252
.PHONY: profiles profiles-only profiles-oscheck
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   253
22031
ae288cbb4c28 8029797: Let jprt run configure when building
erikj
parents: 21759
diff changeset
   254
include $(root_dir)/make/Jprt.gmk
ae288cbb4c28 8029797: Let jprt run configure when building
erikj
parents: 21759
diff changeset
   255
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   256
FRC: # Force target