view make/com/sun/corba/se/sources/Makefile @ 0:55540e827aef

Initial load
author duke
date Sat, 01 Dec 2007 00:00:00 +0000
parents
children 6e0cf0dc59e5
line wrap: on
line source
#
# Copyright 2000-2006 Sun Microsystems, Inc.  All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.  Sun designates this
# particular file as subject to the "Classpath" exception as provided
# by Sun in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#

BUILDDIR = ../../../../..

PACKAGE = com.sun.corba.se
PRODUCT = org

include $(BUILDDIR)/common/Defs.gmk

#
# Rules
#
all: build

build: portableactivation.idl.compile logwrapper.generate logresource.generate 

clean clobber:: portableactivation.idl.clean

#
# Files
#
CORBA_JMK_DIRECTORY=$(TOPDIR)/make/com/sun/corba/minclude/
include $(CORBA_JMK_DIRECTORY)com_sun_corba_se_PortableActivationIDL.jmk
include $(CORBA_JMK_DIRECTORY)com_sun_corba_se_impl_logging.jmk

#
# Dirs
#

SRC_DIR = $(SHARE_SRC)/classes
CORBA_IDL_DIR = $(SRC_DIR)/org/omg/PortableServer
PI_IDL_DIR = $(SRC_DIR)/org/omg/PortableInterceptor

ACTIVATIONFILEDIR         = $(GENSRCDIR)/com/sun/corba/se/spi/activation
PORTABLEACTIVATIONFILEDIR = $(GENSRCDIR)/com/sun/corba/se/PortableActivationIDL
LOG_GENDIRECTORY          = $(GENSRCDIR)/com/sun/corba/se/impl/logging

#
# IDLs
#

ACTIVATION.IDL = $(SRC_DIR)/com/sun/corba/se/spi/activation/activation.idl
PORTABLEACTIVATION.IDL = $(SRC_DIR)/com/sun/corba/se/PortableActivationIDL/activation.idl


#
# .mc files
#
ACTIVATION.MC   = $(SRC_DIR)/com/sun/corba/se/spi/logging/data/Activation.mc
IOR.MC          = $(SRC_DIR)/com/sun/corba/se/spi/logging/data/IOR.mc
INTERCEPTORS.MC = $(SRC_DIR)/com/sun/corba/se/spi/logging/data/Interceptors.mc
NAMING.MC       = $(SRC_DIR)/com/sun/corba/se/spi/logging/data/Naming.mc
OMG.MC          = $(SRC_DIR)/com/sun/corba/se/spi/logging/data/OMG.mc
ORBUTIL.MC      = $(SRC_DIR)/com/sun/corba/se/spi/logging/data/ORBUtil.mc
POA.MC          = $(SRC_DIR)/com/sun/corba/se/spi/logging/data/POA.mc
UTIL.MC         = $(SRC_DIR)/com/sun/corba/se/spi/logging/data/Util.mc

MC_GENERATE_CLASS = $(SRC_DIR)/com/sun/tools/corba/se/logutil/scripts/mc.scm -main main make-class
MC_GENERATE_LOG_RB = $(SRC_DIR)/com/sun/tools/corba/se/logutil/scripts/mc.scm -main main make-resource 

JSCHEME_GENERATE_CLASS = $(BOOT_JAVA_CMD) jscheme.REPL $(MC_GENERATE_CLASS) 
JSCHEME_GENERATE_LOG_RB = $(BOOT_JAVA_CMD) jscheme.REPL $(MC_GENERATE_LOG_RB) 


#
# Activation 
#

ACTIVATIONFILES = $(com_sun_corba_se_spi_activation_java:%=$(GENSRCDIR)/%)

$(ACTIVATIONFILES): $(ACTIVATION.IDL)
	$(IDLJ) -td $(GENSRCDIR) -i $(ACTIVATIONFILEDIR) -fall -oldImplBase -pkgPrefix activation com.sun.corba.se.spi $(ACTIVATION.IDL)

activation.idl.compile: $(ACTIVATIONFILES)

activation.idl.clean:
	$(RM) -f $(ACTIVATIONFILES)

#
# PortableActivationIDL
#

PORTABLEACTIVATIONFILES = $(com_sun_corba_se_PortableActivationIDL_java:%=$(GENSRCDIR)/%)

PORTABLEACTIVATION_INCLUDES = -i $(CORBA_IDL_DIR) -i $(PI_IDL_DIR)

PORTABLEACTIVATION_PKG_PREFIXES = -pkgPrefix PortableInterceptor org.omg \
    -pkgPrefix PortableActivationIDL com.sun.corba.se \
    -pkgPrefix Dynamic org.omg \
    -pkgPrefix IOP org.omg

# REVISIT: remove -oldImplBase
$(PORTABLEACTIVATIONFILES): $(PORTABLEACTIVATION.IDL)
	$(IDLJ) -td $(GENSRCDIR) $(PORTABLEACTIVATION_INCLUDES) $(PORTABLEACTIVATION_PKG_PREFIXES) -fall -oldImplBase -corba 3.0 -D CORBA3 $(PORTABLEACTIVATION.IDL)

portableactivation.idl.compile: $(PORTABLEACTIVATIONFILES)

portableactivation.idl.clean:
	$(RM) -f $(PORTABLEACTIVATIONFILES)

