make/altsrc.make

Tue, 08 Feb 2011 17:20:45 -0500

author
kamg
date
Tue, 08 Feb 2011 17:20:45 -0500
changeset 2515
d8a72fbc4be7
parent 2508
make/closed.make@b92c45f2bc75
child 2863
ededdaaf8ca5
permissions
-rw-r--r--

7003401: Implement VM error-reporting functionality on erroneous termination
Summary: Add support for distribution-specific error reporting
Reviewed-by: coleenp, phh, jcoomes, ohair

bobv@2508 1 #
bobv@2508 2 # Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
bobv@2508 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
bobv@2508 4 #
bobv@2508 5 # This code is free software; you can redistribute it and/or modify it
bobv@2508 6 # under the terms of the GNU General Public License version 2 only, as
bobv@2508 7 # published by the Free Software Foundation.
bobv@2508 8 #
bobv@2508 9 # This code is distributed in the hope that it will be useful, but WITHOUT
bobv@2508 10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
bobv@2508 11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
bobv@2508 12 # version 2 for more details (a copy is included in the LICENSE file that
bobv@2508 13 # accompanied this code).
bobv@2508 14 #
bobv@2508 15 # You should have received a copy of the GNU General Public License version
bobv@2508 16 # 2 along with this work; if not, write to the Free Software Foundation,
bobv@2508 17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
bobv@2508 18 #
bobv@2508 19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
bobv@2508 20 # or visit www.oracle.com if you need additional information or have any
bobv@2508 21 # questions.
bobv@2508 22 #
bobv@2508 23 #
bobv@2508 24
kamg@2515 25 # This file defines variables and macros which are used in the makefiles to
kamg@2515 26 # allow distributions to augment or replace common hotspot code with
kamg@2515 27 # distribution-specific source files.
bobv@2508 28
kamg@2515 29 # Requires: GAMMADIR
kamg@2515 30 # Provides:
kamg@2515 31 # variables: HS_COMMON_SRC, HS_ALT_SRC, HS_COMMON_SRC_REL, and HS_ALT_SRC_REL
kamg@2515 32 # functions: altsrc-equiv, if-has-altsrc, altsrc, altsrc-replace
bobv@2508 33
kamg@2515 34 HS_COMMON_SRC_REL=src
bobv@2508 35
kamg@2515 36 # This needs to be changed to a more generic location, but we keep it as this
kamg@2515 37 # for now for compatibility
kamg@2515 38 HS_ALT_SRC_REL=src/closed
bobv@2508 39
kamg@2515 40 HS_COMMON_SRC=$(GAMMADIR)/$(HS_COMMON_SRC_REL)
kamg@2515 41 HS_ALT_SRC=$(GAMMADIR)/$(HS_ALT_SRC_REL)
bobv@2508 42
bobv@2508 43
kamg@2515 44 ## altsrc-equiv
kamg@2515 45 #
kamg@2515 46 # Convert a common source path to an alternative source path
kamg@2515 47 #
kamg@2515 48 # Parameter: An absolute path into the common sources
kamg@2515 49 # Result: The matching path to the alternate-source location
kamg@2515 50 #
kamg@2515 51 altsrc-equiv=$(subst $(HS_COMMON_SRC)/,$(HS_ALT_SRC)/,$(1))
bobv@2508 52
kamg@2515 53
kamg@2515 54 ## if-has-altsrc
kamg@2515 55 #
kamg@2515 56 # Conditional macro to test for the existence of an alternate source path
kamg@2515 57 #
kamg@2515 58 # Parameter: An absolute path into the common sources
kamg@2515 59 # Parameter: Result if the alternative-source location exists
kamg@2515 60 # Parameter: Result if the alternative-source location does not exist
kamg@2515 61 # Result: expands to parameter 2 or 3 depending on existence of alternate source
kamg@2515 62 #
kamg@2515 63 if-has-altsrc=$(if $(wildcard $(call altsrc-equiv,$(1))),$(2),$(3))
kamg@2515 64
kamg@2515 65
kamg@2515 66 ## altsrc
kamg@2515 67 #
kamg@2515 68 # Converts common source path to alternate source path if the alternate
kamg@2515 69 # path exists, otherwise evaluates to nul (empty string)
kamg@2515 70 #
kamg@2515 71 # Parameter: An absolute path into the common sources
kamg@2515 72 # Result: The equivalent path to the alternate-source location, if such a
kamg@2515 73 # location exists on the filesystem. Otherwise it expands to empty.
kamg@2515 74 #
kamg@2515 75 altsrc=$(call if-has-altsrc,$(1),$(call altsrc-equiv,$(1)))
kamg@2515 76
kamg@2515 77 ## commonsrc
kamg@2515 78 #
kamg@2515 79 # Returns parameter.
kamg@2515 80 #
kamg@2515 81 commonsrc=$(1)
kamg@2515 82
kamg@2515 83
kamg@2515 84 ## altsrc-replace
kamg@2515 85 #
kamg@2515 86 # Converts a common source path to an alternate source path if the alternate
kamg@2515 87 # source path exists. Otherwise it evaluates to the input common source path.
kamg@2515 88 #
kamg@2515 89 # Parameter: An absolute path into the common sources
kamg@2515 90 # Result: A path to either the common or alternate sources
kamg@2515 91 #
kamg@2515 92 altsrc-replace=$(call if-has-altsrc,$(1),$(call altsrc-equiv,$(1)),$(1))

mercurial