#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
#
# Common variables used by all the Java makefiles. This file should
# not contain rules.
#
#
# On Solaris, the 'make' utility from Sun will not work with these makefiles.
# This little rule is only understood by Sun's make, and is harmless
# when seen by the GNU make tool. If using Sun's make, this causes the
# make command to fail.
#
# Historically PLATFORM_SRC used to be src/$(PLATFORM), but we switched it to
# there yet.
#
X11_PATH = $(ALT_X11_PATH)
else
else
PACKAGE_PATH = /usr
else
else
#
# Get platform definitions
#
#
# Localizations for the different parts of the product beyond English
#
#
# A list of locales we support but don't have resource files.
# This is defined to optimize the search of resource bundles.
#
# for ext jre files
# for generated class files
# for generated tool class files
# for build tool jar files
# for generated java source files
# for imported source files
# for imported documents
# for generated demo
# for sample code
# for generated documentation
# An attempt is made to generate unique enough directories for the
# generated files to not have name collisisons. Most build units
# defines PRODUCT (except Release.gmk), but then they may or may
# not define PACKAGE, THREADIR (only HPI uses this), PROGRAM, and
# LIBRARY. This code chunk attempts to generate a unique
# OBJDIR/CLASSHDRDIR for each build unit based on which of those
# values are set within each build unit.
UNIQUE_LOCATION_STRING += /$(PRODUCT)
UNIQUE_LOCATION_STRING += /$(PACKAGE)
UNIQUE_LOCATION_STRING += /$(PROGRAM)
else
UNIQUE_LOCATION_STRING += /$(LIBRARY)
UNIQUE_LOCATION_STRING += /$(THREADDIR)
# the use of += above makes a space separated list which we need to
# remove for filespecs.
#
NULLSTRING :=
# TEMPDIR is a unique general purpose directory
# need to use 'override' because GNU Make on Linux exports the wrong
# value.
# This must be created right away for pattern rules in Sanity.gmk to work.
#
# CLASSDESTDIR can be used to specify the directory where generated classes
# are to be placed. The default is CLASSBINDIR.
#
CLASSDESTDIR = $(CLASSBINDIR)
#
# vpaths. These are the default locations searched for source files.
# GNUmakefiles of individual areas often override the default settings.
# There are no longer default vpath entries for C and assembler files
# so we can ensure that libraries don't get their hands on JVM files.
#
# We define an intermediate variable for Java files because
# we use its value later to help define $SOURCEPATH
VPATH0.java = $(GENSRCDIR)$(CLASSPATH_SEPARATOR)$(PLATFORM_SRC)/classes$(CLASSPATH_SEPARATOR)$(SHARE_SRC)/classes
VPATH.java = $(VPATH0.java)
#
# Classpath seen by javac (different from the one seen by the VM
# running javac), and useful variables.
#
SOURCEPATH = $(VPATH.java)
#
#
#
# Set opt level to ALT_OPT if set otherwise _OPT
#
#
# Convenient macros
#
# Prepare $@ target, remove old one and making sure directory exists
$(MKDIR) -p $(@D)
$(RM) $@
# Simple install of $< file to $@
$(CP) $< $@
# Cleanup rule for after debug java run (hotspot.log file is left around)
# (This could be an old leftover file in a read-only area, use the @- prefix)
# Default make settings for processing SUBDIRS with clobber or clean names
# Given a SUBDIRS list, cd into them and make them
# SUBDIRS_MAKEFLAGS Make settings for a subdir make
# SUBDIRS_MAKEFLAGS-$@ Make settings specific to this target
if [ "$$i" != "DUMMY" ] ; then \
$(MAKE) -C $${i} $@ \
$(SUBDIRS_MAKEFLAGS) \
$(SUBDIRS_MAKEFLAGS-$@) \
FULL_VERSION=$(FULL_VERSION) \
fi ; \
done
# Given a OTHERSUBDIRS list, cd into them and make them (extra loop define)
# OTHERSUBDIRS_MAKEFLAGS Make settings for a subdir make
if [ "$$i" != "DUMMY" ] ; then \
$(MAKE) -C $${i} $@ \
FULL_VERSION=$(FULL_VERSION) \
fi ; \
done
# Prevent the use of many default suffix rules we do not need
.SUFFIXES:
# Make sure we are all insane
export INSANE
# Make sure we have the current year
else
export COPYRIGHT_YEAR
# Install of imported file (JDK_IMPORT_PATH, or some other external location)
@$(ECHO) "ASSEMBLY_IMPORT: $@"