common/makefiles/Main.gmk
author duke
Wed, 05 Jul 2017 18:28:52 +0200
changeset 14355 dbff70aaaac3
parent 14111 2a82ecb35fc7
child 14378 0ef5d942b98e
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
     1
#
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
     2
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
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
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    31
# Load the vital tools for all the makefiles. 
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    32
include $(SRC_ROOT)/common/makefiles/MakeBase.gmk
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    33
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    34
# Include the corresponding custom file, if present.
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    35
-include $(CUSTOM_MAKE_DIR)/Main.gmk
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))
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    41
    ifneq (,$(BUILD_LOG_PREVIOUS))
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    42
        # Rotate old log
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    43
        $(shell $(RM) $(BUILD_LOG_PREVIOUS) 2> /dev/null)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    44
        $(shell $(MV) $(BUILD_LOG) $(BUILD_LOG_PREVIOUS) 2> /dev/null)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    45
    else
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    46
        $(shell $(RM) $(BUILD_LOG) 2> /dev/null)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    47
    endif
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    48
    $(shell $(RM) $(OUTPUT_ROOT)/build-trace-time.log 2> /dev/null)
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))
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    53
    $(shell $(MKDIR) -p $(SJAVAC_SERVER_DIR) && $(RM) -rf $(SJAVAC_SERVER_DIR)/*)
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
ifeq ($(JOBS),)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    62
    JOBS=$(NUM_CORES)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    63
endif
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    64
MAKE_ARGS:=$(MAKE_ARGS) -j$(JOBS)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    65
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    66
### Main targets
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    67
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    68
all: jdk
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    69
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    70
start-make:
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    71
	@$(call AtMakeStart)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    72
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    73
langtools: langtools-only
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    74
langtools-only: start-make
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    75
	@$(call TargetEnter)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    76
	@($(CD) $(LANGTOOLS_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildLangtools.gmk)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    77
	@$(call TargetExit)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    78
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    79
corba: langtools corba-only
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    80
corba-only: start-make
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    81
	@$(call TargetEnter)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    82
	@($(CD) $(CORBA_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildCorba.gmk)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    83
	@$(call TargetExit)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    84
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    85
jaxp: langtools jaxp-only
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    86
jaxp-only: start-make
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    87
	@$(call TargetEnter)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    88
	@($(CD) $(JAXP_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJaxp.gmk)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    89
	@$(call TargetExit)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    90
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    91
jaxws: langtools jaxp jaxws-only
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    92
jaxws-only: start-make
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    93
	@$(call TargetEnter)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    94
	@($(CD) $(JAXWS_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJaxws.gmk)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    95
	@$(call TargetExit)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    96
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    97
hotspot: hotspot-only
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    98
hotspot-only: start-make
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
    99
	@$(call TargetEnter)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   100
	@($(CD) $(SRC_ROOT)/common/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f HotspotWrapper.gmk)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   101
	@$(call TargetExit)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   102
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   103
jdk: langtools hotspot corba jaxp jaxws jdk-only
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   104
jdk-only: start-make
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   105
	@$(call TargetEnter)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   106
	@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk $(JDK_TARGET))
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   107
	@$(call TargetExit)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   108
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   109
demos: jdk demos-only
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   110
demos-only: start-make
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   111
	@$(call TargetEnter)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   112
	@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk demos)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   113
	@$(call TargetExit)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   114
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   115
images: source-tips demos images-only
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   116
images-only: start-make
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   117
	@$(call TargetEnter)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   118
	@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk images)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   119
	@$(call TargetExit)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   120
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   121
overlay-images: source-tips demos overlay-images-only
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   122
overlay-images-only: start-make
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   123
	@$(call TargetEnter)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   124
	@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk overlay-images)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   125
	@$(call TargetExit)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   126
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   127
bundles: images bundles-only
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   128
bundles-only: start-make
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   129
	@$(call TargetEnter)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   130
	@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk bundles)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   131
	@$(call TargetExit)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   132
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   133
install: images install-only
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   134
install-only: start-make
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   135
	@$(call TargetEnter)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   136
	@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk install)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   137
	@$(call TargetExit)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   138
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   139
docs: jdk docs-only
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   140
docs-only: start-make
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   141
	@$(call TargetEnter)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   142
	@($(CD) $(SRC_ROOT)/common/makefiles/javadoc && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f Javadoc.gmk docs)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   143
	@$(call TargetExit)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   144
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   145
bootcycle-images:
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   146
	@$(ECHO) Boot cycle build step 1: Building the JDK image normally
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   147
	@($(CD) $(SRC_ROOT)/common/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) SPEC=$(SPEC) images)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   148
	@$(ECHO) Boot cycle build step 2: Building a new JDK image using previously built image
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   149
	@($(CD) $(SRC_ROOT)/common/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) SPEC=$(dir $(SPEC))bootcycle-spec.gmk images)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   150
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   151
test: start-make
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   152
	@$(call TargetEnter)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   153
	@($(CD) $(SRC_ROOT)/test && $(BUILD_LOG_WRAPPER) $(MAKE) MAKEFLAGS= -j1 PRODUCT_HOME=$(OUTPUT_ROOT)/jdk JPRT_JAVA_HOME=$(OUTPUT_ROOT)/jdk ALT_OUTPUTDIR=$(OUTPUT_ROOT) $(TEST)) || true
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   154
	@$(call TargetExit)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   155
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   156
# 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
   157
# used to track the exact sources used to build that image.
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   158
source-tips: $(OUTPUT_ROOT)/source_tips
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   159
$(OUTPUT_ROOT)/source_tips: FRC
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   160
	@$(MKDIR) -p $(@D)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   161
	@$(RM) $@
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   162
	@$(if $(HG),$(call GetSourceTips),$(ECHO) "hg not installed" > $@)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   163
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   164
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   165
# Remove everything, except the output from configure.
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   166
clean: clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-jdk clean-images clean-overlay-images clean-bootcycle-build
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   167
	@($(CD) $(OUTPUT_ROOT) && $(RM) -r tmp source_tips build.log* build-trace*.log*)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   168
	@$(ECHO) Cleaned all build artifacts.
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   169
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   170
# Remove everything, including configure configuration.
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   171
# 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
   172
# FIXME: tmp should not be here, fix ResetTimers instead. And remove spec.sh!
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   173
dist-clean: clean
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   174
	@($(CD) $(OUTPUT_ROOT) && $(RM) -r *spec.gmk config.* configure-arguments Makefile compare.sh spec.sh tmp)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   175
	@$(if $(filter $(CONF_NAME),$(notdir $(OUTPUT_ROOT))), \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   176
    if test "x`$(LS) $(OUTPUT_ROOT)`" != x; then \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   177
        $(ECHO) "Warning: Not removing non-empty configuration directory for '$(CONF_NAME)'" ;\
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   178
    else \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   179
        ($(CD) $(SRC_ROOT) && $(ECHO) "Removing configuration directory for '$(CONF_NAME)'" && $(RM) -r $(OUTPUT_ROOT)) \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   180
    fi \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   181
  )
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   182
	@$(ECHO) Cleaned everything, you will have to re-run configure.
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   183
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   184
clean-langtools:
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   185
	$(call CleanComponent,langtools)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   186
clean-corba:
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   187
	$(call CleanComponent,corba)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   188
clean-jaxp:
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   189
	$(call CleanComponent,jaxp)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   190
clean-jaxws:
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   191
	$(call CleanComponent,jaxws)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   192
clean-hotspot:
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   193
	$(call CleanComponent,hotspot)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   194
clean-jdk:
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   195
	$(call CleanComponent,jdk)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   196
clean-images:
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   197
	$(call CleanComponent,images)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   198
clean-overlay-images:
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   199
	$(call CleanComponent,overlay-images)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   200
clean-bootcycle-build:
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   201
	$(call CleanComponent,bootcycle-build)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   202
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   203
.PHONY: langtools corba jaxp jaxws hotspot jdk images overlay-images install
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   204
.PHONY: langtools-only corba-only jaxp-only jaxws-only hotspot-only jdk-only images-only overlay-images-only install-only
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   205
.PHONY: all test clean dist-clean bootcycle-images start-make
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   206
.PHONY: clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-jdk clean-images clean-overlay-images clean-bootcycle-build
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   207
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents:
diff changeset
   208
FRC: # Force target