annotate make/ProfileNames.gmk @ 8875:ed979f9b40cd

8022212: Intermittent test failures in java/net Reviewed-by: chegar
author tyan
date Thu, 21 Nov 2013 13:42:54 +0000
parents 9c60860b1812
children
rev   line source
dholmes@6571 1 #
dholmes@6571 2 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
dholmes@6571 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
dholmes@6571 4 #
dholmes@6571 5 # This code is free software; you can redistribute it and/or modify it
dholmes@6571 6 # under the terms of the GNU General Public License version 2 only, as
dholmes@6571 7 # published by the Free Software Foundation. Oracle designates this
dholmes@6571 8 # particular file as subject to the "Classpath" exception as provided
dholmes@6571 9 # by Oracle in the LICENSE file that accompanied this code.
dholmes@6571 10 #
dholmes@6571 11 # This code is distributed in the hope that it will be useful, but WITHOUT
dholmes@6571 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
dholmes@6571 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
dholmes@6571 14 # version 2 for more details (a copy is included in the LICENSE file that
dholmes@6571 15 # accompanied this code).
dholmes@6571 16 #
dholmes@6571 17 # You should have received a copy of the GNU General Public License version
dholmes@6571 18 # 2 along with this work; if not, write to the Free Software Foundation,
dholmes@6571 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
dholmes@6571 20 #
dholmes@6571 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
dholmes@6571 22 # or visit www.oracle.com if you need additional information or have any
dholmes@6571 23 # questions.
dholmes@6571 24 #
dholmes@6571 25
dholmes@6571 26 # This was split out from Profiles.gmk to allow GenSrcMisc.gmk to include it
dholmes@6571 27 # without attempting to generate lists for output files that don't exist yet
dholmes@6571 28
dholmes@6571 29 # These are the external names of each profile
dholmes@6571 30
dholmes@6571 31 PROFILE_NAMES := compact1 compact2 compact3
dholmes@6571 32
dholmes@6787 33 # The include files use 1,2,3 for simplicity and conciseness. Internally we
ihse@8330 34 # use profile_1, profile_2 and profile_3.
dholmes@6571 35
dholmes@6571 36 ALL_PROFILES := profile_1 profile_2 profile_3
dholmes@6571 37
dholmes@6571 38 # This defines targets to generate per-profile Version.java/class files into
dholmes@6571 39 # distinct locations
dholmes@6571 40
dholmes@6571 41 VERSION_JAVA_DIR := sun/misc
dholmes@6571 42 VERSION_JAVA_FILE := Version.java
dholmes@6571 43 VERSION_JAVA_PATH := $(VERSION_JAVA_DIR)/$(VERSION_JAVA_FILE)
dholmes@6571 44 VERSION_CLASS_PATH := $(VERSION_JAVA_PATH:.java=.class)
dholmes@6571 45
dholmes@6571 46 PROFILE_VERSION_JAVA_TARGETS := $(foreach i, $(ALL_PROFILES), $(subst XXX,$i, $(JDK_OUTPUTDIR)/gen_XXX/$(VERSION_JAVA_PATH)))
dholmes@6571 47
dholmes@6571 48 PROFILE_VERSION_CLASS_TARGETS := $(foreach i, $(PROFILE_VERSION_JAVA_TARGETS), $(i:.java=.class))
dholmes@6571 49
dholmes@6571 50 # Function to map from profile designator, profile_1 etc, to its number
ihse@8330 51 profile_number = $(if $(patsubst profile_%,%, $(1)), $(patsubst profile_%,%, $(1)), $(words $(PROFILE_NAMES) extra))
dholmes@6571 52
dholmes@6571 53 # Function to map from profile number, 1, 2 etc, to the corresponding name
dholmes@6571 54 # An invalid number maps to an empty name
dholmes@6571 55 profile_name = $(word $(1), $(PROFILE_NAMES))
dholmes@6571 56
dholmes@6571 57 # Function to isolate a profile number from a Version.java target
dholmes@6571 58 # Evaluates to the arg if the arg is not a profile version target
dholmes@6571 59 profile_version_number = $(patsubst $(JDK_OUTPUTDIR)/gen_profile_%/$(VERSION_JAVA_PATH), %, $(1))
dholmes@6571 60
ihse@8330 61 # Function to go from a profile Version.java target to profile name. If not
dholmes@6571 62 # a profile version target then we need a number that maps to an empty name
dholmes@6571 63 profile_version_name = $(word $(if $(filter-out $(call profile_version_number, $(1)), $(1)), $(call profile_version_number, $(1)), $(words $(PROFILE_NAMES) extra)), $(PROFILE_NAMES))