## Copyright (c) 2007, 2010, Oracle and/or its affiliates. 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. Oracle designates this# particular file as subject to the "Classpath" exception as provided# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA# or visit www.oracle.com if you need additional information or have any# questions.### Makefile for building the corba workspace.#BUILDDIR=.include $(BUILDDIR)/common/Defs.gmkinclude $(BUILDDIR)/common/CancelImplicits.gmk#----- commandsCHMOD = chmodCP = cpECHO = echo # FIXMEFIND = findMKDIR = mkdirSED = sedZIP = zip#----- locations and deliverablesTOPDIR=..SRC_BIN_DIR = $(TOPDIR)/src/share/binSRC_CLASSES_DIR = $(TOPDIR)/src/share/classesifdef ALT_OUTPUTDIR OUTPUTDIR = $(ALT_OUTPUTDIR) BUILD_DIR = $(ALT_OUTPUTDIR) DIST_DIR = $(ALT_OUTPUTDIR)/distelse OUTPUTDIR = .. BUILD_DIR = $(TOPDIR)/build/$(PLATFORM)-$(ARCH) DIST_DIR = $(TOPDIR)/distendifABS_OUTPUTDIR = $(call FullPath,$(OUTPUTDIR))CLASSES_DIR = $(BUILD_DIR)/classesGENSRC_DIR = $(BUILD_DIR)/gensrcLIB_DIR = $(DIST_DIR)/lib#-----ifndef JDK_MAJOR_VERSION JDK_MAJOR_VERSION = 1endififndef JDK_MINOR_VERSION JDK_MINOR_VERSION = 7endififndef JDK_MICRO_VERSION JDK_MICRO_VERSION = 0endififndef JDK_VERSION JDK_VERSION = $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION)endififndef MILESTONE MILESTONE = internalendif# RELEASE is JDK_VERSION and -MILESTONE if MILESTONE is setifneq ($(MILESTONE),fcs) RELEASE = $(JDK_VERSION)-$(MILESTONE)$(BUILD_VARIANT_RELEASE)else RELEASE = $(JDK_VERSION)$(BUILD_VARIANT_RELEASE)endif# FULL_VERSION is RELEASE and -BUILD_NUMBER if BUILD_NUMBER is setifdef BUILD_NUMBER FULL_VERSION = $(RELEASE)-$(BUILD_NUMBER)else BUILD_NUMBER = b00 USER_RELEASE_SUFFIX := $(shell echo $(USER)_`date '+%d_%b_%Y_%H_%M' | tr "A-Z" "a-z"`) FULL_VERSION = $(RELEASE)-$(USER_RELEASE_SUFFIX)-$(BUILD_NUMBER)endif#----- useful macrosSOURCE_LEVEL = 5BOOTSTRAP_TARGET_LEVEL = 5ifdef TARGET_CLASS_VERSION TARGET_LEVEL = $(TARGET_CLASS_VERSION)else TARGET_LEVEL = 7endififndef TARGET_JAVA TARGET_JAVA = javaendifSELF = $(lastword $(MAKEFILE_LIST))# for jdk, we generate the following:# dist/lib/classes.jar:# corba recompiled to run on the target JDK,# ready for inclusion in rt.jar# dist/lib/src.zip# .properties and .java files for classes in classes.jar,# ready for jdk src.zip# dist/lib/bin.zip# corba specific binaries: orb.idl, ir.idl# Default targetdefault: all#----- classes.jarCLASSES_JAR = $(LIB_DIR)/classes.jar$(CLASSES_JAR): $(MKDIR) -p $(@D) $(BOOT_JAR_CMD) -cf $@ -C $(CLASSES_DIR) .#----- src.zipSRC_ZIP_FILES = $(shell $(FIND) $(SRC_CLASSES_DIR) \( -name \*-template \) -prune -o -type f -print )SRC_ZIP = $(LIB_DIR)/src.zip$(SRC_ZIP): $(SRC_ZIP_FILES) abs_src_zip=`cd $(@D) ; pwd`/$(@F) ; \ ( cd $(SRC_CLASSES_DIR) ; $(FIND) . \( -name \*-template \) -prune -o -type f -print | $(ZIP) -q $$abs_src_zip -@ ) ; \ ( cd $(GENSRC_DIR) ; $(FIND) . -type f -print | $(ZIP) -q $$abs_src_zip -@ ) ;#----- bin.zipBIN_ZIP_FILES = $(BUILD_DIR/lib/orb.idl $(BUILD_DIR)/lib/ir.idlBIN_ZIP = $(LIB_DIR)/bin.zip$(BIN_ZIP): $(BIN_ZIP_FILES) abs_bin_zip=`cd $(@D) ; pwd`/$(@F) ; \ ( cd $(BUILD_DIR) ; $(FIND) lib -name "*.idl" -print | $(ZIP) -q $$abs_bin_zip -@ ) ;## CORBA#SUBDIRS = tools javax org sun combuild: $(SUBDIRS-loop)all : build $(CLASSES_JAR) $(SRC_ZIP) $(BIN_ZIP)clean clobber: $(RM) -r $(BUILD_DIR) $(RM) -r $(DIST_DIR)#-------------------------------------------------------------------## Targets for Sun's internal JPRT build systemCD = cdZIP = zipJPRT_ARCHIVE_BUNDLE=$(ABS_OUTPUTDIR)/$(JPRT_BUILD_FLAVOR)-bundle.zipjprt_build_product jprt_build_debug jprt_build_fastdebug: all ( $(CD) $(OUTPUTDIR) && \ $(ZIP) -q -r $(JPRT_ARCHIVE_BUNDLE) build dist )#-------------------------------------------------------------------## Phonies to avoid accidents.#.PHONY: all build clean clobber debug jprt_build_product jprt_build_debug jprt_build_fastdebug