ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 1 | # |
erikj | 7165548 | 2013-10-16 13:50:13 +0200 | [diff] [blame] | 2 | # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 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 |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 30 | include RMICompilation.gmk |
erikj | 7165548 | 2013-10-16 13:50:13 +0200 | [diff] [blame] | 31 | include JavaCompilation.gmk |
| 32 | include Setup.gmk |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 33 | |
erikj | 7165548 | 2013-10-16 13:50:13 +0200 | [diff] [blame] | 34 | ########################################################################################## |
| 35 | |
| 36 | RMIC_PKGS := \ |
| 37 | sun/rmi/rmic \ |
| 38 | sun/tools/asm \ |
| 39 | sun/tools/java \ |
| 40 | sun/tools/javac \ |
| 41 | sun/tools/tree \ |
| 42 | sun/tools/util \ |
| 43 | # |
| 44 | |
| 45 | $(eval $(call SetupJavaCompilation,BUILD_BOOTSTRAP_RMIC, \ |
| 46 | SETUP := GENERATE_OLDBYTECODE, \ |
| 47 | SRC := $(JDK_TOPDIR)/src/share/classes, \ |
| 48 | INCLUDES := $(RMIC_PKGS), \ |
| 49 | BIN := $(JDK_OUTPUTDIR)/btclasses_rmic, \ |
| 50 | COPY := .properties, \ |
| 51 | JAVAC_SOURCE_PATH_OVERRIDE := $(addprefix $(JDK_TOPDIR)/src/share/classes/, $(RMIC_PKGS)))) |
| 52 | |
| 53 | ########################################################################################## |
| 54 | |
| 55 | BTRMIC_CP := $(CORBA_OUTPUTDIR)/btjars/btcorba.jar$(PATH_SEP)$(JDK_OUTPUTDIR)/btclasses_rmic$(PATH_SEP)$(BOOTSTRAP_JAVAC_JAR) |
wetmore | 6cb19c8 | 2013-10-16 23:32:19 -0700 | [diff] [blame] | 56 | BTRMIC_ARGS := "-Xbootclasspath/p:$(BTRMIC_CP)" -cp "$(BTRMIC_CP)" |
erikj | 7165548 | 2013-10-16 13:50:13 +0200 | [diff] [blame] | 57 | RMIC := $(JAVA) $(BTRMIC_ARGS) sun.rmi.rmic.Main |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 58 | |
| 59 | CLASSES_DIR := $(JDK_OUTPUTDIR)/classes |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 60 | # NOTE: If the smart javac dependency management is reintroduced, these classes risk |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 61 | # interfering with the dependency checking. In that case they will need to be kept separate. |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 62 | STUB_CLASSES_DIR := $(JDK_OUTPUTDIR)/classes |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 63 | RMIC_GENSRC_DIR := $(JDK_OUTPUTDIR)/gendocsrc_rmic |
| 64 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 65 | GENCLASSES := |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 66 | |
| 67 | ########################################################################################## |
| 68 | # |
| 69 | # Generate RMI stubs |
| 70 | # |
| 71 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 72 | $(eval $(call SetupRMICompilation,RMI_12, \ |
| 73 | CLASSES := sun.rmi.server.Activation$$$$ActivationSystemImpl \ |
| 74 | java.rmi.activation.ActivationGroup \ |
| 75 | com.sun.jndi.rmi.registry.ReferenceWrapper, \ |
| 76 | CLASSES_DIR := $(CLASSES_DIR), \ |
| 77 | STUB_CLASSES_DIR := $(STUB_CLASSES_DIR), \ |
| 78 | RUN_V12 := true)) |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 79 | GENCLASSES += $(RMI_12) |
| 80 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 81 | $(eval $(call SetupRMICompilation,RMI_11, \ |
| 82 | CLASSES := sun.rmi.registry.RegistryImpl \ |
| 83 | sun.rmi.transport.DGCImpl, \ |
| 84 | CLASSES_DIR := $(CLASSES_DIR), \ |
| 85 | STUB_CLASSES_DIR := $(STUB_CLASSES_DIR), \ |
| 86 | RUN_V11 := true)) |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 87 | GENCLASSES += $(RMI_11) |
| 88 | |
| 89 | # For RMI/IIOP call rmic a second time with -standardPackage option |
| 90 | # so that *_tie classes are generated in package without the prefix |
| 91 | # org.omg.stub (6375696) |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 92 | JMAN_RMI_CLASSES := javax.management.remote.rmi.RMIConnectionImpl \ |
| 93 | javax.management.remote.rmi.RMIServerImpl |
| 94 | $(eval $(call SetupRMICompilation,RMI_IIOP, \ |
| 95 | CLASSES := $(JMAN_RMI_CLASSES), \ |
| 96 | CLASSES_DIR := $(CLASSES_DIR), \ |
| 97 | STUB_CLASSES_DIR := $(STUB_CLASSES_DIR), \ |
| 98 | RUN_V12 := true, \ |
| 99 | RUN_IIOP := true, \ |
| 100 | RUN_IIOP_STDPKG := true)) |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 101 | GENCLASSES += $(RMI_IIOP) |
| 102 | |
| 103 | # Keep generated RMI/JRMP Stub source files and copy them to RMIC_GENSRC_DIR |
| 104 | # so that javadoc can include them in the API (4997471) |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 105 | $(eval $(call SetupRMICompilation,RMI_SRC, \ |
| 106 | CLASSES := $(JMAN_RMI_CLASSES), \ |
| 107 | CLASSES_DIR := $(CLASSES_DIR), \ |
| 108 | STUB_CLASSES_DIR := $(RMIC_GENSRC_DIR), \ |
| 109 | RUN_V12 := true, \ |
| 110 | KEEP_GENERATED := true)) |
| 111 | GENCLASSES += $(filter %.java, $(RMI_SRC)) |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 112 | |
| 113 | ########################################################################################## |
| 114 | |
erikj | 7165548 | 2013-10-16 13:50:13 +0200 | [diff] [blame] | 115 | $(RMI_12) $(RMI_11) $(RMI_IIOP) $(RMI_SRC): $(BUILD_BOOTSTRAP_RMIC) |
| 116 | |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 117 | $(RMIC_GENSRC_DIR)/_the.classes.removed: $(GENCLASSES) |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 118 | $(FIND) $(RMIC_GENSRC_DIR) -name "*.class" $(FIND_DELETE) |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 119 | $(TOUCH) $@ |
| 120 | |
| 121 | all: $(RMIC_GENSRC_DIR)/_the.classes.removed $(GENCLASSES) |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 122 | |
| 123 | .PHONY: all |