Makefile revision 514
2605N/A#
2605N/A# Copyright 2003-2006 Sun Microsystems, Inc. All Rights Reserved.
2605N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4070N/A#
2605N/A# This code is free software; you can redistribute it and/or modify it
2605N/A# under the terms of the GNU General Public License version 2 only, as
2605N/A# published by the Free Software Foundation. Sun designates this
2605N/A# particular file as subject to the "Classpath" exception as provided
2605N/A# by Sun in the LICENSE file that accompanied this code.
2605N/A#
2605N/A# This code is distributed in the hope that it will be useful, but WITHOUT
2605N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2605N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
2605N/A# version 2 for more details (a copy is included in the LICENSE file that
2605N/A# accompanied this code).
2605N/A#
2605N/A# You should have received a copy of the GNU General Public License version
2605N/A# 2 along with this work; if not, write to the Free Software Foundation,
2605N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2605N/A#
2605N/A# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
2605N/A# CA 95054 USA or visit www.sun.com if you need additional information or
2605N/A# have any questions.
2605N/A#
2605N/A
2605N/A#
2605N/A# Makefile for building RMI stubs of JMX Remote
2605N/A#
2605N/A
2605N/ABUILDDIR = ../../..
2605N/APACKAGE = javax.management
2605N/APRODUCT = sun
4070N/Ainclude $(BUILDDIR)/common/Defs.gmk
4070N/A
4070N/A#
4070N/A# Files to compile
4070N/A#
2900N/A
2900N/A# NO java files to compile: already compiled in javax/management/Makefile
2900N/A
2900N/A# Note : some targets are double colon rules and some single colon rules
2900N/A# within common included gmk files : that is why the following for loop
4070N/A# has been duplicated.
4070N/ASUBDIRS = snmp
4070N/A
4070N/Aall build:
4070N/A $(SUBDIRS-loop)
2900N/A
2900N/Aclean clobber::
4507N/A $(SUBDIRS-loop)
2605N/A
2605N/A#
2605N/A# Rules
2605N/A#
2605N/Ainclude $(BUILDDIR)/common/Classes.gmk
2605N/A
2605N/Abuild: stubs
2605N/A
2605N/A#
2605N/A# Clean up internal-use-only package.
2605N/A#
2605N/Aclean ::
2605N/A $(RM) -r $(CLASSDESTDIR)/com/sun/jmx \
2605N/A $(CLASSDESTDIR)/com/sun/management/jmx \
2605N/A $(CLASSDESTDIR)/org/omg/stub/javax/management/remote/rmi \
2605N/A
2605N/A
2605N/A#
2605N/A# The remainder of this makefile contains defs and rules
2605N/A# for generating RMI stubs.
2605N/A# With inspiration from com/sun/jndi/rmi/registry
2605N/A#
2605N/A
2605N/A#
2605N/A# Full class names of implementations requiring stubs
2605N/A#
2605N/AREMOTE_impls = \
2605N/A javax.management.remote.rmi.RMIConnectionImpl \
2605N/A javax.management.remote.rmi.RMIServerImpl \
2605N/A
2605N/A
2605N/AREMOTE_files = $(subst .,/,$(REMOTE_impls))
2605N/AFILES_stubs = $(REMOTE_files:%=$(CLASSDESTDIR)/%_Stub.class)
2605N/AFILES_ties = $(subst javax/management/remote/rmi/,javax/management/remote/rmi/_,$(REMOTE_files:%=$(CLASSDESTDIR)/%_Tie.class))
2605N/A
2605N/A
2605N/A#
# Compile stubs and skeletons for remote implementations
#
# Keep generated RMI/JRMP Stub source files and copy them to GENSRCDIR
# so that javadoc can include them in the API (4997471)
#
# For RMI/IIOP call rmic a second time with -standardPackage option
# so that *_tie classes are generated in package without the prefix
# org.omg.stub (6375696)
#
$(CLASSDESTDIR)/%_Stub.class: $(CLASSDESTDIR)/%.class
$(prep-target)
$(RMIC) -classpath "$(CLASSDESTDIR)" \
-d $(CLASSDESTDIR) \
-v1.2 \
-keepgenerated \
$(subst /,.,$(<:$(CLASSDESTDIR)/%.class=%))
$(MKDIR) -p $(@D:$(CLASSDESTDIR)/%=$(GENSRCDIR)/%)
$(CP) $(@:%.class=%.java) \
$(@D:$(CLASSDESTDIR)/%=$(GENSRCDIR)/%)
$(RMIC) -classpath "$(CLASSDESTDIR)" \
-d $(CLASSDESTDIR) \
-iiop -v1.2 \
$(subst /,.,$(<:$(CLASSDESTDIR)/%.class=%))
$(RMIC) $(HOTSPOT_INTERPRETER_FLAG) -classpath "$(CLASSDESTDIR)" \
-d $(CLASSDESTDIR) \
-iiop -v1.2 \
-standardPackage \
$(subst /,.,$(<:$(CLASSDESTDIR)/%.class=%))
@$(java-vm-cleanup)
stubs: $(FILES_stubs)