corba/make/common/Defs.gmk
author johnc
Mon, 21 Nov 2011 09:24:56 -0800
changeset 11171 02c21e3d0a66
parent 8211 be492c799c8a
permissions -rw-r--r--
7110173: GCNotifier::pushNotification publishes stale data. Summary: GCNotifier::pushNotification() references GCMemoryManager::_last_gc_stat but is called from GCMemoryManager::gc_end() before GCMemoryManager::_last_gc_stat is set up using the values in GCMemoryManager::_current_gc_stat. As a result the GC notification code accesses unitialized or stale data. Move the notification call after GCMemoryManager::_las_gc_stat is set, but inside the same if-block. Reviewed-by: poonam, dholmes, fparain, mchung
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4
02bb8761fcce Initial load
duke
parents:
diff changeset
     1
#
8211
be492c799c8a 7014477: pt_BR corba resource bundle is missing in jdk7 build
mfang
parents: 7672
diff changeset
     2
# Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
4
02bb8761fcce Initial load
duke
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
02bb8761fcce Initial load
duke
parents:
diff changeset
     4
#
02bb8761fcce Initial load
duke
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
02bb8761fcce Initial load
duke
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
5555
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 3871
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
4
02bb8761fcce Initial load
duke
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
5555
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 3871
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
4
02bb8761fcce Initial load
duke
parents:
diff changeset
    10
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
02bb8761fcce Initial load
duke
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
02bb8761fcce Initial load
duke
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
02bb8761fcce Initial load
duke
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
02bb8761fcce Initial load
duke
parents:
diff changeset
    15
# accompanied this code).
02bb8761fcce Initial load
duke
parents:
diff changeset
    16
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
02bb8761fcce Initial load
duke
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
02bb8761fcce Initial load
duke
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
02bb8761fcce Initial load
duke
parents:
diff changeset
    20
#
5555
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 3871
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 3871
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 3871
diff changeset
    23
# questions.
4
02bb8761fcce Initial load
duke
parents:
diff changeset
    24
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    25
02bb8761fcce Initial load
duke
parents:
diff changeset
    26
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    27
# Common variables used by all the Java makefiles.  This file should
02bb8761fcce Initial load
duke
parents:
diff changeset
    28
# not contain rules.
02bb8761fcce Initial load
duke
parents:
diff changeset
    29
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    30
02bb8761fcce Initial load
duke
parents:
diff changeset
    31
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    32
# On Solaris, the 'make' utility from Sun will not work with these makefiles.
02bb8761fcce Initial load
duke
parents:
diff changeset
    33
#    This little rule is only understood by Sun's make, and is harmless
02bb8761fcce Initial load
duke
parents:
diff changeset
    34
#    when seen by the GNU make tool. If using Sun's make, this causes the
02bb8761fcce Initial load
duke
parents:
diff changeset
    35
#    make command to fail.
02bb8761fcce Initial load
duke
parents:
diff changeset
    36
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    37
SUN_MAKE_TEST:sh = echo "ERROR: PLEASE USE GNU VERSION OF MAKE"; exit 33
02bb8761fcce Initial load
duke
parents:
diff changeset
    38
02bb8761fcce Initial load
duke
parents:
diff changeset
    39
include $(BUILDDIR)/common/shared/Platform.gmk
02bb8761fcce Initial load
duke
parents:
diff changeset
    40
02bb8761fcce Initial load
duke
parents:
diff changeset
    41
TOPDIR=$(BUILDDIR)/..
02bb8761fcce Initial load
duke
parents:
diff changeset
    42
02bb8761fcce Initial load
duke
parents:
diff changeset
    43
include $(TOPDIR)/make/common/CancelImplicits.gmk
02bb8761fcce Initial load
duke
parents:
diff changeset
    44
02bb8761fcce Initial load
duke
parents:
diff changeset
    45
# Historically PLATFORM_SRC used to be src/$(PLATFORM), but we switched it to
02bb8761fcce Initial load
duke
parents:
diff changeset
    46
