make/hotspot-rules.gmk
author ohair
Thu, 03 Sep 2009 17:44:28 -0700
changeset 3789 2040d99c6f14
parent 0 fd16c54261b3
child 3792 70d5ef4d28c5
permissions -rw-r--r--
6855174: Improve log output when builds transition from one workspace to another Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
     1
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
     2
# Copyright 2001-2007 Sun Microsystems, Inc.  All Rights Reserved.
fd16c54261b3 Initial load
duke
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
fd16c54261b3 Initial load
duke
parents:
diff changeset
     4
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
fd16c54261b3 Initial load
duke
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
fd16c54261b3 Initial load
duke
parents:
diff changeset
     7
# published by the Free Software Foundation.  Sun designates this
fd16c54261b3 Initial load
duke
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
fd16c54261b3 Initial load
duke
parents:
diff changeset
     9
# by Sun in the LICENSE file that accompanied this code.
fd16c54261b3 Initial load
duke
parents:
diff changeset
    10
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
fd16c54261b3 Initial load
duke
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
fd16c54261b3 Initial load
duke
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
fd16c54261b3 Initial load
duke
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
fd16c54261b3 Initial load
duke
parents:
diff changeset
    15
# accompanied this code).
fd16c54261b3 Initial load
duke
parents:
diff changeset
    16
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
fd16c54261b3 Initial load
duke
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
fd16c54261b3 Initial load
duke
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
fd16c54261b3 Initial load
duke
parents:
diff changeset
    20
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
    21
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
fd16c54261b3 Initial load
duke
parents:
diff changeset
    22
# CA 95054 USA or visit www.sun.com if you need additional information or
fd16c54261b3 Initial load
duke
parents:
diff changeset
    23
# have any questions.
fd16c54261b3 Initial load
duke
parents:
diff changeset
    24
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
    25
fd16c54261b3 Initial load
duke
parents:
diff changeset
    26
################################################################
fd16c54261b3 Initial load
duke
parents:
diff changeset
    27
# HOTSPOT TARGETS
fd16c54261b3 Initial load
duke
parents:
diff changeset
    28
################################################################
fd16c54261b3 Initial load
duke
parents:
diff changeset
    29
fd16c54261b3 Initial load
duke
parents:
diff changeset
    30
# All the output from a hotspot build should be re-located to the
fd16c54261b3 Initial load
duke
parents:
diff changeset
    31
#    build output area.
fd16c54261b3 Initial load
duke
parents:
diff changeset
    32
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
    33
HOTSPOT_OUTPUTDIR = $(HOTSPOT_DIR)/outputdir
fd16c54261b3 Initial load
duke
parents:
diff changeset
    34
fd16c54261b3 Initial load
duke
parents:
diff changeset
    35
# HOTSPOT_EXPORT_PATH points to a dir that contains files
fd16c54261b3 Initial load
duke
parents:
diff changeset
    36
# that are needed in an SDK build, in the same relative positions as
fd16c54261b3 Initial load
duke
parents:
diff changeset
    37
# these files are in an SDK image.
fd16c54261b3 Initial load
duke
parents:
diff changeset
    38
# The SDK java/redist/Makefile will copy files from HOTSPOT_EXPORT_PATH
fd16c54261b3 Initial load
duke
parents:
diff changeset
    39
# into the SDK being built.
fd16c54261b3 Initial load
duke
parents:
diff changeset
    40
# This is the export path supplied to the hotspot makefiles.
fd16c54261b3 Initial load
duke
parents:
diff changeset
    41
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
    42
HOTSPOT_EXPORT_PATH = $(HOTSPOT_DIR)/import
fd16c54261b3 Initial load
duke
parents:
diff changeset
    43
fd16c54261b3 Initial load
duke
parents:
diff changeset
    44
# Default targets
fd16c54261b3 Initial load
duke
parents:
diff changeset
    45
HOTSPOT = hotspot-sanity hotspot-build
fd16c54261b3 Initial load
duke
parents:
diff changeset
    46
fd16c54261b3 Initial load
duke
parents:
diff changeset
    47
hotspot:: $(HOTSPOT)
fd16c54261b3 Initial load
duke
parents:
diff changeset
    48
fd16c54261b3 Initial load
duke
parents:
diff changeset
    49
# Hotspot clobber removes the output directory and exported files
fd16c54261b3 Initial load
duke
parents:
diff changeset
    50
hotspot-clobber:: 
fd16c54261b3 Initial load
duke
parents:
diff changeset
    51
	$(RM) -r $(HOTSPOT_OUTPUTDIR)
fd16c54261b3 Initial load
duke
parents:
diff changeset
    52
	$(RM) -r $(HOTSPOT_EXPORT_PATH)
fd16c54261b3 Initial load
duke
parents:
diff changeset
    53
fd16c54261b3 Initial load
duke
parents:
diff changeset
    54
hotspot-sanity::
fd16c54261b3 Initial load
duke
parents:
diff changeset
    55
	@$(MKDIR) -p $(HOTSPOT_OUTPUTDIR)
