make/ReleaseFile.gmk
author avstepan
Wed, 21 Dec 2016 17:34:41 +0300
changeset 43074 7f676353195d
parent 42292 11f0a32a38f0
child 42516 238e72a732d8
permissions -rw-r--r--
8154314: [TEST_BUG] java/awt/datatransfer/DragImage/MultiResolutionDragImageTest.java Reviewed-by: ssadetsky, serb Contributed-by: Maksim Khramov <maksim.khramov@oracle.com>
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
42292
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
     1
#
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
     2
# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
     4
#
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    10
#
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    15
# accompanied this code).
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    16
#
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    20
#
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    23
# questions.
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    24
#
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    25
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    26
default: all
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    27
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    28
include $(SPEC)
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    29
include MakeBase.gmk
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    30
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    31
################################################################################
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    32
# This makefile generates the "release" file into the exploded image. Jlink is
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    33
# then responsible for using this as the base for release files in each linked
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    34
# image.
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    35
#
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    36
################################################################################
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    37
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    38
BASE_RELEASE_FILE := $(JDK_OUTPUTDIR)/release
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    39
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    40
# Common way to emit a line into the release or info file
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    41
define info-file-item # name value
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    42
  $(PRINTF) '%s="%s"\n' $1 $2 >> $@
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    43
endef
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    44
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    45
# Param 1 - The file containing the MODULES list
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    46
define create-info-file
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    47
  $(if $(JDK_ARCH_ABI_PROP_NAME), \
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    48
    $(call info-file-item, "SUN_ARCH_ABI", "$(JDK_ARCH_ABI_PROP_NAME)"))
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    49
  $(call info-file-item, "SOURCE", "$(strip $(SOURCE_REVISION))")
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    50
endef
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    51
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    52
# Param 1 - The file containing the MODULES list
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    53
define prepare-info-file
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    54
  $(call LogInfo, Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@))
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    55
  $(call MakeDir, $(@D))
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    56
  $(RM) $@
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    57
endef
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    58
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    59
define info-file
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    60
  $(call prepare-info-file)
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    61
  $(call create-info-file)
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    62
endef
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    63
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    64
# Create a variable dependency file common for all release info files.
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    65
INFO_FILE_VARDEPS := $(call DependOnVariable, create-info-file)
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    66
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    67
SOURCE_REVISION = $(shell \
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    68
    if [ -f $(SOURCE_REVISION_TRACKER) ] ; then \
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    69
      $(CAT) $(SOURCE_REVISION_TRACKER) ; \
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    70
    fi)
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    71
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    72
# The SOURCE_REVISION_TRACKER file may not exist. Only depend on it if it does.
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    73
$(BASE_RELEASE_FILE): $(INFO_FILE_VARDEPS) $(wildcard $(SOURCE_REVISION_TRACKER))
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    74
	$(info-file)
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    75
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    76
TARGETS += $(BASE_RELEASE_FILE)
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    77
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    78
################################################################################
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    79
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    80
$(eval $(call IncludeCustomExtension, , ReleaseFile.gmk))
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    81
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    82
################################################################################
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    83
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    84
all: $(TARGETS)
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    85
11f0a32a38f0 8170528: Race condition with release file creation
erikj
parents:
diff changeset
    86
.PHONY: all default