# src/solaris so if you want to build on Linux you didn't need a src/linux
02bb8761fcce Initial load
duke
parents:
diff changeset
    47
# directory.  In an ideal world it would be called src/genunix but we are not
02bb8761fcce Initial load
duke
parents:
diff changeset
    48
# there yet.
02bb8761fcce Initial load
duke
parents:
diff changeset
    49
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    50
ifndef SHARE_SRC
02bb8761fcce Initial load
duke
parents:
diff changeset
    51
  SHARE_SRC    = $(TOPDIR)/src/share
02bb8761fcce Initial load
duke
parents:
diff changeset
    52
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
    53
02bb8761fcce Initial load
duke
parents:
diff changeset
    54
_OUTPUTDIR=$(TOPDIR)/build/$(PLATFORM)-$(ARCH)
02bb8761fcce Initial load
duke
parents:
diff changeset
    55
02bb8761fcce Initial load
duke
parents:
diff changeset
    56
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    57
# Get platform definitions
02bb8761fcce Initial load
duke
parents:
diff changeset
    58
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    59
02bb8761fcce Initial load
duke
parents:
diff changeset
    60
include $(TOPDIR)/make/common/Defs-$(PLATFORM).gmk
02bb8761fcce Initial load
duke
parents:
diff changeset
    61
02bb8761fcce Initial load
duke
parents:
diff changeset
    62
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    63
# Localizations for the different parts of the product beyond English
02bb8761fcce Initial load
duke
parents:
diff changeset
    64
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    65
8211
be492c799c8a 7014477: pt_BR corba resource bundle is missing in jdk7 build
mfang
parents: 7672
diff changeset
    66
JRE_LOCALES   = de es fr it ja ko pt_BR sv zh_CN zh_TW zh_HK
be492c799c8a 7014477: pt_BR corba resource bundle is missing in jdk7 build
mfang
parents: 7672
diff changeset
    67
PLUGIN_LOCALES = de es fr it ja ko pt_BR sv zh_CN zh_TW zh_HK
4
02bb8761fcce Initial load
duke
parents:
diff changeset
    68
JDK_LOCALES  = ja zh_CN
02bb8761fcce Initial load
duke
parents:
diff changeset
    69
02bb8761fcce Initial load
duke
parents:
diff changeset
    70
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    71
# A list of locales we support but don't have resource files.
02bb8761fcce Initial load
duke
parents:
diff changeset
    72
# This is defined to optimize the search of resource bundles.
02bb8761fcce Initial load
duke
parents:
diff changeset
    73
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    74
JRE_NONEXIST_LOCALES = en en_US de_DE es_ES fr_FR it_IT ja_JP ko_KR sv_SE zh
02bb8761fcce Initial load
duke
parents:
diff changeset
    75
02bb8761fcce Initial load
duke
parents:
diff changeset
    76
LIBDIR              = $(OUTPUTDIR)/lib
02bb8761fcce Initial load
duke
parents:
diff changeset
    77
ABS_LIBDIR          = $(ABS_OUTPUTDIR)/lib
02bb8761fcce Initial load
duke
parents:
diff changeset
    78
# for ext jre files
02bb8761fcce Initial load
duke
parents:
diff changeset
    79
EXTDIR              = $(LIBDIR)/ext
02bb8761fcce Initial load
duke
parents:
diff changeset
    80
# for generated class files
02bb8761fcce Initial load
duke
parents:
diff changeset
    81
CLASSBINDIR         = $(OUTPUTDIR)/classes
02bb8761fcce Initial load
duke
parents:
diff changeset
    82
DEMOCLASSDIR        = $(OUTPUTDIR)/democlasses
02bb8761fcce Initial load
duke
parents:
diff changeset
    83
# for generated tool class files
02bb8761fcce Initial load
duke
parents:
diff changeset
    84