fd16c54261b3 Initial load
duke
parents:
diff changeset
    56
	@$(MKDIR) -p $(HOTSPOT_EXPORT_PATH)
fd16c54261b3 Initial load
duke
parents:
diff changeset
    57
	@$(ECHO) "Hotspot Settings: \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
    58
	    "     HOTSPOT_BUILD_JOBS  = $(HOTSPOT_BUILD_JOBS) \n"  \
fd16c54261b3 Initial load
duke
parents:
diff changeset
    59
	    "     HOTSPOT_OUTPUTDIR   = $(HOTSPOT_OUTPUTDIR) \n"  \
fd16c54261b3 Initial load
duke
parents:
diff changeset
    60
	    "     HOTSPOT_EXPORT_PATH = $(HOTSPOT_EXPORT_PATH) \n"  \
fd16c54261b3 Initial load
duke
parents:
diff changeset
    61
	    "\n"  >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
    62
fd16c54261b3 Initial load
duke
parents:
diff changeset
    63
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
    64
# Basic hotspot build and export of it's files
fd16c54261b3 Initial load
duke
parents:
diff changeset
    65
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
    66
fd16c54261b3 Initial load
duke
parents:
diff changeset
    67
HOTSPOT_TARGET = all_product
fd16c54261b3 Initial load
duke
parents:
diff changeset
    68
ifeq ($(DEBUG_NAME), debug)
fd16c54261b3 Initial load
duke
parents:
diff changeset
    69
  HOTSPOT_TARGET = all_debug
fd16c54261b3 Initial load
duke
parents:
diff changeset
    70
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
    71
ifeq ($(DEBUG_NAME), fastdebug)
fd16c54261b3 Initial load
duke
parents:
diff changeset
    72
  HOTSPOT_TARGET = all_fastdebug
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
HOTSPOT_BUILD_ARGUMENTS += $(COMMON_BUILD_ARGUMENTS)
fd16c54261b3 Initial load
duke
parents:
diff changeset
    76
HOTSPOT_BUILD_ARGUMENTS += ALT_OUTPUTDIR=$(HOTSPOT_OUTPUTDIR)
fd16c54261b3 Initial load
duke
parents:
diff changeset
    77
HOTSPOT_BUILD_ARGUMENTS += ALT_EXPORT_PATH=$(HOTSPOT_EXPORT_PATH)
fd16c54261b3 Initial load
duke
parents:
diff changeset
    78
fd16c54261b3 Initial load
duke
parents:
diff changeset
    79
# Why do these need to be passed in? Because of windows nmake? and MAKEFLAGS=?
fd16c54261b3 Initial load
duke
parents:
diff changeset
    80
#   Or is there something wrong with hotspot/make/Makefile?
fd16c54261b3 Initial load
duke
parents:
diff changeset
    81
HOTSPOT_BUILD_ARGUMENTS += ALT_SLASH_JAVA=$(SLASH_JAVA)
fd16c54261b3 Initial load
duke
parents:
diff changeset
    82
HOTSPOT_BUILD_ARGUMENTS += ALT_BOOTDIR=$(BOOTDIR)
fd16c54261b3 Initial load
duke
parents:
diff changeset
    83
fd16c54261b3 Initial load
duke
parents:
diff changeset
    84
ifeq ($(BUILD_LANGTOOLS), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
    85
  HOTSPOT_BUILD_ARGUMENTS += ALT_LANGTOOLS_DIST=$(ABS_LANGTOOLS_DIST)
fd16c54261b3 Initial load
duke
parents:
diff changeset
    86
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
    87
fd16c54261b3 Initial load
duke
parents:
diff changeset
    88
hotspot-build::
fd16c54261b3 Initial load
duke
parents:
diff changeset
    89
	$(MKDIR) -p $(HOTSPOT_OUTPUTDIR)
fd16c54261b3 Initial load
duke
parents:
diff changeset
    90
	$(MKDIR) -p $(HOTSPOT_EXPORT_PATH)
3789
2040d99c6f14 6855174: Improve log output when builds transition from one workspace to another
ohair
parents: 0
diff changeset
    91
	@$(call MakeStart, hotspot, $(HOTSPOT_TARGET))
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
    92
	$(CD) $(HOTSPOT_TOPDIR)/make && \
fd16c54261b3 Initial load
duke
parents:
diff changeset
    93
	    $(MAKE) $(HOTSPOT_BUILD_ARGUMENTS) $(HOTSPOT_TARGET)
3789
2040d99c6f14 6855174: Improve log output when builds transition from one workspace to another
ohair
parents: 0
diff changeset
    94
	@$(call MakeFinish, hotspot, $(HOTSPOT_TARGET))
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
    95
fd16c54261b3 Initial load
duke
parents:
diff changeset
    96
#####################
fd16c54261b3 Initial load
duke
parents:
diff changeset
    97
# .PHONY
fd16c54261b3 Initial load
duke
parents:
diff changeset
    98
#####################
fd16c54261b3 Initial load
duke
parents:
diff changeset
    99
.PHONY: hotspot-build hotspot-clobber hotspot-sanity
fd16c54261b3 Initial load
duke
parents:
diff changeset
   100