1 #
   2 # Copyright (c) 2014, 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 # This must be the first rule
  27 default: all
  28 
  29 include $(SPEC)
  30 include MakeBase.gmk
  31 include JavaCompilation.gmk
  32 
  33 include CommonCorba.gmk
  34 
  35 ################################################################################
  36 
  37 $(eval $(call SetupJavaCompilation,BUILD_CORBA, \
  38     SETUP := GENERATE_NEWBYTECODE, \
  39     SRC := $(CORBA_TOPDIR)/src/share/classes $(CORBA_OUTPUTDIR)/gensrc, \
  40     EXCLUDES := com/sun/corba/se/PortableActivationIDL, \
  41     EXCLUDE_FILES := com/sun/corba/se/impl/presentation/rmi/JNDIStateFactoryImpl.java \
  42         com/sun/corba/se/spi/presentation/rmi/StubWrapper.java \
  43         com/sun/org/omg/CORBA/IDLTypeOperations.java \
  44         com/sun/org/omg/CORBA/IRObjectOperations.java \
  45         org/omg/PortableInterceptor/UNKNOWN.java \
  46         com/sun/tools/corba/se/idl/ResourceBundleUtil.java \
  47         com/sun/corba/se/impl/presentation/rmi/jndi.properties, \
  48     COPY := .prp LogStrings.properties, \
  49     BIN := $(CORBA_OUTPUTDIR)/classes, \
  50     JAR := $(CORBA_OUTPUTDIR)/dist/lib/classes.jar))
  51 
  52 $(eval $(call SetupJavaCompilation,BUILD_INTERIM_CORBA, \
  53     SETUP := GENERATE_OLDBYTECODE, \
  54     SRC := $(BUILD_CORBA_SRC), \
  55     EXCLUDES := $(BUILD_CORBA_EXCLUDES), \
  56     EXCLUDE_FILES := $(BUILD_CORBA_EXCLUDE_FILES), \
  57     COPY := $(BUILD_CORBA_COPY), \
  58     BIN := $(CORBA_OUTPUTDIR)/interim_classes, \
  59     JAR := $(INTERIM_CORBA_JAR)))
  60 
  61 # Separate src.zip call to include sources that were excluded in the build to
  62 # mimic behavior in old build system.
  63 $(eval $(call SetupZipArchive,ARCHIVE_CORBA_SRC, \
  64     SRC := $(CORBA_TOPDIR)/src/share/classes $(CORBA_OUTPUTDIR)/gensrc, \
  65     ZIP := $(CORBA_OUTPUTDIR)/dist/lib/src.zip))
  66     JAR := $(CORBA_OUTPUTDIR)/dist/lib/classes.jar))
  67 
  68 ################################################################################
  69 # Create bin.zip containing the corba specific binaries: orb.idl, ir.idl
  70 BIN_FILES := $(CORBA_TOPDIR)/src/share/classes/com/sun/tools/corba/se/idl/orb.idl \
  71     $(CORBA_TOPDIR)/src/share/classes/com/sun/tools/corba/se/idl/ir.idl
  72 
  73 $(CORBA_OUTPUTDIR)/dist/lib/bin.zip: $(BIN_FILES)
  74         $(MKDIR) -p $(CORBA_OUTPUTDIR)/dist/lib
  75         $(MKDIR) -p $(CORBA_OUTPUTDIR)/lib
  76         $(RM) -f $@
  77         $(ECHO) Creating `basename $@`
  78         $(CP) $(BIN_FILES) $(CORBA_OUTPUTDIR)/lib
  79         $(CHMOD) ug+w $(CORBA_OUTPUTDIR)/lib/*
  80         (cd $(CORBA_OUTPUTDIR); $(ZIP) -q $@ lib/orb.idl lib/ir.idl)
  81 
  82 ################################################################################
  83 
  84 
  85 all: $(BUILD_CORBA) $(BUILD_INTERIM_CORBA) $(ARCHIVE_CORBA_SRC) \
  86     $(CORBA_OUTPUTDIR)/dist/lib/bin.zip