BUILDTOOLCLASSDIR   = $(OUTPUTDIR)/btclasses
02bb8761fcce Initial load
duke
parents:
diff changeset
    85
# for build tool jar files
02bb8761fcce Initial load
duke
parents:
diff changeset
    86
BUILDTOOLJARDIR     = $(OUTPUTDIR)/btjars
02bb8761fcce Initial load
duke
parents:
diff changeset
    87
ABS_BUILDTOOLJARDIR = $(ABS_OUTPUTDIR)/btjars
02bb8761fcce Initial load
duke
parents:
diff changeset
    88
# for generated java source files
02bb8761fcce Initial load
duke
parents:
diff changeset
    89
GENSRCDIR           = $(OUTPUTDIR)/gensrc
02bb8761fcce Initial load
duke
parents:
diff changeset
    90
# for imported source files
02bb8761fcce Initial load
duke
parents:
diff changeset
    91
IMPORTSRCDIR        = $(OUTPUTDIR)/impsrc
02bb8761fcce Initial load
duke
parents:
diff changeset
    92
# for imported documents
02bb8761fcce Initial load
duke
parents:
diff changeset
    93
IMPORTDOCDIR        = $(OUTPUTDIR)/impdoc
02bb8761fcce Initial load
duke
parents:
diff changeset
    94
# for generated demo
02bb8761fcce Initial load
duke
parents:
diff changeset
    95
DEMODIR             = $(OUTPUTDIR)/demo
02bb8761fcce Initial load
duke
parents:
diff changeset
    96
# for sample code
02bb8761fcce Initial load
duke
parents:
diff changeset
    97
SAMPLEDIR           = $(OUTPUTDIR)/sample
02bb8761fcce Initial load
duke
parents:
diff changeset
    98
# for generated documentation
02bb8761fcce Initial load
duke
parents:
diff changeset
    99
DOCSDIR             = $(OUTPUTDIR)/docs$(DOCSDIRSUFFIX)
02bb8761fcce Initial load
duke
parents:
diff changeset
   100
DOCSDIRSUFFIX       =
02bb8761fcce Initial load
duke
parents:
diff changeset
   101
02bb8761fcce Initial load
duke
parents:
diff changeset
   102
# An attempt is made to generate unique enough directories for the
02bb8761fcce Initial load
duke
parents:
diff changeset
   103
# generated files to not have name collisisons. Most build units
02bb8761fcce Initial load
duke
parents:
diff changeset
   104
# defines PRODUCT (except Release.gmk), but then they may or may 
02bb8761fcce Initial load
duke
parents:
diff changeset
   105
# not define PACKAGE, THREADIR (only HPI uses this), PROGRAM, and 
02bb8761fcce Initial load
duke
parents:
diff changeset
   106
# LIBRARY. This code chunk attempts to generate a unique 
02bb8761fcce Initial load
duke
parents:
diff changeset
   107
# OBJDIR/CLASSHDRDIR for each build unit based on which of those 
02bb8761fcce Initial load
duke
parents:
diff changeset
   108
# values are set within each build unit.
02bb8761fcce Initial load
duke
parents:
diff changeset
   109
02bb8761fcce Initial load
duke
parents:
diff changeset
   110
UNIQUE_LOCATION_STRING = tmp
02bb8761fcce Initial load
duke
parents:
diff changeset
   111
02bb8761fcce Initial load
duke
parents:
diff changeset
   112
ifneq ($(PRODUCT),)
02bb8761fcce Initial load
duke
parents:
diff changeset
   113
  UNIQUE_LOCATION_STRING += /$(PRODUCT)
02bb8761fcce Initial load
duke
parents:
diff changeset
   114
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   115
02bb8761fcce Initial load
duke
parents:
diff changeset
   116
ifneq ($(PACKAGE),)
02bb8761fcce Initial load
duke
parents:
diff changeset
   117
  UNIQUE_LOCATION_STRING += /$(PACKAGE)
