jdk/make/gensrc/GensrcModuleLoaderMap.gmk
author alanb
Thu, 17 Mar 2016 19:04:16 +0000
changeset 36511 9d0388c6b336
child 36663 62a22ce669e6
permissions -rw-r--r--
8142968: Module System implementation Summary: Initial integration of JEP 200, JEP 260, JEP 261, and JEP 282 Reviewed-by: alanb, mchung, naoto, rriggs, psandoz, plevart, mullan, ascarpino, vinnie, prr, sherman, dfuchs, mhaupt Contributed-by: alan.bateman@oracle.com, alex.buckley@oracle.com, jonathan.gibbons@oracle.com, karen.kinnear@oracle.com, mandy.chung@oracle.com, mark.reinhold@oracle.com, chris.hegarty@oracle.com, alexandr.scherbatiy@oracle.com, amy.lu@oracle.com, calvin.cheung@oracle.com, daniel.fuchs@oracle.com, erik.joelsson@oracle.com, harold.seigel@oracle.com, jaroslav.bachorik@oracle.com, jean-francois.denise@oracle.com, jan.lahoda@oracle.com, james.laskey@oracle.com, lois.foltan@oracle.com, miroslav.kos@oracle.com, huaming.li@oracle.com, sean.mullan@oracle.com, naoto.sato@oracle.com, masayoshi.okutsu@oracle.com, peter.levart@gmail.com, philip.race@oracle.com, claes.redestad@oracle.com, sergey.bylokhov@oracle.com, alexandre.iline@oracle.com, volker.simonis@gmail.com, staffan.larsen@oracle.com, stuart.marks@oracle.com, semyon.sadetsky@oracle.com, serguei.spitsyn@oracle.com, sundararajan.athijegannathan@oracle.com, valerie.peng@oracle.com, vincent.x.ryan@oracle.com, weijun.wang@oracle.com, yuri.nesterenko@oracle.com, yekaterina.kantserova@oracle.com, alexander.kulyakhtin@oracle.com, felix.yang@oracle.com, andrei.eremeev@oracle.com, frank.yuan@oracle.com, sergei.pikalev@oracle.com, sibabrata.sahoo@oracle.com, tiantian.du@oracle.com, sha.jiang@oracle.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     1
#
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     2
# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     4
#
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    10
#
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    15
# accompanied this code).
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    16
#
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    20
#
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    23
# questions.
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    24
#
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    25
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    26
include Modules.gmk
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    27
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    28
BOOT_MODULES :=
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    29
UPGRADEABLE_MDOULES :=
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    30
AGGREGATOR_MDOULES :=
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    31
OTHER_PLATFORM_MODULES :=
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    32
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    33
# Hook to include the corresponding custom file, if present.
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    34
$(eval $(call IncludeCustomExtension, jdk, gensrc/GensrcModuleLoaderMap.gmk))
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    35
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    36
BOOT_MODULES += \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    37
    java.base \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    38
    java.datatransfer \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    39
    java.desktop \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    40
    java.httpclient \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    41
    java.instrument \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    42
    java.logging \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    43
    java.management \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    44
    java.naming \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    45
    java.prefs \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    46
    java.rmi \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    47
    java.security.jgss \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    48
    java.security.sasl \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    49
    java.sql \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    50
    java.xml \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    51
    java.xml.crypto \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    52
    jdk.httpserver \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    53
    jdk.management \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    54
    jdk.sctp \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    55
    jdk.security.auth \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    56
    jdk.security.jgss \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    57
    #
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    58
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    59
# to be deprivileged
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    60
BOOT_MODULES += \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    61
    java.compiler \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    62
    java.scripting \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    63
    java.sql.rowset \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    64
    java.smartcardio \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    65
    jdk.charsets \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    66
    jdk.naming.rmi \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    67
    #
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    68
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    69
UPGRADEABLE_MODULES += \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    70
    java.activation \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    71
    java.annotations.common \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    72
    java.corba \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    73
    java.transaction \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    74
    java.xml.bind \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    75
    java.xml.ws \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    76
    #
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    77
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    78
AGGREGATOR_MODULES += \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    79
    java.compact1 \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    80
    java.compact2 \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    81
    java.compact3 \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    82
    java.se \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    83
    java.se.ee \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    84
    #
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    85
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    86
OTHER_PLATFORM_MODULES += \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    87
    jdk.accessibility \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    88
    jdk.crypto.ec \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    89
    jdk.crypto.pkcs11 \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    90
    jdk.dynalink \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    91
    jdk.jsobject \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    92
    jdk.xml.dom \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    93
    jdk.localedata \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    94
    jdk.naming.dns \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    95
    jdk.scripting.nashorn \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    96
    jdk.zipfs \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    97
    #
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    98
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    99
ifeq ($(OPENJDK_TARGET_OS), macsox)
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   100
  BOOT_MODULES += jdk.deploy.osx
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   101
endif
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   102
ifeq ($(OPENJDK_TARGET_OS), windows)
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   103
  OTHER_PLATFORM_MODULES += jdk.crypto.mscapi
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   104
endif
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   105
ifeq ($(OPENJDK_TARGET_OS), solaris)
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   106
  OTHER_PLATFORM_MODULES += jdk.crypto.ucrypto
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   107
endif
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   108
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   109
# Param 1 - Name of module
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   110
define ReadImportMetaData
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   111
  ifneq ($$(wildcard $(IMPORT_MODULES_MAKE)/$$(strip $1)/build.properties), )
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   112
    classloader :=
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   113
    include $(IMPORT_MODULES_MAKE)/$$(strip $1)/build.properties
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   114
    ifeq ($$(classloader), boot)
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   115
      BOOT_MODULES += $1
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   116
    else ifeq ($$(classloader), ext)
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   117
      OTHER_PLATFORM_MODULES += $1
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   118
    endif
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   119
  endif
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   120
endef
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   121
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   122
IMPORTED_MODULES := $(call FindImportedModules)
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   123
$(foreach m, $(IMPORTED_MODULES), $(eval $(call ReadImportMetaData, $m)))
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   124
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   125
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   126
# Replacing double-comma with a single comma is to workaround the issue
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   127
# with some version of make on windows that doesn't substitute spaces
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   128
# with one comma properly as with make 4.0
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   129
define SubstComma
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   130
$(strip \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   131
  $(subst $(COMMA)$(COMMA),$(COMMA),$(subst $(SPACE),$(COMMA),$(strip $1))) \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   132
)
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   133
endef
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   134
BOOT_MODULES_LIST := $(call SubstComma, $(BOOT_MODULES))
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   135
PLATFORM_MODULES_LIST := $(call SubstComma, $(UPGRADEABLE_MODULES) $(AGGREGATOR_MODULES) $(OTHER_PLATFORM_MODULES))
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   136
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   137
VARDEPS_VALUE := $(BOOT_MODULES_LIST) $(PLATFORM_MODULES_LIST)
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   138
VARDEPS_FILE := $(call DependOnVariable, VARDEPS_VALUE)
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   139
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   140
############################################################################
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   141
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   142
$(SUPPORT_OUTPUTDIR)/gensrc/java.base/jdk/internal/module/ModuleLoaderMap.java: \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   143
    $(JDK_TOPDIR)/src/java.base/share/classes/jdk/internal/module/ModuleLoaderMap.java \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   144
    $(VARDEPS_FILE) $(BUILD_TOOLS_JDK)
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   145
	$(MKDIR) -p $(@D)
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   146
	$(RM) $@ $@.tmp
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   147
	$(TOOL_GENCLASSLOADERMAP) -boot $(BOOT_MODULES_LIST) \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   148
	     -platform $(PLATFORM_MODULES_LIST) -o $@.tmp $<
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   149
	$(MV) $@.tmp $@
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   150
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   151
GENSRC_JAVA_BASE += $(SUPPORT_OUTPUTDIR)/gensrc/java.base/jdk/internal/module/ModuleLoaderMap.java
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   152
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   153
$(SUPPORT_OUTPUTDIR)/gensrc/java.base/jdk/internal/vm/cds/resources/ModuleLoaderMap.dat: \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   154
    $(JDK_TOPDIR)/src/java.base/share/classes/jdk/internal/vm/cds/resources/ModuleLoaderMap.dat \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   155
    $(VARDEPS_FILE) $(BUILD_TOOLS_JDK)
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   156
	$(MKDIR) -p $(@D)
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   157
	$(RM) $@ $@.tmp
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   158
	$(TOOL_GENCLASSLOADERMAP) -boot $(BOOT_MODULES_LIST) \
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   159
	    -platform $(PLATFORM_MODULES_LIST) -o $@.tmp $<
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   160
	$(MV) $@.tmp $@
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   161
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   162
GENSRC_JAVA_BASE += $(SUPPORT_OUTPUTDIR)/gensrc/java.base/jdk/internal/vm/cds/resources/ModuleLoaderMap.dat
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   163
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   164
################################################################################