J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame^] | 1 | # |
| 2 | # Copyright 2003-2006 Sun Microsystems, Inc. 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. Sun designates this |
| 8 | # particular file as subject to the "Classpath" exception as provided |
| 9 | # by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
| 22 | # CA 95054 USA or visit www.sun.com if you need additional information or |
| 23 | # have any questions. |
| 24 | # |
| 25 | |
| 26 | # |
| 27 | # Makefile for building RMI stubs of JMX Remote |
| 28 | # |
| 29 | |
| 30 | BUILDDIR = ../../.. |
| 31 | PACKAGE = javax.management |
| 32 | PRODUCT = sun |
| 33 | include $(BUILDDIR)/common/Defs.gmk |
| 34 | |
| 35 | # |
| 36 | # Files to compile |
| 37 | # |
| 38 | |
| 39 | # NO java files to compile: already compiled in javax/management/Makefile |
| 40 | |
| 41 | # Note : some targets are double colon rules and some single colon rules |
| 42 | # within common included gmk files : that is why the following for loop |
| 43 | # has been duplicated. |
| 44 | SUBDIRS = snmp |
| 45 | |
| 46 | all build: |
| 47 | $(SUBDIRS-loop) |
| 48 | |
| 49 | clean clobber:: |
| 50 | $(SUBDIRS-loop) |
| 51 | |
| 52 | # |
| 53 | # Rules |
| 54 | # |
| 55 | include $(BUILDDIR)/common/Classes.gmk |
| 56 | |
| 57 | build: stubs |
| 58 | |
| 59 | # |
| 60 | # Clean up internal-use-only package. |
| 61 | # |
| 62 | clean :: |
| 63 | $(RM) -r $(CLASSDESTDIR)/com/sun/jmx \ |
| 64 | $(CLASSDESTDIR)/com/sun/management/jmx \ |
| 65 | $(CLASSDESTDIR)/org/omg/stub/javax/management/remote/rmi \ |
| 66 | |
| 67 | |
| 68 | # |
| 69 | # The remainder of this makefile contains defs and rules |
| 70 | # for generating RMI stubs. |
| 71 | # With inspiration from com/sun/jndi/rmi/registry |
| 72 | # |
| 73 | |
| 74 | # |
| 75 | # Full class names of implementations requiring stubs |
| 76 | # |
| 77 | REMOTE_impls = \ |
| 78 | javax.management.remote.rmi.RMIConnectionImpl \ |
| 79 | javax.management.remote.rmi.RMIServerImpl \ |
| 80 | |
| 81 | |
| 82 | REMOTE_files = $(subst .,/,$(REMOTE_impls)) |
| 83 | FILES_stubs = $(REMOTE_files:%=$(CLASSDESTDIR)/%_Stub.class) |
| 84 | FILES_ties = $(subst javax/management/remote/rmi/,javax/management/remote/rmi/_,$(REMOTE_files:%=$(CLASSDESTDIR)/%_Tie.class)) |
| 85 | |
| 86 | |
| 87 | # |
| 88 | # Compile stubs and skeletons for remote implementations |
| 89 | # |
| 90 | # Keep generated RMI/JRMP Stub source files and copy them to GENSRCDIR |
| 91 | # so that javadoc can include them in the API (4997471) |
| 92 | # |
| 93 | # For RMI/IIOP call rmic a second time with -standardPackage option |
| 94 | # so that *_tie classes are generated in package without the prefix |
| 95 | # org.omg.stub (6375696) |
| 96 | # |
| 97 | $(CLASSDESTDIR)/%_Stub.class: $(CLASSDESTDIR)/%.class |
| 98 | $(prep-target) |
| 99 | $(RMIC) -classpath "$(CLASSDESTDIR)" \ |
| 100 | -d $(CLASSDESTDIR) \ |
| 101 | -v1.2 \ |
| 102 | -keepgenerated \ |
| 103 | $(subst /,.,$(<:$(CLASSDESTDIR)/%.class=%)) |
| 104 | $(MKDIR) -p $(@D:$(CLASSDESTDIR)/%=$(GENSRCDIR)/%) |
| 105 | $(CP) $(@:%.class=%.java) \ |
| 106 | $(@D:$(CLASSDESTDIR)/%=$(GENSRCDIR)/%) |
| 107 | $(RMIC) -classpath "$(CLASSDESTDIR)" \ |
| 108 | -d $(CLASSDESTDIR) \ |
| 109 | -iiop -v1.2 \ |
| 110 | $(subst /,.,$(<:$(CLASSDESTDIR)/%.class=%)) |
| 111 | $(RMIC) $(HOTSPOT_INTERPRETER_FLAG) -classpath "$(CLASSDESTDIR)" \ |
| 112 | -d $(CLASSDESTDIR) \ |
| 113 | -iiop -v1.2 \ |
| 114 | -standardPackage \ |
| 115 | $(subst /,.,$(<:$(CLASSDESTDIR)/%.class=%)) |
| 116 | @$(java-vm-cleanup) |
| 117 | |
| 118 | stubs: $(FILES_stubs) |