02bb8761fcce Initial load
duke
parents:
diff changeset
   118
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   119
02bb8761fcce Initial load
duke
parents:
diff changeset
   120
ifneq ($(PROGRAM),)
02bb8761fcce Initial load
duke
parents:
diff changeset
   121
  UNIQUE_LOCATION_STRING += /$(PROGRAM)
02bb8761fcce Initial load
duke
parents:
diff changeset
   122
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   123
02bb8761fcce Initial load
duke
parents:
diff changeset
   124
ifneq ($(LIBRARY),)
02bb8761fcce Initial load
duke
parents:
diff changeset
   125
  ifneq ($(LIBRARY_OUTPUT),)
02bb8761fcce Initial load
duke
parents:
diff changeset
   126
    UNIQUE_LOCATION_STRING += /$(LIBRARY_OUTPUT)
02bb8761fcce Initial load
duke
parents:
diff changeset
   127
  else
02bb8761fcce Initial load
duke
parents:
diff changeset
   128
    UNIQUE_LOCATION_STRING += /$(LIBRARY)
02bb8761fcce Initial load
duke
parents:
diff changeset
   129
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   130
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   131
02bb8761fcce Initial load
duke
parents:
diff changeset
   132
ifneq ($(THREADDIR),)
02bb8761fcce Initial load
duke
parents:
diff changeset
   133
  UNIQUE_LOCATION_STRING += /$(THREADDIR)
02bb8761fcce Initial load
duke
parents:
diff changeset
   134
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   135
02bb8761fcce Initial load
duke
parents:
diff changeset
   136
# the use of += above makes a space separated list which we need to 
02bb8761fcce Initial load
duke
parents:
diff changeset
   137
# remove for filespecs.
02bb8761fcce Initial load
duke
parents:
diff changeset
   138
#
02bb8761fcce Initial load
duke
parents:
diff changeset
   139
NULLSTRING :=
02bb8761fcce Initial load
duke
parents:
diff changeset
   140
ONESPACE := $(NULLSTRING) # space before this comment is required.
02bb8761fcce Initial load
duke
parents:
diff changeset
   141
UNIQUE_PATH = $(subst $(ONESPACE),,$(UNIQUE_LOCATION_STRING))
02bb8761fcce Initial load
duke
parents:
diff changeset
   142
02bb8761fcce Initial load
duke
parents:
diff changeset
   143
# TEMPDIR is a unique general purpose directory
02bb8761fcce Initial load
duke
parents:
diff changeset
   144
# need to use 'override' because GNU Make on Linux exports the wrong
02bb8761fcce Initial load
duke
parents:
diff changeset
   145
# value.
02bb8761fcce Initial load
duke
parents:
diff changeset
   146
override TEMPDIR      = $(OUTPUTDIR)/$(UNIQUE_PATH)
02bb8761fcce Initial load
duke
parents:
diff changeset
   147
override ABS_TEMPDIR  = $(ABS_OUTPUTDIR)/$(UNIQUE_PATH)
02bb8761fcce Initial load
duke
parents:
diff changeset
   148
02bb8761fcce Initial load
duke
parents:
diff changeset
   149
# This must be created right away for pattern rules in Sanity.gmk to work.
02bb8761fcce Initial load
duke
parents:
diff changeset
   150
dummy1:=$(shell $(MKDIR) -p $(TEMPDIR))
02bb8761fcce Initial load
duke
parents:
diff changeset
   151
dummy2:=$(shell $(MKDIR) -p $(TEMP_DISK))
02bb8761fcce Initial load
duke
parents:
diff changeset
   152
02bb8761fcce Initial load
duke
parents:
diff changeset
   153
#
02bb8761fcce Initial load
duke
parents:
diff changeset
   154
# CLASSDESTDIR can be used to specify the directory where generated classes
02bb8761fcce Initial load
duke
parents:
diff changeset
   155