#
# Generate LogWrapper classes
#
logwrapper.generate: \
	$(LOG_GENDIRECTORY)/ActivationSystemException.java \
	$(LOG_GENDIRECTORY)/IORSystemException.java \
	$(LOG_GENDIRECTORY)/InterceptorsSystemException.java \
	$(LOG_GENDIRECTORY)/NamingSystemException.java \
	$(LOG_GENDIRECTORY)/OMGSystemException.java \
	$(LOG_GENDIRECTORY)/ORBUtilSystemException.java \
	$(LOG_GENDIRECTORY)/POASystemException.java \
	$(LOG_GENDIRECTORY)/UtilSystemException.java

$(LOG_GENDIRECTORY)/ActivationSystemException.java : $(ACTIVATION.MC)
	$(prep-target)
	$(JSCHEME_GENERATE_CLASS) $(ACTIVATION.MC) $(LOG_GENDIRECTORY)

$(LOG_GENDIRECTORY)/IORSystemException.java : $(IOR.MC)
	$(prep-target)
	$(JSCHEME_GENERATE_CLASS) $(IOR.MC) $(LOG_GENDIRECTORY)

$(LOG_GENDIRECTORY)/InterceptorsSystemException.java : $(INTERCEPTORS.MC)
	$(prep-target)
	$(JSCHEME_GENERATE_CLASS) $(INTERCEPTORS.MC) $(LOG_GENDIRECTORY)

$(LOG_GENDIRECTORY)/NamingSystemException.java : $(NAMING.MC)
	$(prep-target)
	$(JSCHEME_GENERATE_CLASS) $(NAMING.MC) $(LOG_GENDIRECTORY)

$(LOG_GENDIRECTORY)/OMGSystemException.java : $(OMG.MC)
	$(prep-target)
	$(JSCHEME_GENERATE_CLASS) $(OMG.MC) $(LOG_GENDIRECTORY)

$(LOG_GENDIRECTORY)/ORBUtilSystemException.java : $(ORBUTIL.MC)
	$(prep-target)
	$(JSCHEME_GENERATE_CLASS) $(ORBUTIL.MC) $(LOG_GENDIRECTORY)

$(LOG_GENDIRECTORY)/POASystemException.java : $(POA.MC)
	$(prep-target)
	$(JSCHEME_GENERATE_CLASS) $(POA.MC) $(LOG_GENDIRECTORY)

$(LOG_GENDIRECTORY)/UtilSystemException.java : $(UTIL.MC)
	$(prep-target)
	$(JSCHEME_GENERATE_CLASS) $(UTIL.MC) $(LOG_GENDIRECTORY)

logresource.generate: $(LOG_GENDIRECTORY)/LogStrings.properties

$(LOG_GENDIRECTORY)/LogStrings.properties: \
		$(LOG_GENDIRECTORY)/ActivationSystemException.resource \
		$(LOG_GENDIRECTORY)/IORSystemException.resource \
		$(LOG_GENDIRECTORY)/InterceptorsSystemException.resource \
		$(LOG_GENDIRECTORY)/NamingSystemException.resource \
		$(LOG_GENDIRECTORY)/OMGSystemException.resource \
		$(LOG_GENDIRECTORY)/ORBUtilSystemException.resource \
		$(LOG_GENDIRECTORY)/POASystemException.resource \
		$(LOG_GENDIRECTORY)/UtilSystemException.resource
	$(CAT) $(LOG_GENDIRECTORY)/*.resource > $(LOG_GENDIRECTORY)/LogStrings.properties

$(LOG_GENDIRECTORY)/ActivationSystemException.resource : $(ACTIVATION.MC)
	$(prep-target)
	$(JSCHEME_GENERATE_LOG_RB) $(ACTIVATION.MC) $(LOG_GENDIRECTORY)

$(LOG_GENDIRECTORY)/IORSystemException.resource : $(IOR.MC)
	$(prep-target)
	$(JSCHEME_GENERATE_LOG_RB) $(IOR.MC) $(LOG_GENDIRECTORY)

$(LOG_GENDIRECTORY)/InterceptorsSystemException.resource : $(INTERCEPTORS.MC)
	$(prep-target)
	$(JSCHEME_GENERATE_LOG_RB) $(INTERCEPTORS.MC) $(LOG_GENDIRECTORY)

$(LOG_GENDIRECTORY)/NamingSystemException.resource : $(NAMING.MC)
	$(prep-target)
	$(JSCHEME_GENERATE_LOG_RB) $(NAMING.MC) $(LOG_GENDIRECTORY)

$(LOG_GENDIRECTORY)/OMGSystemException.resource : $(OMG.MC)
	$(prep-target)
	$(JSCHEME_GENERATE_LOG_RB) $(OMG.MC) $(LOG_GENDIRECTORY)

$(LOG_GENDIRECTORY)/ORBUtilSystemException.resource : $(ORBUTIL.MC)
	$(prep-target)
	$(JSCHEME_GENERATE_LOG_RB) $(ORBUTIL.MC) $(LOG_GENDIRECTORY)

$(LOG_GENDIRECTORY)/POASystemException.resource : $(POA.MC)
	$(prep-target)
	$(JSCHEME_GENERATE_LOG_RB) $(POA.MC) $(LOG_GENDIRECTORY)

$(LOG_GENDIRECTORY)/UtilSystemException.resource : $(UTIL.MC)
	$(prep-target)
	$(JSCHEME_GENERATE_LOG_RB) $(UTIL.MC) $(LOG_GENDIRECTORY)


.PHONY: all build clean clobber \
	activation.idl.compile activation.idl.clean \
	portableactivation.idl.compile portableactivation.idl.clean

#
# Include
#
include $(BUILDDIR)/common/Rules.gmk