0N/A#
239N/A# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
0N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A#
0N/A# This code is free software; you can redistribute it and/or modify it
0N/A# under the terms of the GNU General Public License version 2 only, as
157N/A# published by the Free Software Foundation. Oracle designates this
0N/A# particular file as subject to the "Classpath" exception as provided
157N/A# by Oracle in the LICENSE file that accompanied this code.
0N/A#
0N/A# This code is distributed in the hope that it will be useful, but WITHOUT
0N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A# version 2 for more details (a copy is included in the LICENSE file that
0N/A# accompanied this code).
0N/A#
0N/A# You should have received a copy of the GNU General Public License version
0N/A# 2 along with this work; if not, write to the Free Software Foundation,
0N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A#
157N/A# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
157N/A# or visit www.oracle.com if you need additional information or have any
157N/A# questions.
0N/A#
0N/A
0N/A#
0N/A# Makefile for building the corba workspace.
0N/A#
0N/A
0N/ABUILDDIR=.
0N/Ainclude $(BUILDDIR)/common/Defs.gmk
0N/Ainclude $(BUILDDIR)/common/CancelImplicits.gmk
0N/A
0N/A#----- commands
0N/A
0N/ACHMOD = chmod
0N/ACP = cp
0N/AECHO = echo # FIXME
0N/AFIND = find
0N/AMKDIR = mkdir
0N/ASED = sed
0N/AZIP = zip
0N/A
0N/A#----- locations and deliverables
0N/A
0N/ATOPDIR=..
0N/ASRC_BIN_DIR = $(TOPDIR)/src/share/bin
0N/ASRC_CLASSES_DIR = $(TOPDIR)/src/share/classes
0N/A
0N/Aifdef ALT_OUTPUTDIR
0N/A OUTPUTDIR = $(ALT_OUTPUTDIR)
0N/A BUILD_DIR = $(ALT_OUTPUTDIR)
0N/A DIST_DIR = $(ALT_OUTPUTDIR)/dist
0N/Aelse
0N/A OUTPUTDIR = ..
0N/A BUILD_DIR = $(TOPDIR)/build/$(PLATFORM)-$(ARCH)
0N/A DIST_DIR = $(TOPDIR)/dist
0N/Aendif
0N/AABS_OUTPUTDIR = $(call FullPath,$(OUTPUTDIR))
0N/A
0N/ACLASSES_DIR = $(BUILD_DIR)/classes
0N/AGENSRC_DIR = $(BUILD_DIR)/gensrc
0N/A
0N/ALIB_DIR = $(DIST_DIR)/lib
0N/A
0N/A#-----
0N/A
0N/Aifndef JDK_MAJOR_VERSION
0N/A JDK_MAJOR_VERSION = 1
0N/Aendif
0N/A
0N/Aifndef JDK_MINOR_VERSION
0N/A JDK_MINOR_VERSION = 7
0N/Aendif
0N/A
0N/Aifndef JDK_MICRO_VERSION
0N/A JDK_MICRO_VERSION = 0
0N/Aendif
0N/A
0N/Aifndef JDK_VERSION
0N/A JDK_VERSION = $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION)
0N/Aendif
0N/A
0N/Aifndef MILESTONE
0N/A MILESTONE = internal
0N/Aendif
0N/A
0N/A# RELEASE is JDK_VERSION and -MILESTONE if MILESTONE is set
0N/Aifneq ($(MILESTONE),fcs)
0N/A RELEASE = $(JDK_VERSION)-$(MILESTONE)$(BUILD_VARIANT_RELEASE)
0N/Aelse
0N/A RELEASE = $(JDK_VERSION)$(BUILD_VARIANT_RELEASE)
0N/Aendif
0N/A
0N/A# FULL_VERSION is RELEASE and -BUILD_NUMBER if BUILD_NUMBER is set
0N/Aifdef BUILD_NUMBER
0N/A FULL_VERSION = $(RELEASE)-$(BUILD_NUMBER)
0N/Aelse
0N/A BUILD_NUMBER = b00
0N/A USER_RELEASE_SUFFIX := $(shell echo $(USER)_`date '+%d_%b_%Y_%H_%M' | tr "A-Z" "a-z"`)
0N/A FULL_VERSION = $(RELEASE)-$(USER_RELEASE_SUFFIX)-$(BUILD_NUMBER)
0N/Aendif
0N/A
0N/A#----- useful macros
0N/A
0N/ASOURCE_LEVEL = 5
0N/ABOOTSTRAP_TARGET_LEVEL = 5
82N/A
82N/Aifdef TARGET_CLASS_VERSION
82N/A TARGET_LEVEL = $(TARGET_CLASS_VERSION)
82N/Aelse
99N/A TARGET_LEVEL = 7
82N/Aendif
0N/A
0N/Aifndef TARGET_JAVA
0N/A TARGET_JAVA = java
0N/Aendif
0N/A
0N/ASELF = $(lastword $(MAKEFILE_LIST))
0N/A
0N/A# for jdk, we generate the following:
0N/A# dist/lib/classes.jar:
0N/A# corba recompiled to run on the target JDK,
0N/A# ready for inclusion in rt.jar
0N/A# dist/lib/src.zip
0N/A# .properties and .java files for classes in classes.jar,
0N/A# ready for jdk src.zip
0N/A# dist/lib/bin.zip
0N/A# corba specific binaries: orb.idl, ir.idl
0N/A
0N/A# Default target
0N/Adefault: all
0N/A
0N/A#----- classes.jar
0N/A
0N/ACLASSES_JAR = $(LIB_DIR)/classes.jar
0N/A$(CLASSES_JAR):
0N/A $(MKDIR) -p $(@D)
0N/A $(BOOT_JAR_CMD) -cf $@ -C $(CLASSES_DIR) .
0N/A
0N/A#----- src.zip
0N/A
113N/ASRC_ZIP_FILES = $(shell $(FIND) $(SRC_CLASSES_DIR) \( -name \*-template \) -prune -o -type f -print )
0N/A
0N/ASRC_ZIP = $(LIB_DIR)/src.zip
0N/A$(SRC_ZIP): $(SRC_ZIP_FILES)
0N/A abs_src_zip=`cd $(@D) ; pwd`/$(@F) ; \
113N/A ( cd $(SRC_CLASSES_DIR) ; $(FIND) . \( -name \*-template \) -prune -o -type f -print | $(ZIP) -q $$abs_src_zip -@ ) ; \
0N/A ( cd $(GENSRC_DIR) ; $(FIND) . -type f -print | $(ZIP) -q $$abs_src_zip -@ ) ;
0N/A
0N/A#----- bin.zip
0N/A
0N/ABIN_ZIP_FILES = $(BUILD_DIR/lib/orb.idl $(BUILD_DIR)/lib/ir.idl
0N/A
0N/ABIN_ZIP = $(LIB_DIR)/bin.zip
0N/A$(BIN_ZIP): $(BIN_ZIP_FILES)
0N/A abs_bin_zip=`cd $(@D) ; pwd`/$(@F) ; \
0N/A ( cd $(BUILD_DIR) ; $(FIND) lib -name "*.idl" -print | $(ZIP) -q $$abs_bin_zip -@ ) ;
0N/A
0N/A#
0N/A# CORBA
0N/A#
0N/ASUBDIRS = tools javax org sun com
0N/A
0N/Abuild:
0N/A $(SUBDIRS-loop)
0N/A
0N/Aall : build $(CLASSES_JAR) $(SRC_ZIP) $(BIN_ZIP)
0N/A
0N/Aclean clobber:
0N/A $(RM) -r $(BUILD_DIR)
0N/A $(RM) -r $(DIST_DIR)
0N/A
0N/A#-------------------------------------------------------------------
0N/A#
0N/A# Targets for Sun's internal JPRT build system
0N/A
0N/ACD = cd
0N/AZIP = zip
0N/A
0N/AJPRT_ARCHIVE_BUNDLE=$(ABS_OUTPUTDIR)/$(JPRT_BUILD_FLAVOR)-bundle.zip
0N/A
0N/Ajprt_build_product jprt_build_debug jprt_build_fastdebug: all
0N/A ( $(CD) $(OUTPUTDIR) && \
0N/A $(ZIP) -q -r $(JPRT_ARCHIVE_BUNDLE) build dist )
0N/A
0N/A#-------------------------------------------------------------------
0N/A
0N/A
0N/A#
0N/A# Phonies to avoid accidents.
0N/A#
0N/A.PHONY: all build clean clobber debug jprt_build_product jprt_build_debug jprt_build_fastdebug