# are to be placed. The default is CLASSBINDIR.
02bb8761fcce Initial load
duke
parents:
diff changeset
   156
#
02bb8761fcce Initial load
duke
parents:
diff changeset
   157
ifndef CLASSDESTDIR
02bb8761fcce Initial load
duke
parents:
diff changeset
   158
CLASSDESTDIR = $(CLASSBINDIR)
02bb8761fcce Initial load
duke
parents:
diff changeset
   159
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   160
02bb8761fcce Initial load
duke
parents:
diff changeset
   161
#
02bb8761fcce Initial load
duke
parents:
diff changeset
   162
# vpaths.  These are the default locations searched for source files.
02bb8761fcce Initial load
duke
parents:
diff changeset
   163
# GNUmakefiles of individual areas often override the default settings.
02bb8761fcce Initial load
duke
parents:
diff changeset
   164
# There are no longer default vpath entries for C and assembler files
02bb8761fcce Initial load
duke
parents:
diff changeset
   165
# so we can ensure that libraries don't get their hands on JVM files.
02bb8761fcce Initial load
duke
parents:
diff changeset
   166
#
02bb8761fcce Initial load
duke
parents:
diff changeset
   167
# We define an intermediate variable for Java files because
02bb8761fcce Initial load
duke
parents:
diff changeset
   168
# we use its value later to help define $SOURCEPATH
02bb8761fcce Initial load
duke
parents:
diff changeset
   169
02bb8761fcce Initial load
duke
parents:
diff changeset
   170
VPATH0.java = $(GENSRCDIR)$(CLASSPATH_SEPARATOR)$(PLATFORM_SRC)/classes$(CLASSPATH_SEPARATOR)$(SHARE_SRC)/classes
02bb8761fcce Initial load
duke
parents:
diff changeset
   171
VPATH.java = $(VPATH0.java)
02bb8761fcce Initial load
duke
parents:
diff changeset
   172
vpath %.java $(VPATH.java)
02bb8761fcce Initial load
duke
parents:
diff changeset
   173
vpath %.class $(CLASSBINDIR)
02bb8761fcce Initial load
duke
parents:
diff changeset
   174
02bb8761fcce Initial load
duke
parents:
diff changeset
   175
#
02bb8761fcce Initial load
duke
parents:
diff changeset
   176
# Classpath seen by javac (different from the one seen by the VM
02bb8761fcce Initial load
duke
parents:
diff changeset
   177
# running javac), and useful variables.
02bb8761fcce Initial load
duke
parents:
diff changeset
   178
#
02bb8761fcce Initial load
duke
parents:
diff changeset
   179
SOURCEPATH	= $(VPATH.java)
02bb8761fcce Initial load
duke
parents:
diff changeset
   180
PKG		= $(shell $(EXPR) $(PACKAGE) : '\([a-z]*\)')
02bb8761fcce Initial load
duke
parents:
diff changeset
   181
PKGDIR		= $(subst .,/,$(PACKAGE))
02bb8761fcce Initial load
duke
parents:
diff changeset
   182
02bb8761fcce Initial load
duke
parents:
diff changeset
   183
#
02bb8761fcce Initial load
duke
parents:
diff changeset
   184
# The java/javac/jdk variables (JAVAC_CMD, JAVA_CMD, etc.)
02bb8761fcce Initial load
duke
parents:
diff changeset
   185
#
02bb8761fcce Initial load
duke
parents:
diff changeset
   186
include $(BUILDDIR)/common/shared/Defs-java.gmk
02bb8761fcce Initial load
duke
parents:
diff changeset
   187
02bb8761fcce Initial load
duke
parents:
diff changeset
   188
#
02bb8761fcce Initial load
duke
parents:
diff changeset
   189
# Set opt level to ALT_OPT if set otherwise _OPT
02bb8761fcce Initial load
duke
parents:
diff changeset
   190
#
02bb8761fcce Initial load
duke
parents:
diff changeset
   191
