jdk/makefiles/GenerateClasses.gmk
changeset 12317 9670c1610c53
child 12892 3ef14bab6254
equal deleted inserted replaced
12316:ba6b7a51e226 12317:9670c1610c53
       
     1 #
       
     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 
       
    26 default: all
       
    27 
       
    28 include $(SPEC)
       
    29 include MakeBase.gmk
       
    30 include RMICompile.gmk
       
    31 
       
    32 CLASSES_DIR := $(JDK_OUTPUTDIR)/classes
       
    33 # Depend on files in newclasses for now to avoid bad dependency handling caused by
       
    34 # copy always updating timestamps in classes.
       
    35 NEWCLASSES_DIR := $(JDK_OUTPUTDIR)/newclasses
       
    36 # Generate classes into separate dir for now. Can't drop in same dir as JavaCompilation 
       
    37 # macros as that will mess up recompile deps.
       
    38 STUB_CLASSES_DIR := $(JDK_OUTPUTDIR)/newrmicclasses
       
    39 RMIC_GENSRC_DIR := $(JDK_OUTPUTDIR)/gendocsrc_rmic
       
    40 
       
    41 GENCLASSES :=
       
    42 
       
    43 ##########################################################################################
       
    44 #
       
    45 # Generate RMI stubs
       
    46 #
       
    47 
       
    48 $(eval $(call SetupRMICompilation,RMI_12,\
       
    49 		CLASSES:=sun.rmi.server.Activation$$$$ActivationSystemImpl\
       
    50 			 java.rmi.activation.ActivationGroup\
       
    51 			 com.sun.jndi.rmi.registry.ReferenceWrapper,\
       
    52 		CLASSES_DIR:=$(NEWCLASSES_DIR),\
       
    53 		STUB_CLASSES_DIR:=$(STUB_CLASSES_DIR),\
       
    54 		RUN_V12:=true))
       
    55 GENCLASSES += $(RMI_12)
       
    56 
       
    57 $(eval $(call SetupRMICompilation,RMI_11,\
       
    58 		CLASSES:=sun.rmi.registry.RegistryImpl\
       
    59 			 sun.rmi.transport.DGCImpl,\
       
    60 		CLASSES_DIR:=$(NEWCLASSES_DIR),\
       
    61 		STUB_CLASSES_DIR:=$(STUB_CLASSES_DIR),\
       
    62 		RUN_V11:=true))
       
    63 GENCLASSES += $(RMI_11)
       
    64 
       
    65 # For RMI/IIOP call rmic a second time with -standardPackage option
       
    66 # so that *_tie classes are generated in package without the prefix
       
    67 # org.omg.stub (6375696)
       
    68 JMAN_RMI_CLASSES:=javax.management.remote.rmi.RMIConnectionImpl\
       
    69 		  javax.management.remote.rmi.RMIServerImpl
       
    70 $(eval $(call SetupRMICompilation,RMI_IIOP,\
       
    71 		CLASSES:=$(JMAN_RMI_CLASSES),\
       
    72 		CLASSES_DIR:=$(NEWCLASSES_DIR),\
       
    73 		STUB_CLASSES_DIR:=$(STUB_CLASSES_DIR),\
       
    74 		RUN_V12:=true,\
       
    75 		RUN_IIOP:=true,\
       
    76 		RUN_IIOP_STDPKG:=true))
       
    77 GENCLASSES += $(RMI_IIOP)
       
    78 
       
    79 # Keep generated RMI/JRMP Stub source files and copy them to RMIC_GENSRC_DIR
       
    80 # so that javadoc can include them in the API (4997471)
       
    81 $(eval $(call SetupRMICompilation,RMI_SRC,\
       
    82 		CLASSES:=$(JMAN_RMI_CLASSES),\
       
    83 		CLASSES_DIR:=$(NEWCLASSES_DIR),\
       
    84 		STUB_CLASSES_DIR:=$(RMIC_GENSRC_DIR),\
       
    85 		RUN_V12:=true,\
       
    86 		KEEP_GENERATED:=true))
       
    87 GENCLASSES += $(filter %.java,$(RMI_SRC))
       
    88 
       
    89 ##########################################################################################
       
    90 
       
    91 all: $(GENCLASSES)
       
    92 	$(FIND) $(RMIC_GENSRC_DIR) -name "*.class" $(FIND_DELETE)
       
    93 	$(CP) -rp $(STUB_CLASSES_DIR)/* $(CLASSES_DIR)
       
    94 
       
    95 .PHONY: all