blob: a5e68c8b77e5d6c171d7ecb2d0f594d47ad48ec7 [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
30include RMICompile.gmk
31
32CLASSES_DIR := $(JDK_OUTPUTDIR)/classes
erikje78df742012-06-07 20:40:50 -070033# NOTE: If the smart javac dependency management is reintroduced, these classes risk
34# interfering with the dependency checking. In that case they will need to be kept separate.
35STUB_CLASSES_DIR := $(JDK_OUTPUTDIR)/rmicclasses
ohair92de5662012-04-10 08:22:03 -070036RMIC_GENSRC_DIR := $(JDK_OUTPUTDIR)/gendocsrc_rmic
37
38GENCLASSES :=
39
40##########################################################################################
41#
42# Generate RMI stubs
43#
44
45$(eval $(call SetupRMICompilation,RMI_12,\
46 CLASSES:=sun.rmi.server.Activation$$$$ActivationSystemImpl\
47 java.rmi.activation.ActivationGroup\
48 com.sun.jndi.rmi.registry.ReferenceWrapper,\
erikje78df742012-06-07 20:40:50 -070049 CLASSES_DIR:=$(CLASSES_DIR),\
ohair92de5662012-04-10 08:22:03 -070050 STUB_CLASSES_DIR:=$(STUB_CLASSES_DIR),\
51 RUN_V12:=true))
52GENCLASSES += $(RMI_12)
53
54$(eval $(call SetupRMICompilation,RMI_11,\
55 CLASSES:=sun.rmi.registry.RegistryImpl\
56 sun.rmi.transport.DGCImpl,\
erikje78df742012-06-07 20:40:50 -070057 CLASSES_DIR:=$(CLASSES_DIR),\
ohair92de5662012-04-10 08:22:03 -070058 STUB_CLASSES_DIR:=$(STUB_CLASSES_DIR),\
59 RUN_V11:=true))
60GENCLASSES += $(RMI_11)
61
62# For RMI/IIOP call rmic a second time with -standardPackage option
63# so that *_tie classes are generated in package without the prefix
64# org.omg.stub (6375696)
65JMAN_RMI_CLASSES:=javax.management.remote.rmi.RMIConnectionImpl\
66 javax.management.remote.rmi.RMIServerImpl
67$(eval $(call SetupRMICompilation,RMI_IIOP,\
68 CLASSES:=$(JMAN_RMI_CLASSES),\
erikje78df742012-06-07 20:40:50 -070069 CLASSES_DIR:=$(CLASSES_DIR),\
ohair92de5662012-04-10 08:22:03 -070070 STUB_CLASSES_DIR:=$(STUB_CLASSES_DIR),\
71 RUN_V12:=true,\
72 RUN_IIOP:=true,\
73 RUN_IIOP_STDPKG:=true))
74GENCLASSES += $(RMI_IIOP)
75
76# Keep generated RMI/JRMP Stub source files and copy them to RMIC_GENSRC_DIR
77# so that javadoc can include them in the API (4997471)
78$(eval $(call SetupRMICompilation,RMI_SRC,\
79 CLASSES:=$(JMAN_RMI_CLASSES),\
erikje78df742012-06-07 20:40:50 -070080 CLASSES_DIR:=$(CLASSES_DIR),\
ohair92de5662012-04-10 08:22:03 -070081 STUB_CLASSES_DIR:=$(RMIC_GENSRC_DIR),\
82 RUN_V12:=true,\
83 KEEP_GENERATED:=true))
84GENCLASSES += $(filter %.java,$(RMI_SRC))
85
86##########################################################################################
87
88all: $(GENCLASSES)
89 $(FIND) $(RMIC_GENSRC_DIR) -name "*.class" $(FIND_DELETE)
90 $(CP) -rp $(STUB_CLASSES_DIR)/* $(CLASSES_DIR)
91
92.PHONY: all