Defs.gmk revision 7
5023N/A# Copyright 1995-2007 Sun Microsystems, Inc. All Rights Reserved. 5023N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5023N/A# This code is free software; you can redistribute it and/or modify it 5023N/A# under the terms of the GNU General Public License version 2 only, as 5023N/A# published by the Free Software Foundation. Sun designates this 5023N/A# particular file as subject to the "Classpath" exception as provided 5023N/A# by Sun in the LICENSE file that accompanied this code. 5023N/A# This code is distributed in the hope that it will be useful, but WITHOUT 5023N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 5023N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 5023N/A# version 2 for more details (a copy is included in the LICENSE file that 5023N/A# You should have received a copy of the GNU General Public License version 5023N/A# 2 along with this work; if not, write to the Free Software Foundation, 5023N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 5023N/A# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 5023N/A# Common variables used by all the Java makefiles. This file should 5023N/A# WARNING: This file is shared with other workspaces. 5023N/A# So when it includes other files, it must use JDK_TOPDIR. 5023N/A# On Solaris, the 'make' utility from Sun will not work with these makefiles. 5023N/A# This little rule is only understood by Sun's make, and is harmless 5023N/A# when seen by the GNU make tool. If using Sun's make, this causes the 5023N/A# Historically PLATFORM_SRC used to be src/$(PLATFORM), but we switched it to 5023N/A# Files that cannot be included in the OpenJDK distribution are 5023N/A# collected under a parent directory which contains just those files. 5023N/A# If we have no closed directory, force it to an openjdk build # Check for strange explicit settings (change to empty or true) # Silently treat as not defined # Define where closed directories are # If OPENJDK is defined, we may still need to use some native libraries that # exist only as part of the closed source. If the closed sources are not # available, the libraries must have been pre-built. Since these libraries # and the JDK internal interfaces to these are reasonably stable this is not # a significant problem. But we do need to provide a way to locate them, # including a way to point to a new one when there have been changes. # If you have a formal binary plugs download, set ALT_BINARY_PLUGS_PATH # (Optionally you can set ALT_CLOSED_JDK_IMPORT_PATH to point to the latest # build JDK, or last promotion for this JDK version, but will not work # As the OPENJDK is built, the binary plugs are used instead of building the # Individual Makefiles that specify USE_BINARY_PLUG_LIBRARY, will get # the binary plug copy (or a copy from a built JDK). # ALT_BINARY_PLUGS_JARFILE is probably rarely needed. It can be used # to identify the exact jar file to be used for all closed classes.. # ALT_BINARY_PLUGS_PATH points to a directory containing precisely the # binaries needed to build. # ALT_BUILD_BINARY_PLUGS_PATH points to a directory containing binary plug dirs # multiple architectures named using the standard conventions # This is useful for build scripts that need to build multiple architectures # ALT_CLOSED_JDK_IMPORT_PATH points to the top-level of a specific platform # 1. ALT_BINARY_PLUGS_JARFILE overrides any other location of the classes # 2. ALT_BINARY_PLUGS_PATH overrides all locations of classes and libraries # 3. ALT_BUILD_BINARY_PLUGS_PATH is used to find a ALT_BINARY_PLUGS_PATH # 4. ALT_CLOSED_JDK_IMPORT_PATH is used to locate classes and libraries # Default output directory # Get platform definitions # Freetype logic is applicable to OpenJDK only #if we use system lib we do not need to copy it to build tree # historically for Solaris we have slightly different devtools # 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. # All libraries except libjava and libjvm itself link against libjvm and # libjava, the latter for its exported common utilities. libjava only links # against libjvm. Programs' makefiles take their own responsibility for # put JAVALIB first, but do not lose any platform specific values.... # Libraries that must appear ahead of libc.so on the link command line # Default is to build, not import native binaries # If importing libraries in, no incremental builds # for generated libraries # Optional place to save the windows .lib files # for generated include files # for generated class files # for generated tool class files # for build tool jar files # for generated java source files # for generated C source files (not javah) # for imported source files # for generated documentation # The MESSAGE, WARNING and ERROR files are used to store sanityck and # SCCS check messages, warnings and errors. #where the demo source can be found # 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 # values are set within each build unit. # the use of += above makes a space separated list which we need to # TEMPDIR is a unique general purpose directory # need to use 'override' because GNU Make on Linux exports the wrong # This must be created right away for pattern rules in Sanity.gmk to work. # OBJDIRNAME is the name of the directory where the object code is to # be placed. It's name depends on whether the data model architecture # CLASSHDRDIR is where the generated C Class Header files go. # CLASSDESTDIR can be used to specify the directory where generated classes # are to be placed. The default is 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 # If filenames are duplicated between open/closed workspaces, prefer # Source ordering is important: some targets depend on closed files # replacing open ones, and thus the closed file sources must be found # Don't reorder without consulting the teams that depend on this behavior. # VPATH.h is used elsewhere to generate include flags. By default, # anyone has access to the include files that the JVM area exports, # Used in two ways: helps link against libjava.so. Also if overridden # determines where your shared library is installed. # Java header and stub variables # Classpath seen by javac (different from the one seen by the VM # running javac), and useful variables. # Set opt level to ALT_OPT if set otherwise _OPT # Prepare $@ target, remove old one and making sure directory exists # Simple install of $< file to $@ # 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 # If no timing wanted, we need to define these as empty # Timing start (must be used in same shell, e.g. same command line) # Defines the shell variable $1 to have the start time. $
1=
`$(DATE) +%j:%H:%M:%S`# Timing end (must be used in same shell, e.g. same command line) # Expects shell variable $1 to have been defined as the start time. # Expects shell variable $2 to have timing id string # Sets total_seconds shell variable as the total seconds used. # Sets time_used shell variable to contain format "%dh%dm%ds" if [
"$${d1}" =
"" ] ;
then d1=
0;
fi; \
if [
"$${h1}" =
"" ] ;
then h1=
0;
fi; \
if [
"$${m1}" =
"" ] ;
then m1=
0;
fi; \
if [
"$${s1}" =
"" ] ;
then s1=
0;
fi; \
if [
"$${d2}" =
"" ] ;
then d2=
0;
fi; \
if [
"$${h2}" =
"" ] ;
then h2=
0;
fi; \
if [
"$${m2}" =
"" ] ;
then m2=
0;
fi; \
if [
"$${s2}" =
"" ] ;
then s2=
0;
fi; \
'+' $${m1} '*' 60 '+' $${s1}`; \
'+' $${m2} '*' 60 '+' $${s2}`; \
if [
"$${t_hour}" !=
"0h" ] ;
then \
elif [
"$${t_min}" !=
"0m" ] ;
then \
$(PRINTF) " Timing: %05d seconds or %s for %s\n" \
# 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 \
$(ECHO) ">>>Recursively making "$$i
" "$@
" @ `$(DATE)` ..."; \
$(ECHO) "<<<Finished Recursively making "$$i
" "$@
" @ `$(DATE)`." ; \
# 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 \
$(ECHO) ">>>Recursively making "$$i
" "$@
" @ `$(DATE)` ..."; \
$(ECHO) "<<<Finished Recursively making "$$i
" "$@
" @ `$(DATE)`." ; \
# used for this file, otherwise the default settings are used. # this should be moved into Defs-<platform>.gmk..... # Note: As a rule, GNU Make rules should not appear in any of the # Defs*.gmk files. These were added for Kestrel-Solaris and do address # a TeamWare bug. They should be moved elsewhere for Merlin. # Override gnumake built-in rules which do sccs get operations badly. # (They put the checked out code in the current directory, not in the # directory of the original file.) # Since this is a symptom of a teamware failure, complain and die on the spot. # This message immediately goes to stdout and the build terminates. is out of date with respect to its SCCS file $<. \ This can happen from an unresolved Teamware conflict, a file movement, or \ a failure in which SCCS files are updated but the 'sccs get' was not done. \ You should double check for other out of date files in your workspace. \ @
$(ECHO) " This file may be from an unresolved Teamware conflict." >>
$(WARNING_FILE) @
$(ECHO) " in which SCCS files are updated but not checked out." >>
$(WARNING_FILE) @
$(ECHO) " Check for other out of date files in your workspace." >>
$(WARNING_FILE)# Install of imported file (JDK_IMPORT_PATH, or some other external location) @
$(ECHO) "ASSEMBLY_IMPORT: $@"