make/InterimImage.gmk
author darcy
Tue, 12 Nov 2019 10:45:23 -0800
changeset 59037 3d2575331a41
parent 52804 28094715ae71
permissions -rw-r--r--
8233940: Preview API tests for String methods should use ${jdk.version} as -source arg Reviewed-by: jlaskey, jlahoda
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
37770
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
     1
#
52804
28094715ae71 8214718: Update missing copyright year in build system
ihse
parents: 49207
diff changeset
     2
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
37770
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
     4
#
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    10
#
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    15
# accompanied this code).
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    16
#
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    20
#
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    23
# questions.
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    24
#
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    25
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    26
default: all
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    27
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    28
include $(SPEC)
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    29
include MakeBase.gmk
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    30
include Modules.gmk
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    31
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    32
################################################################################
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    33
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    34
# Use this file inside the image as target for make rule
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    35
JIMAGE_TARGET_FILE := bin/java$(EXE_SUFFIX)
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    36
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    37
INTERIM_MODULES_LIST := $(call CommaList, $(INTERIM_IMAGE_MODULES))
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    38
41874
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents: 40241
diff changeset
    39
JMODS := $(patsubst %, $(INTERIM_JMODS_DIR)/%.jmod, $(INTERIM_IMAGE_MODULES))
37770
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    40
42505
11439b0c0792 8169925: Organize licenses by module in source, JMOD file, and run-time image
mchung
parents: 41874
diff changeset
    41
JLINK_TOOL := $(JLINK) -J-Djlink.debug=true \
41874
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents: 40241
diff changeset
    42
    --module-path $(INTERIM_JMODS_DIR) \
37770
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    43
    --endian $(OPENJDK_BUILD_CPU_ENDIAN)
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    44
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    45
$(INTERIM_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    46
    $(call DependOnVariable, INTERIM_MODULES_LIST)
41874
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents: 40241
diff changeset
    47
	$(call LogWarn, Creating interim jimage)
37770
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    48
	$(RM) -r $(INTERIM_IMAGE_DIR)
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    49
	$(JLINK_TOOL) \
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    50
	    --output $(INTERIM_IMAGE_DIR) \
49207
2a25589b5971 8199469: Disable generate-jli-classes when building interim-image
redestad
parents: 42505
diff changeset
    51
	    --disable-plugin generate-jli-classes \
40241
59abac94e4f2 8136930: Simplify use of module-system options by custom launchers
mchung
parents: 37770
diff changeset
    52
	    --add-modules $(INTERIM_MODULES_LIST)
37770
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    53
	$(TOUCH) $@
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    54
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    55
TARGETS += $(INTERIM_IMAGE_DIR)/$(JIMAGE_TARGET_FILE)
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    56
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    57
################################################################################
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    58
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    59
all: $(TARGETS)
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    60
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents:
diff changeset
    61
.PHONY: all