POPT = $(_OPT$(ALT_OPT))$(ALT_OPT)
02bb8761fcce Initial load
duke
parents:
diff changeset
   192
02bb8761fcce Initial load
duke
parents:
diff changeset
   193
#
02bb8761fcce Initial load
duke
parents:
diff changeset
   194
# Convenient macros
02bb8761fcce Initial load
duke
parents:
diff changeset
   195
#
02bb8761fcce Initial load
duke
parents:
diff changeset
   196
02bb8761fcce Initial load
duke
parents:
diff changeset
   197
# Prepare $@ target, remove old one and making sure directory exists
02bb8761fcce Initial load
duke
parents:
diff changeset
   198
define prep-target
02bb8761fcce Initial load
duke
parents:
diff changeset
   199
$(MKDIR) -p $(@D)
02bb8761fcce Initial load
duke
parents:
diff changeset
   200
$(RM) $@
02bb8761fcce Initial load
duke
parents:
diff changeset
   201
endef
02bb8761fcce Initial load
duke
parents:
diff changeset
   202
02bb8761fcce Initial load
duke
parents:
diff changeset
   203
# Simple install of $< file to $@
02bb8761fcce Initial load
duke
parents:
diff changeset
   204
define install-file
02bb8761fcce Initial load
duke
parents:
diff changeset
   205
$(prep-target)
02bb8761fcce Initial load
duke
parents:
diff changeset
   206
$(CP) $< $@
02bb8761fcce Initial load
duke
parents:
diff changeset
   207
endef
02bb8761fcce Initial load
duke
parents:
diff changeset
   208
02bb8761fcce Initial load
duke
parents:
diff changeset
   209
# Cleanup rule for after debug java run (hotspot.log file is left around)
02bb8761fcce Initial load
duke
parents:
diff changeset
   210
#   (This could be an old leftover file in a read-only area, use the @- prefix)
02bb8761fcce Initial load
duke
parents:
diff changeset
   211
HOTSPOT_LOG_NAME = hotspot.log
02bb8761fcce Initial load
duke
parents:
diff changeset
   212
define java-vm-cleanup
02bb8761fcce Initial load
duke
parents:
diff changeset
   213
if [ -w $(HOTSPOT_LOG_NAME) ] ; then $(RM) $(HOTSPOT_LOG_NAME); fi
02bb8761fcce Initial load
duke
parents:
diff changeset
   214
endef
02bb8761fcce Initial load
duke
parents:
diff changeset
   215
02bb8761fcce Initial load
duke
parents:
diff changeset
   216
# Default make settings for processing SUBDIRS with clobber or clean names
02bb8761fcce Initial load
duke
parents:
diff changeset
   217
SUBDIRS_MAKEFLAGS-clobber = INCREMENTAL_BUILD=false
02bb8761fcce Initial load
duke
parents:
diff changeset
   218
SUBDIRS_MAKEFLAGS-clean   = INCREMENTAL_BUILD=false
02bb8761fcce Initial load
duke
parents:
diff changeset
   219
02bb8761fcce Initial load
duke
parents:
diff changeset
   220
# Given a SUBDIRS list, cd into them and make them
02bb8761fcce Initial load
duke
parents:
diff changeset
   221
#   SUBDIRS_MAKEFLAGS      Make settings for a subdir make
02bb8761fcce Initial load
duke
parents:
diff changeset
   222
#   SUBDIRS_MAKEFLAGS-$@   Make settings specific to this target
02bb8761fcce Initial load
duke
parents:
diff changeset
   223
define SUBDIRS-loop
02bb8761fcce Initial load
duke
parents:
diff changeset
   224
@for i in DUMMY $(SUBDIRS) ; do \
02bb8761fcce Initial load
duke
parents:
diff changeset
   225
  if [ "$$i" != "DUMMY" ] ; then \
3871
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 4
diff changeset
   226
    $(MAKE) -C $${i} $@ \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 4
