Makefile revision 5091
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen# Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
fd3994922cf234a59a83500933a0ac8f132c308dTimo Sirainen# This code is free software; you can redistribute it and/or modify it
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen# under the terms of the GNU General Public License version 2 only, as
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen# published by the Free Software Foundation. Oracle designates this
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen# particular file as subject to the "Classpath" exception as provided
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen# by Oracle in the LICENSE file that accompanied this code.
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen# This code is distributed in the hope that it will be useful, but WITHOUT
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen# version 2 for more details (a copy is included in the LICENSE file that
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen# accompanied this code).
1b33e848e84e6f74aa0e3339c32fa96bc15102a2Timo Sirainen# You should have received a copy of the GNU General Public License version
1b33e848e84e6f74aa0e3339c32fa96bc15102a2Timo Sirainen# 2 along with this work; if not, write to the Free Software Foundation,
1b33e848e84e6f74aa0e3339c32fa96bc15102a2Timo Sirainen# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen# or visit www.oracle.com if you need additional information or have any
009217abb57a24a4076092e8e4e165545747839eStephan Bosch# Makefile for building RMI stubs of JMX Remote
4b94ae3dcbace4781b64e87aea00ec0bc03a0d8aTimo Sirainen# Files to compile
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen# NO java files to compile: already compiled in javax/management/Makefile
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen# Note : some targets are double colon rules and some single colon rules
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen# within common included gmk files : that is why the following for loop
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen# has been duplicated.
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen# When building the openjdk, no snmp
f69f7373151940308b18a9e16f9cf3dc56d4184eTimo Sirainen# Clean up internal-use-only package.
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen $(CLASSDESTDIR)/org/omg/stub/javax/management/remote/rmi \
009217abb57a24a4076092e8e4e165545747839eStephan Bosch# The remainder of this makefile contains defs and rules
009217abb57a24a4076092e8e4e165545747839eStephan Bosch# for generating RMI stubs.
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen# With inspiration from com/sun/jndi/rmi/registry
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen# Full class names of implementations requiring stubs
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen javax.management.remote.rmi.RMIConnectionImpl \
d63b4241643b6014d49ff356f14e0f3ee43068a8Timo SirainenFILES_stubs = $(REMOTE_files:%=$(CLASSDESTDIR)/%_Stub.class)
7744586e3e0fd60158abfbb03a233d3bd8d6c48bTimo SirainenFILES_ties = $(subst javax/management/remote/rmi/,javax/management/remote/rmi/_,$(REMOTE_files:%=$(CLASSDESTDIR)/%_Tie.class))
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen# Compile stubs and skeletons for remote implementations
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen# Keep generated RMI/JRMP Stub source files and copy them to GENSRCDIR
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen# so that javadoc can include them in the API (4997471)
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen# For RMI/IIOP call rmic a second time with -standardPackage option
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen# so that *_tie classes are generated in package without the prefix
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen# To ensure the latest stub generator files are picked up from corba repo
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen# when available, we need to run with latest rmic version available. rmic
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen# launch tool not built at this stage but we can invoke via rmi class.
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen# need to treat 64bit solaris differently
a64adf62fa33f2463a86f990217b0c9078531a40Timo SirainenRMIC = $(RMIC_JAVA) $(JAVA_TOOLS_FLAGS) -cp $(OUTPUTDIR)/classes sun.rmi.rmic.Main
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen$(CLASSDESTDIR)/%_Stub.class: $(CLASSDESTDIR)/%.class
9047ee8712a22bfa5e07394bea113fead39e24a9Timo Sirainen $(MKDIR) -p $(@D:$(CLASSDESTDIR)/%=$(GENSRCDIR)/%)