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