blob: 4c683530652fdbb31911a6974537971d95e67677 [file] [log] [blame]
ohair92de5662012-04-10 08:22:03 -07001#
2# Copyright (c) 2011, 2012, 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
26default: all
27
28include $(SPEC)
29include MakeBase.gmk
erikjaf85fc42012-07-03 16:10:44 -070030include RMICompilation.gmk
31
32# To ensure the latest stub generator files are picked up from corba repo
ihsea29e6222013-10-10 15:06:21 +020033# when available, we need to run with latest rmic version available.
34ifneq ($(COMPILE_TYPE), cross)
35 RMIC := $(FIXPATH) $(JDK_OUTPUTDIR)/bin/rmic
36endif
ohair92de5662012-04-10 08:22:03 -070037
38CLASSES_DIR := $(JDK_OUTPUTDIR)/classes
ihsea29e6222013-10-10 15:06:21 +020039# NOTE: If the smart javac dependency management is reintroduced, these classes risk
erikje78df742012-06-07 20:40:50 -070040# interfering with the dependency checking. In that case they will need to be kept separate.
ohairb71409c2012-10-26 14:23:29 -070041STUB_CLASSES_DIR := $(JDK_OUTPUTDIR)/classes
ohair92de5662012-04-10 08:22:03 -070042RMIC_GENSRC_DIR := $(JDK_OUTPUTDIR)/gendocsrc_rmic
43
ihsea29e6222013-10-10 15:06:21 +020044GENCLASSES :=
ohair92de5662012-04-10 08:22:03 -070045
46##########################################################################################
47#
48# Generate RMI stubs
49#
50
ihsea29e6222013-10-10 15:06:21 +020051$(eval $(call SetupRMICompilation,RMI_12, \
52 CLASSES := sun.rmi.server.Activation$$$$ActivationSystemImpl \
53 java.rmi.activation.ActivationGroup \
54 com.sun.jndi.rmi.registry.ReferenceWrapper, \
55 CLASSES_DIR := $(CLASSES_DIR), \
56 STUB_CLASSES_DIR := $(STUB_CLASSES_DIR), \
57 RUN_V12 := true))
ohair92de5662012-04-10 08:22:03 -070058GENCLASSES += $(RMI_12)
59
ihsea29e6222013-10-10 15:06:21 +020060$(eval $(call SetupRMICompilation,RMI_11, \
61 CLASSES := sun.rmi.registry.RegistryImpl \
62 sun.rmi.transport.DGCImpl, \
63 CLASSES_DIR := $(CLASSES_DIR), \
64 STUB_CLASSES_DIR := $(STUB_CLASSES_DIR), \
65 RUN_V11 := true))
ohair92de5662012-04-10 08:22:03 -070066GENCLASSES += $(RMI_11)
67
68# For RMI/IIOP call rmic a second time with -standardPackage option
69# so that *_tie classes are generated in package without the prefix
70# org.omg.stub (6375696)
ihsea29e6222013-10-10 15:06:21 +020071JMAN_RMI_CLASSES := javax.management.remote.rmi.RMIConnectionImpl \
72 javax.management.remote.rmi.RMIServerImpl
73$(eval $(call SetupRMICompilation,RMI_IIOP, \
74 CLASSES := $(JMAN_RMI_CLASSES), \
75 CLASSES_DIR := $(CLASSES_DIR), \
76 STUB_CLASSES_DIR := $(STUB_CLASSES_DIR), \
77 RUN_V12 := true, \
78 RUN_IIOP := true, \
79 RUN_IIOP_STDPKG := true))
ohair92de5662012-04-10 08:22:03 -070080GENCLASSES += $(RMI_IIOP)
81
82# Keep generated RMI/JRMP Stub source files and copy them to RMIC_GENSRC_DIR
83# so that javadoc can include them in the API (4997471)
ihsea29e6222013-10-10 15:06:21 +020084$(eval $(call SetupRMICompilation,RMI_SRC, \
85 CLASSES := $(JMAN_RMI_CLASSES), \
86 CLASSES_DIR := $(CLASSES_DIR), \
87 STUB_CLASSES_DIR := $(RMIC_GENSRC_DIR), \
88 RUN_V12 := true, \
89 KEEP_GENERATED := true))
90GENCLASSES += $(filter %.java, $(RMI_SRC))
ohair92de5662012-04-10 08:22:03 -070091
92##########################################################################################
93
ohairb71409c2012-10-26 14:23:29 -070094$(RMIC_GENSRC_DIR)/_the.classes.removed: $(GENCLASSES)
ohair92de5662012-04-10 08:22:03 -070095 $(FIND) $(RMIC_GENSRC_DIR) -name "*.class" $(FIND_DELETE)
ohairb71409c2012-10-26 14:23:29 -070096 $(TOUCH) $@
97
98all: $(RMIC_GENSRC_DIR)/_the.classes.removed $(GENCLASSES)
ohair92de5662012-04-10 08:22:03 -070099
100.PHONY: all