diff changeset
   227
          $(SUBDIRS_MAKEFLAGS) \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 4
diff changeset
   228
          $(SUBDIRS_MAKEFLAGS-$@) \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 4
diff changeset
   229
          FULL_VERSION=$(FULL_VERSION) \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 4
diff changeset
   230
          RELEASE=$(RELEASE) || exit 1; \
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   231
  fi ; \
02bb8761fcce Initial load
duke
parents:
diff changeset
   232
done
02bb8761fcce Initial load
duke
parents:
diff changeset
   233
endef
02bb8761fcce Initial load
duke
parents:
diff changeset
   234
02bb8761fcce Initial load
duke
parents:
diff changeset
   235
# Given a OTHERSUBDIRS list, cd into them and make them (extra loop define)
02bb8761fcce Initial load
duke
parents:
diff changeset
   236
#   OTHERSUBDIRS_MAKEFLAGS      Make settings for a subdir make
02bb8761fcce Initial load
duke
parents:
diff changeset
   237
define OTHERSUBDIRS-loop
02bb8761fcce Initial load
duke
parents:
diff changeset
   238
@for i in DUMMY $(OTHERSUBDIRS) ; do \
02bb8761fcce Initial load
duke
parents:
diff changeset
   239
  if [ "$$i" != "DUMMY" ] ; then \
3871
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 4
diff changeset
   240
    $(MAKE) -C $${i} $@ \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 4
diff changeset
   241
          $(OTHERSUBDIRS_MAKEFLAGS) \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 4
diff changeset
   242
          FULL_VERSION=$(FULL_VERSION) \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 4
diff changeset
   243
          RELEASE=$(RELEASE) || exit 1; \
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   244
  fi ; \
02bb8761fcce Initial load
duke
parents:
diff changeset
   245
done
02bb8761fcce Initial load
duke
parents:
diff changeset
   246
endef
02bb8761fcce Initial load
duke
parents:
diff changeset
   247
3871
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 4
diff changeset
   248
# Prevent the use of many default suffix rules we do not need
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 4
diff changeset
   249
.SUFFIXES:
6551
476ed8653670 6981043: Clean out all native code makefile logic from corba repository
ohair
parents: 5555
diff changeset
   250
.SUFFIXES: .java .class
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   251
3871
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 4
diff changeset
   252
# Make sure we are all insane
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   253
ifdef INSANE
02bb8761fcce Initial load
duke
parents:
diff changeset
   254
  export INSANE
02bb8761fcce Initial load
duke
parents:
diff changeset
   255
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   256
3871
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 4
diff changeset
   257
# Make sure we have the current year
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 4
diff changeset
   258
ifndef COPYRIGHT_YEAR
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 4
diff changeset
   259
  ifdef ALT_COPYRIGHT_YEAR
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 4
diff changeset
   260
    COPYRIGHT_YEAR := $(ALT_COPYRIGHT_YEAR)
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 4
diff changeset
   261
  else
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 4
diff changeset
   262
    COPYRIGHT_YEAR := $(shell $(DATE) '+%Y')
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 4
diff changeset
   263
  endif
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 4
diff changeset
   264
  export COPYRIGHT_YEAR
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   265
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   266
02bb8761fcce Initial load
duke
parents:
diff changeset
   267
# Install of imported file (JDK_IMPORT_PATH, or some other external location)
02bb8761fcce Initial load
duke
parents:
diff changeset
   268
define install-import-file
02bb8761fcce Initial load
duke
parents:
diff changeset
   269
@$(ECHO) "ASSEMBLY_IMPORT: $@"
02bb8761fcce Initial load
duke
parents:
diff changeset
   270
$(install-file)
02bb8761fcce Initial load
duke
parents:
diff changeset
   271
endef
02bb8761fcce Initial load
duke
parents:
diff changeset
   272
02bb8761fcce Initial load
duke
parents:
diff changeset
   273
.PHONY: all build clean clobber