1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/make/common/Defs.gmk Sat Dec 01 00:00:00 2007 +0000 1.3 @@ -0,0 +1,511 @@ 1.4 +# 1.5 +# Copyright 1995-2007 Sun Microsystems, Inc. All Rights Reserved. 1.6 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.7 +# 1.8 +# This code is free software; you can redistribute it and/or modify it 1.9 +# under the terms of the GNU General Public License version 2 only, as 1.10 +# published by the Free Software Foundation. Sun designates this 1.11 +# particular file as subject to the "Classpath" exception as provided 1.12 +# by Sun in the LICENSE file that accompanied this code. 1.13 +# 1.14 +# This code is distributed in the hope that it will be useful, but WITHOUT 1.15 +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1.16 +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1.17 +# version 2 for more details (a copy is included in the LICENSE file that 1.18 +# accompanied this code). 1.19 +# 1.20 +# You should have received a copy of the GNU General Public License version 1.21 +# 2 along with this work; if not, write to the Free Software Foundation, 1.22 +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1.23 +# 1.24 +# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 1.25 +# CA 95054 USA or visit www.sun.com if you need additional information or 1.26 +# have any questions. 1.27 +# 1.28 + 1.29 +# 1.30 +# Common variables used by all the Java makefiles. This file should 1.31 +# not contain rules. 1.32 +# 1.33 + 1.34 +# 1.35 +# On Solaris, the 'make' utility from Sun will not work with these makefiles. 1.36 +# This little rule is only understood by Sun's make, and is harmless 1.37 +# when seen by the GNU make tool. If using Sun's make, this causes the 1.38 +# make command to fail. 1.39 +# 1.40 +SUN_MAKE_TEST:sh = echo "ERROR: PLEASE USE GNU VERSION OF MAKE"; exit 33 1.41 + 1.42 +include $(BUILDDIR)/common/shared/Platform.gmk 1.43 + 1.44 +TOPDIR=$(BUILDDIR)/.. 1.45 + 1.46 +include $(TOPDIR)/make/common/CancelImplicits.gmk 1.47 + 1.48 +# Historically PLATFORM_SRC used to be src/$(PLATFORM), but we switched it to 1.49 +# src/solaris so if you want to build on Linux you didn't need a src/linux 1.50 +# directory. In an ideal world it would be called src/genunix but we are not 1.51 +# there yet. 1.52 +# 1.53 +ifndef SHARE_SRC 1.54 + SHARE_SRC = $(TOPDIR)/src/share 1.55 +endif 1.56 + 1.57 +_OUTPUTDIR=$(TOPDIR)/build/$(PLATFORM)-$(ARCH) 1.58 + 1.59 +# 1.60 +# Get platform definitions 1.61 +# 1.62 + 1.63 +include $(TOPDIR)/make/common/Defs-$(PLATFORM).gmk 1.64 + 1.65 +# 1.66 +# Localizations for the different parts of the product beyond English 1.67 +# 1.68 + 1.69 +JRE_LOCALES = de es fr it ja ko sv zh_CN zh_TW zh_HK 1.70 +PLUGIN_LOCALES = de es fr it ja ko sv zh_CN zh_TW zh_HK 1.71 +JDK_LOCALES = ja zh_CN 1.72 + 1.73 +# 1.74 +# A list of locales we support but don't have resource files. 1.75 +# This is defined to optimize the search of resource bundles. 1.76 +# 1.77 +JRE_NONEXIST_LOCALES = en en_US de_DE es_ES fr_FR it_IT ja_JP ko_KR sv_SE zh 1.78 + 1.79 +# 1.80 +# All libraries except libjava and libjvm itself link against libjvm and 1.81 +# libjava, the latter for its exported common utilities. libjava only links 1.82 +# against libjvm. Programs' makefiles take their own responsibility for 1.83 +# adding other libs. 1.84 +# 1.85 +ifdef PACKAGE 1.86 +# put JAVALIB first, but do not lose any platform specific values.... 1.87 + LDLIBS_COMMON = $(JAVALIB) 1.88 +endif # PACKAGE 1.89 + 1.90 +# 1.91 +# Libraries that must appear ahead of libc.so on the link command line 1.92 +# 1.93 +ifdef PROGRAM 1.94 + 1.95 + ifeq ($(PLATFORM), solaris) 1.96 + LDLIBS_COMMON = -lthread -ldl 1.97 + endif 1.98 + 1.99 + ifeq ($(PLATFORM), linux) 1.100 + LDLIBS_COMMON = -ldl 1.101 + endif 1.102 + 1.103 +endif # PROGRAM 1.104 + 1.105 +LDLIBS_COMMON += $(EXTRA_LIBS) 1.106 + 1.107 +# 1.108 +# Default is to build, not import native binaries 1.109 +# 1.110 +ifndef IMPORT_NATIVE_BINARIES 1.111 + IMPORT_NATIVE_BINARIES=false 1.112 +endif 1.113 +# If importing libraries in, no incremental builds 1.114 +ifeq ($(IMPORT_NATIVE_BINARIES),true) 1.115 + INCREMENTAL_BUILD=false 1.116 +endif 1.117 + 1.118 +# for generated libraries 1.119 +LIBDIR = $(OUTPUTDIR)/lib 1.120 +ABS_LIBDIR = $(ABS_OUTPUTDIR)/lib 1.121 +# Optional place to save the windows .lib files 1.122 +LIBFILES_DIR = $(OUTPUTDIR)/libfiles 1.123 +# for ext jre files 1.124 +EXTDIR = $(LIBDIR)/ext 1.125 +# for generated include files 1.126 +INCLUDEDIR = $(OUTPUTDIR)/include 1.127 +# for generated class files 1.128 +CLASSBINDIR = $(OUTPUTDIR)/classes 1.129 +DEMOCLASSDIR = $(OUTPUTDIR)/democlasses 1.130 +# for generated tool class files 1.131 +BUILDTOOLCLASSDIR = $(OUTPUTDIR)/btclasses 1.132 +# for build tool jar files 1.133 +BUILDTOOLJARDIR = $(OUTPUTDIR)/btjars 1.134 +ABS_BUILDTOOLJARDIR = $(ABS_OUTPUTDIR)/btjars 1.135 +# for generated java source files 1.136 +GENSRCDIR = $(OUTPUTDIR)/gensrc 1.137 +# for generated C source files (not javah) 1.138 +GENNATIVESRCDIR = $(OUTPUTDIR)/gennativesrc 1.139 +# for imported source files 1.140 +IMPORTSRCDIR = $(OUTPUTDIR)/impsrc 1.141 +# for imported documents 1.142 +IMPORTDOCDIR = $(OUTPUTDIR)/impdoc 1.143 +# for generated demo 1.144 +DEMODIR = $(OUTPUTDIR)/demo 1.145 +# for sample code 1.146 +SAMPLEDIR = $(OUTPUTDIR)/sample 1.147 +# for generated documentation 1.148 +DOCSDIR = $(OUTPUTDIR)/docs$(DOCSDIRSUFFIX) 1.149 +DOCSDIRSUFFIX = 1.150 + 1.151 +# An attempt is made to generate unique enough directories for the 1.152 +# generated files to not have name collisisons. Most build units 1.153 +# defines PRODUCT (except Release.gmk), but then they may or may 1.154 +# not define PACKAGE, THREADIR (only HPI uses this), PROGRAM, and 1.155 +# LIBRARY. This code chunk attempts to generate a unique 1.156 +# OBJDIR/CLASSHDRDIR for each build unit based on which of those 1.157 +# values are set within each build unit. 1.158 + 1.159 +UNIQUE_LOCATION_STRING = tmp 1.160 + 1.161 +ifneq ($(PRODUCT),) 1.162 + UNIQUE_LOCATION_STRING += /$(PRODUCT) 1.163 +endif 1.164 + 1.165 +ifneq ($(PACKAGE),) 1.166 + UNIQUE_LOCATION_STRING += /$(PACKAGE) 1.167 +endif 1.168 + 1.169 +ifneq ($(PROGRAM),) 1.170 + UNIQUE_LOCATION_STRING += /$(PROGRAM) 1.171 +endif 1.172 + 1.173 +ifneq ($(LIBRARY),) 1.174 + ifneq ($(LIBRARY_OUTPUT),) 1.175 + UNIQUE_LOCATION_STRING += /$(LIBRARY_OUTPUT) 1.176 + else 1.177 + UNIQUE_LOCATION_STRING += /$(LIBRARY) 1.178 + endif 1.179 +endif 1.180 + 1.181 +ifneq ($(THREADDIR),) 1.182 + UNIQUE_LOCATION_STRING += /$(THREADDIR) 1.183 +endif 1.184 + 1.185 +# the use of += above makes a space separated list which we need to 1.186 +# remove for filespecs. 1.187 +# 1.188 +NULLSTRING := 1.189 +ONESPACE := $(NULLSTRING) # space before this comment is required. 1.190 +UNIQUE_PATH = $(subst $(ONESPACE),,$(UNIQUE_LOCATION_STRING)) 1.191 + 1.192 +# TEMPDIR is a unique general purpose directory 1.193 +# need to use 'override' because GNU Make on Linux exports the wrong 1.194 +# value. 1.195 +override TEMPDIR = $(OUTPUTDIR)/$(UNIQUE_PATH) 1.196 +override ABS_TEMPDIR = $(ABS_OUTPUTDIR)/$(UNIQUE_PATH) 1.197 + 1.198 +# This must be created right away for pattern rules in Sanity.gmk to work. 1.199 +dummy1:=$(shell $(MKDIR) -p $(TEMPDIR)) 1.200 +dummy2:=$(shell $(MKDIR) -p $(TEMP_DISK)) 1.201 + 1.202 +# OBJDIRNAME is the name of the directory where the object code is to 1.203 +# be placed. It's name depends on whether the data model architecture 1.204 +# is 32-bit or not. 1.205 +ifneq ($(ARCH_DATA_MODEL), 32) 1.206 + OBJDIRNAME = obj$(ARCH_DATA_MODEL)$(OBJDIRNAME_SUFFIX) 1.207 +else 1.208 + OBJDIRNAME = obj$(OBJDIRNAME_SUFFIX) 1.209 +endif 1.210 +OBJDIR = $(TEMPDIR)/$(OBJDIRNAME) 1.211 + 1.212 +# CLASSHDRDIR is where the generated C Class Header files go. 1.213 +CLASSHDRDIR = $(TEMPDIR)/CClassHeaders 1.214 + 1.215 +# 1.216 +# CLASSDESTDIR can be used to specify the directory where generated classes 1.217 +# are to be placed. The default is CLASSBINDIR. 1.218 +# 1.219 +ifndef CLASSDESTDIR 1.220 +CLASSDESTDIR = $(CLASSBINDIR) 1.221 +endif 1.222 + 1.223 +INCLUDES = -I. -I$(CLASSHDRDIR) \ 1.224 + $(patsubst %,-I%,$(subst $(CLASSPATH_SEPARATOR), ,$(VPATH.h))) $(OTHER_INCLUDES) 1.225 +OTHER_CPPFLAGS = $(INCLUDES) 1.226 + 1.227 + 1.228 +# 1.229 +# vpaths. These are the default locations searched for source files. 1.230 +# GNUmakefiles of individual areas often override the default settings. 1.231 +# There are no longer default vpath entries for C and assembler files 1.232 +# so we can ensure that libraries don't get their hands on JVM files. 1.233 +# 1.234 +# We define an intermediate variable for Java files because 1.235 +# we use its value later to help define $SOURCEPATH 1.236 + 1.237 +VPATH0.java = $(GENSRCDIR)$(CLASSPATH_SEPARATOR)$(PLATFORM_SRC)/classes$(CLASSPATH_SEPARATOR)$(SHARE_SRC)/classes 1.238 +VPATH.java = $(VPATH0.java) 1.239 +vpath %.java $(VPATH.java) 1.240 +vpath %.class $(CLASSBINDIR) 1.241 +vpath %.$(OBJECT_SUFFIX) $(OBJDIR) 1.242 + 1.243 +# 1.244 +# VPATH.h is used elsewhere to generate include flags. By default, 1.245 +# anyone has access to the include files that the JVM area exports, 1.246 +# namely jni.h, jvm.h, and jni_utils.h, plus their platform-specific 1.247 +# relatives. 1.248 +# 1.249 +ifeq ($(PLATFORM), windows) 1.250 + VPATH.h = $(BOOTDIR)/include;$(BOOTDIR)/include/$(PLATFORM_INCLUDE_NAME) 1.251 +else 1.252 + VPATH.h = $(PLATFORM_SRC)/javavm/export$(CLASSPATH_SEPARATOR)$(SHARE_SRC)/javavm/export$(CLASSPATH_SEPARATOR)$(SHARE_SRC)/javavm/include$(CLASSPATH_SEPARATOR)$(PLATFORM_SRC)/javavm/include 1.253 +endif 1.254 +vpath %.h $(VPATH.h) 1.255 + 1.256 +# 1.257 +# Used in two ways: helps link against libjava.so. Also if overridden 1.258 +# determines where your shared library is installed. 1.259 +# 1.260 +ifndef LIB_LOCATION 1.261 + LIB_LOCATION = $(LIBDIR)/$(LIBARCH) 1.262 +endif 1.263 + 1.264 +# 1.265 +# Java header and stub variables 1.266 +# 1.267 +CLASSHDRS = $(patsubst %,$(CLASSHDRDIR)/%.h,$(subst .,_,$(CLASSES.export))) 1.268 +CLASSSTUBOBJS = classstubs.$(OBJECT_SUFFIX) 1.269 +STUBPREAMBLE = $(INCLUDEDIR)/StubPreamble.h 1.270 + 1.271 +# 1.272 +# Classpath seen by javac (different from the one seen by the VM 1.273 +# running javac), and useful variables. 1.274 +# 1.275 +SOURCEPATH = $(VPATH.java) 1.276 +PKG = $(shell $(EXPR) $(PACKAGE) : '\([a-z]*\)') 1.277 +PKGDIR = $(subst .,/,$(PACKAGE)) 1.278 + 1.279 +# 1.280 +# The java/javac/jdk variables (JAVAC_CMD, JAVA_CMD, etc.) 1.281 +# 1.282 +include $(BUILDDIR)/common/shared/Defs-java.gmk 1.283 + 1.284 +# 1.285 +# Set opt level to ALT_OPT if set otherwise _OPT 1.286 +# 1.287 +POPT = $(_OPT$(ALT_OPT))$(ALT_OPT) 1.288 + 1.289 +# 1.290 +# Convenient macros 1.291 +# 1.292 + 1.293 +# Prepare $@ target, remove old one and making sure directory exists 1.294 +define prep-target 1.295 +$(MKDIR) -p $(@D) 1.296 +$(RM) $@ 1.297 +endef 1.298 + 1.299 +# Simple install of $< file to $@ 1.300 +define install-file 1.301 +$(prep-target) 1.302 +$(CP) $< $@ 1.303 +endef 1.304 + 1.305 +# Cleanup rule for after debug java run (hotspot.log file is left around) 1.306 +# (This could be an old leftover file in a read-only area, use the @- prefix) 1.307 +HOTSPOT_LOG_NAME = hotspot.log 1.308 +define java-vm-cleanup 1.309 +if [ -w $(HOTSPOT_LOG_NAME) ] ; then $(RM) $(HOTSPOT_LOG_NAME); fi 1.310 +endef 1.311 + 1.312 +# Default make settings for processing SUBDIRS with clobber or clean names 1.313 +SUBDIRS_MAKEFLAGS-clobber = INCREMENTAL_BUILD=false 1.314 +SUBDIRS_MAKEFLAGS-clean = INCREMENTAL_BUILD=false 1.315 + 1.316 +# Current directory 1.317 +CURRENT_DIRECTORY := $(shell $(PWD)) 1.318 + 1.319 +# If no timing wanted, we need to define these as empty 1.320 +ifdef NO_TIMING 1.321 + 1.322 +TIMING_ID:=NA 1.323 + 1.324 +define TIMING_start 1.325 +t=0:0:0:0 1.326 +endef 1.327 + 1.328 +define TIMING_end 1.329 +time_used=0 1.330 +endef 1.331 + 1.332 +else # NO_TIMING 1.333 + 1.334 +# Default timing id 1.335 +TIMING_ID:=$(shell $(BASENAME) $(CURRENT_DIRECTORY)) 1.336 + 1.337 +# Timing start (must be used in same shell, e.g. same command line) 1.338 +# Defines the shell variable $1 to have the start time. 1.339 +define TIMING_start 1.340 +$1=`$(DATE) +%j:%H:%M:%S` 1.341 +endef 1.342 + 1.343 +# Timing end (must be used in same shell, e.g. same command line) 1.344 +# Expects shell variable $1 to have been defined as the start time. 1.345 +# Expects shell variable $2 to have timing id string 1.346 +# Sets total_seconds shell variable as the total seconds used. 1.347 +# Sets time_used shell variable to contain format "%dh%dm%ds" 1.348 +define TIMING_end 1.349 +begTime="$${$1}"; \ 1.350 +timing_id="$${$2}"; \ 1.351 +endTime=`$(DATE) +%j:%H:%M:%S`; \ 1.352 +d1=`$(ECHO) $${begTime} | $(CUT) -d':' -f1 | $(SED) -e 's@^0*@@'`; \ 1.353 +if [ "$${d1}" = "" ] ; then d1=0; fi; \ 1.354 +h1=`$(ECHO) $${begTime} | $(CUT) -d':' -f2 | $(SED) -e 's@^0*@@'`; \ 1.355 +if [ "$${h1}" = "" ] ; then h1=0; fi; \ 1.356 +m1=`$(ECHO) $${begTime} | $(CUT) -d':' -f3 | $(SED) -e 's@^0*@@'`; \ 1.357 +if [ "$${m1}" = "" ] ; then m1=0; fi; \ 1.358 +s1=`$(ECHO) $${begTime} | $(CUT) -d':' -f4 | $(SED) -e 's@^0*@@'`; \ 1.359 +if [ "$${s1}" = "" ] ; then s1=0; fi; \ 1.360 +d2=`$(ECHO) $${endTime} | $(CUT) -d':' -f1 | $(SED) -e 's@^0*@@'`; \ 1.361 +if [ "$${d2}" = "" ] ; then d2=0; fi; \ 1.362 +h2=`$(ECHO) $${endTime} | $(CUT) -d':' -f2 | $(SED) -e 's@^0*@@'`; \ 1.363 +if [ "$${h2}" = "" ] ; then h2=0; fi; \ 1.364 +m2=`$(ECHO) $${endTime} | $(CUT) -d':' -f3 | $(SED) -e 's@^0*@@'`; \ 1.365 +if [ "$${m2}" = "" ] ; then m2=0; fi; \ 1.366 +s2=`$(ECHO) $${endTime} | $(CUT) -d':' -f4 | $(SED) -e 's@^0*@@'`; \ 1.367 +if [ "$${s2}" = "" ] ; then s2=0; fi; \ 1.368 +t1_secs=`$(EXPR) $${d1} '*' 60 '*' 60 '*' 24 '+' $${h1} '*' 60 '*' 60 \ 1.369 + '+' $${m1} '*' 60 '+' $${s1}`; \ 1.370 +t2_secs=`$(EXPR) $${d2} '*' 60 '*' 60 '*' 24 '+' $${h2} '*' 60 '*' 60 \ 1.371 + '+' $${m2} '*' 60 '+' $${s2}`; \ 1.372 +total_seconds=`$(EXPR) $${t2_secs} '-' $${t1_secs}`; \ 1.373 +if [ "$${total_seconds}" -lt 0 ] ; then total_seconds=0; fi; \ 1.374 +t_hour=`$(EXPR) $${total_seconds} '/' '(' 60 '*' 60 ')'`h; \ 1.375 +t_min=`$(EXPR) '(' $${total_seconds} '%' '(' 60 '*' 60 ')' ')' '/' 60`m; \ 1.376 +t_sec=`$(EXPR) $${total_seconds} '%' 60`s; \ 1.377 +time_used=$${t_sec}; \ 1.378 +if [ "$${t_hour}" != "0h" ] ; then \ 1.379 +time_used=$${t_hour}$${t_min}$${t_sec}; \ 1.380 +elif [ "$${t_min}" != "0m" ] ; then \ 1.381 +time_used=$${t_min}$${t_sec}; \ 1.382 +else \ 1.383 +time_used=$${t_sec}; \ 1.384 +fi; \ 1.385 +$(PRINTF) " Timing: %05d seconds or %s for %s\n" \ 1.386 + $${total_seconds} $${time_used} $${timing_id} 1.387 +endef 1.388 + 1.389 +endif # NO_TIMING 1.390 + 1.391 +# Given a SUBDIRS list, cd into them and make them 1.392 +# SUBDIRS_MAKEFLAGS Make settings for a subdir make 1.393 +# SUBDIRS_MAKEFLAGS-$@ Make settings specific to this target 1.394 +define SUBDIRS-loop 1.395 +@$(ECHO) "Begin Processing SUBDIRS: $(SUBDIRS)" 1.396 +@for i in DUMMY $(SUBDIRS) ; do \ 1.397 + if [ "$$i" != "DUMMY" ] ; then \ 1.398 + $(ECHO) ">>>Recursively making "$$i" "$@" @ `$(DATE)` ..."; \ 1.399 + timing_id="$(TIMING_ID)-`$(BASENAME) $${i}`"; \ 1.400 + $(call TIMING_start,startTime); \ 1.401 + curDir=$(CURRENT_DIRECTORY); \ 1.402 + $(CD) $$i; $(MAKE) $@ TIMING_ID=$${timing_id} \ 1.403 + $(SUBDIRS_MAKEFLAGS) \ 1.404 + $(SUBDIRS_MAKEFLAGS-$@) \ 1.405 + FULL_VERSION=$(FULL_VERSION) \ 1.406 + RELEASE=$(RELEASE) || exit 1; \ 1.407 + $(CD) $${curDir}; \ 1.408 + $(call TIMING_end,startTime,timing_id); \ 1.409 + $(ECHO) "<<<Finished Recursively making "$$i" "$@" @ `$(DATE)`." ; \ 1.410 + fi ; \ 1.411 +done 1.412 +@$(ECHO) "Done Processing SUBDIRS: $(SUBDIRS)" 1.413 +endef 1.414 + 1.415 +# Given a OTHERSUBDIRS list, cd into them and make them (extra loop define) 1.416 +# OTHERSUBDIRS_MAKEFLAGS Make settings for a subdir make 1.417 +define OTHERSUBDIRS-loop 1.418 +@$(ECHO) "Begin Processing OTHERSUBDIRS: $(OTHERSUBDIRS)" 1.419 +@for i in DUMMY $(OTHERSUBDIRS) ; do \ 1.420 + if [ "$$i" != "DUMMY" ] ; then \ 1.421 + $(ECHO) ">>>Recursively making "$$i" "$@" @ `$(DATE)` ..."; \ 1.422 + timing_id="$(TIMING_ID)-`$(BASENAME) $${i}`"; \ 1.423 + $(call TIMING_start,startTime); \ 1.424 + curDir=$(CURRENT_DIRECTORY); \ 1.425 + $(CD) $$i; $(MAKE) $@ TIMING_ID=$${timing_id} \ 1.426 + $(OTHERSUBDIRS_MAKEFLAGS) \ 1.427 + FULL_VERSION=$(FULL_VERSION) \ 1.428 + RELEASE=$(RELEASE) || exit 1; \ 1.429 + $(CD) $${curDir}; \ 1.430 + $(call TIMING_end,startTime,timing_id); \ 1.431 + $(ECHO) "<<<Finished Recursively making "$$i" "$@" @ `$(DATE)`." ; \ 1.432 + fi ; \ 1.433 +done 1.434 +@$(ECHO) "Done Processing OTHERSUBDIRS: $(OTHERSUBDIRS)" 1.435 +endef 1.436 + 1.437 +# 1.438 +# Create BYFILE OPT and DBG settings, if CFLAGS_OPT/foobar.o is set then it is 1.439 +# used for this file, otherwise the default settings are used. 1.440 +# 1.441 +CFLAGS_$(VARIANT)/BYFILE = $(CFLAGS_$(VARIANT)/$(@F)) \ 1.442 + $(CFLAGS_$(VARIANT)$(CFLAGS_$(VARIANT)/$(@F))) 1.443 +CXXFLAGS_$(VARIANT)/BYFILE = $(CXXFLAGS_$(VARIANT)/$(@F)) \ 1.444 + $(CXXFLAGS_$(VARIANT)$(CXXFLAGS_$(VARIANT)/$(@F))) 1.445 + 1.446 +# 1.447 +# Tool flags 1.448 +# 1.449 +ASFLAGS = $(ASFLAGS_$(VARIANT)) $(ASFLAGS_COMMON) $(OTHER_ASFLAGS) 1.450 +CFLAGS = $(CFLAGS_$(VARIANT)/BYFILE) $(CFLAGS_COMMON) $(OTHER_CFLAGS) 1.451 +CXXFLAGS = $(CXXFLAGS_$(VARIANT)/BYFILE) $(CXXFLAGS_COMMON) $(OTHER_CXXFLAGS) 1.452 +CPPFLAGS = $(CPPFLAGS_$(VARIANT)) $(CPPFLAGS_COMMON) $(OTHER_CPPFLAGS) \ 1.453 + $(DEFINES) $(OPTIONS:%=-D%) 1.454 +LDFLAGS = $(LDFLAGS_$(VARIANT)) $(LDFLAGS_COMMON) $(OTHER_LDFLAGS) 1.455 +LDLIBS = $(OTHER_LDLIBS) $(LDLIBS_$(VARIANT)) $(LDLIBS_COMMON) 1.456 +LINTFLAGS = $(LINTFLAGS_$(VARIANT)) $(LINTFLAGS_COMMON) \ 1.457 + $(OTHER_LINTFLAGS) 1.458 + 1.459 +# this should be moved into Defs-<platform>.gmk..... 1.460 +ifeq ($(PLATFORM), windows) 1.461 + VERSION_DEFINES = -DRELEASE="\"$(RELEASE)\"" 1.462 +else 1.463 + VERSION_DEFINES = -DRELEASE='"$(RELEASE)"' 1.464 +endif 1.465 + 1.466 +# Note: As a rule, GNU Make rules should not appear in any of the 1.467 +# Defs*.gmk files. These were added for Kestrel-Solaris and do address 1.468 +# a TeamWare bug. They should be moved elsewhere for Merlin. 1.469 +# 1.470 +# Override gnumake built-in rules which do sccs get operations badly. 1.471 +# (They put the checked out code in the current directory, not in the 1.472 +# directory of the original file.) 1.473 +# Since this is a symptom of a teamware failure, complain and die on the spot. 1.474 + 1.475 +# This message immediately goes to stdout and the build terminates. 1.476 +define SCCS-trouble 1.477 +$(error \ 1.478 +"ERROR: File $@ referenced while building in $(CURRENT_DIRECTORY) \ 1.479 + is out of date with respect to its SCCS file $<. \ 1.480 + This can happen from an unresolved Teamware conflict, a file movement, or \ 1.481 + a failure in which SCCS files are updated but the 'sccs get' was not done. \ 1.482 + You should double check for other out of date files in your workspace. \ 1.483 + Or run: cd $(TOPDIR) && $(MAKE) sccs_get") 1.484 +endef 1.485 + 1.486 +%:: s.% 1.487 + @$(SCCS-trouble) 1.488 +%:: SCCS/s.% 1.489 + @$(SCCS-trouble) 1.490 + @$(ECHO) " is out of date with respect to its SCCS file." >> $(WARNING_FILE) 1.491 + @$(ECHO) " This file may be from an unresolved Teamware conflict." >> $(WARNING_FILE) 1.492 + @$(ECHO) " This is also a symptom of a Teamware bringover/putback failure" >> $(WARNING_FILE) 1.493 + @$(ECHO) " in which SCCS files are updated but not checked out." >> $(WARNING_FILE) 1.494 + @$(ECHO) " Check for other out of date files in your workspace." >> $(WARNING_FILE) 1.495 + @$(ECHO) "" >> $(WARNING_FILE) 1.496 + @#exit 666 1.497 + 1.498 +ifdef INSANE 1.499 + export INSANE 1.500 +endif 1.501 + 1.502 +ifdef ALT_COPYRIGHT_YEAR 1.503 + COPYRIGHT_YEAR = $(ALT_COPYRIGHT_YEAR) 1.504 +else 1.505 + COPYRIGHT_YEAR = $(shell $(DATE) '+%Y') 1.506 +endif 1.507 + 1.508 +# Install of imported file (JDK_IMPORT_PATH, or some other external location) 1.509 +define install-import-file 1.510 +@$(ECHO) "ASSEMBLY_IMPORT: $@" 1.511 +$(install-file) 1.512 +endef 1.513 + 1.514 +.PHONY: all build clean clobber