make/Makefile

changeset 1
55540e827aef
child 52
db35452e8965
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/make/Makefile	Sat Dec 01 00:00:00 2007 +0000
     1.3 @@ -0,0 +1,191 @@
     1.4 +#
     1.5 +# Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
     1.6 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.7 +#
     1.8 +# This code is free software; you can redistribute it and/or modify it
     1.9 +# under the terms of the GNU General Public License version 2 only, as
    1.10 +# published by the Free Software Foundation.  Sun designates this
    1.11 +# particular file as subject to the "Classpath" exception as provided
    1.12 +# by Sun in the LICENSE file that accompanied this code.
    1.13 +#
    1.14 +# This code is distributed in the hope that it will be useful, but WITHOUT
    1.15 +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    1.16 +# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    1.17 +# version 2 for more details (a copy is included in the LICENSE file that
    1.18 +# accompanied this code).
    1.19 +#
    1.20 +# You should have received a copy of the GNU General Public License version
    1.21 +# 2 along with this work; if not, write to the Free Software Foundation,
    1.22 +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1.23 +#
    1.24 +# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
    1.25 +# CA 95054 USA or visit www.sun.com if you need additional information or
    1.26 +# have any questions.
    1.27 +#
    1.28 +
    1.29 +#
    1.30 +# Makefile for building the corba workspace.
    1.31 +#
    1.32 +
    1.33 +BUILDDIR=.
    1.34 +include $(BUILDDIR)/common/Defs.gmk
    1.35 +include $(BUILDDIR)/common/CancelImplicits.gmk
    1.36 +
    1.37 +#----- commands
    1.38 +
    1.39 +CHMOD = chmod
    1.40 +CP = cp
    1.41 +ECHO = echo # FIXME
    1.42 +FIND = find
    1.43 +MKDIR = mkdir
    1.44 +SED = sed
    1.45 +ZIP = zip
    1.46 +
    1.47 +#-----  locations and deliverables
    1.48 +
    1.49 +TOPDIR=..
    1.50 +SRC_BIN_DIR = $(TOPDIR)/src/share/bin
    1.51 +SRC_CLASSES_DIR = $(TOPDIR)/src/share/classes
    1.52 +
    1.53 +ifdef ALT_OUTPUTDIR
    1.54 +  OUTPUTDIR = $(ALT_OUTPUTDIR)
    1.55 +  BUILD_DIR = $(ALT_OUTPUTDIR)
    1.56 +  DIST_DIR = $(ALT_OUTPUTDIR)/dist
    1.57 +else
    1.58 +  OUTPUTDIR = ..
    1.59 +  BUILD_DIR = $(TOPDIR)/build/$(PLATFORM)-$(ARCH)
    1.60 +  DIST_DIR = $(TOPDIR)/dist
    1.61 +endif
    1.62 +ABS_OUTPUTDIR = $(call FullPath,$(OUTPUTDIR))
    1.63 +
    1.64 +CLASSES_DIR = $(BUILD_DIR)/classes
    1.65 +GENSRC_DIR = $(BUILD_DIR)/gensrc
    1.66 +
    1.67 +BIN_DIR = $(DIST_DIR)/bin
    1.68 +LIB_DIR = $(DIST_DIR)/lib
    1.69 +
    1.70 +#-----
    1.71 +
    1.72 +ifndef JDK_MAJOR_VERSION
    1.73 +  JDK_MAJOR_VERSION = 1
    1.74 +endif
    1.75 +
    1.76 +ifndef JDK_MINOR_VERSION
    1.77 +  JDK_MINOR_VERSION = 7
    1.78 +endif
    1.79 +
    1.80 +ifndef JDK_MICRO_VERSION
    1.81 +  JDK_MICRO_VERSION = 0
    1.82 +endif
    1.83 +
    1.84 +ifndef JDK_VERSION
    1.85 +  JDK_VERSION = $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION)
    1.86 +endif
    1.87 +
    1.88 +ifndef MILESTONE
    1.89 +  MILESTONE = internal
    1.90 +endif
    1.91 +
    1.92 +# RELEASE is JDK_VERSION and -MILESTONE if MILESTONE is set
    1.93 +ifneq ($(MILESTONE),fcs)
    1.94 +  RELEASE       = $(JDK_VERSION)-$(MILESTONE)$(BUILD_VARIANT_RELEASE)
    1.95 +else
    1.96 +  RELEASE       = $(JDK_VERSION)$(BUILD_VARIANT_RELEASE)
    1.97 +endif
    1.98 +
    1.99 +# FULL_VERSION is RELEASE and -BUILD_NUMBER if BUILD_NUMBER is set
   1.100 +ifdef BUILD_NUMBER
   1.101 +  FULL_VERSION = $(RELEASE)-$(BUILD_NUMBER)
   1.102 +else
   1.103 +  BUILD_NUMBER = b00
   1.104 +  USER_RELEASE_SUFFIX := $(shell echo $(USER)_`date '+%d_%b_%Y_%H_%M' | tr "A-Z" "a-z"`)
   1.105 +  FULL_VERSION = $(RELEASE)-$(USER_RELEASE_SUFFIX)-$(BUILD_NUMBER)
   1.106 +endif
   1.107 +
   1.108 +#----- useful macros
   1.109 +
   1.110 +SOURCE_LEVEL = 5
   1.111 +BOOTSTRAP_TARGET_LEVEL = 5
   1.112 +TARGET_LEVEL = 6
   1.113 +
   1.114 +ifndef TARGET_JAVA
   1.115 +  TARGET_JAVA = java
   1.116 +endif
   1.117 +
   1.118 +NO_PROPRIETARY_API_WARNINGS = -XDignore.symbol.file=true
   1.119 +
   1.120 +SELF = $(lastword $(MAKEFILE_LIST))
   1.121 +
   1.122 +# for jdk, we generate the following:
   1.123 +# dist/lib/classes.jar:
   1.124 +#       corba recompiled to run on the target JDK,
   1.125 +#       ready for inclusion in rt.jar
   1.126 +# dist/lib/src.zip
   1.127 +#       .properties and .java files for classes in classes.jar,
   1.128 +#       ready for jdk src.zip
   1.129 +# dist/lib/bin.zip
   1.130 +#       corba specific binaries: orb.idl, ir.idl
   1.131 +
   1.132 +# Default target
   1.133 +default: all
   1.134 +
   1.135 +#----- classes.jar
   1.136 +
   1.137 +CLASSES_JAR = $(LIB_DIR)/classes.jar
   1.138 +$(CLASSES_JAR):
   1.139 +	$(MKDIR) -p $(@D)
   1.140 +	$(BOOT_JAR_CMD) -cf $@ -C $(CLASSES_DIR) .
   1.141 +
   1.142 +#----- src.zip
   1.143 +
   1.144 +SRC_ZIP_FILES = $(shell $(FIND) $(SRC_CLASSES_DIR) \( -name SCCS -o -name \*-template \) -prune -o -type f -print )
   1.145 +
   1.146 +SRC_ZIP = $(LIB_DIR)/src.zip
   1.147 +$(SRC_ZIP): $(SRC_ZIP_FILES)
   1.148 +	abs_src_zip=`cd $(@D) ; pwd`/$(@F) ; \
   1.149 +	( cd $(SRC_CLASSES_DIR) ; $(FIND) . \( -name SCCS -o -name \*-template \) -prune -o -type f -print | $(ZIP) -q $$abs_src_zip -@ ) ; \
   1.150 +	( cd $(GENSRC_DIR) ; $(FIND) . -type f -print | $(ZIP) -q $$abs_src_zip -@ ) ;
   1.151 +
   1.152 +#----- bin.zip
   1.153 +
   1.154 +BIN_ZIP_FILES = $(BUILD_DIR/lib/orb.idl $(BUILD_DIR)/lib/ir.idl
   1.155 +
   1.156 +BIN_ZIP = $(LIB_DIR)/bin.zip
   1.157 +$(BIN_ZIP): $(BIN_ZIP_FILES)
   1.158 +	abs_bin_zip=`cd $(@D) ; pwd`/$(@F) ; \
   1.159 +	( cd $(BUILD_DIR) ; $(FIND) lib -name "*.idl" -print | $(ZIP) -q $$abs_bin_zip -@ ) ;
   1.160 +
   1.161 +#
   1.162 +# CORBA
   1.163 +#
   1.164 +SUBDIRS = tools javax org sun com
   1.165 +
   1.166 +build:
   1.167 +	$(SUBDIRS-loop)
   1.168 +
   1.169 +all : build $(CLASSES_JAR) $(SRC_ZIP) $(BIN_ZIP)
   1.170 +
   1.171 +clean clobber:
   1.172 +	$(RM) -r $(BUILD_DIR)
   1.173 +	$(RM) -r $(DIST_DIR)
   1.174 +
   1.175 +#-------------------------------------------------------------------
   1.176 +#
   1.177 +# Targets for Sun's internal JPRT build system
   1.178 +
   1.179 +CD = cd
   1.180 +ZIP = zip
   1.181 +
   1.182 +JPRT_ARCHIVE_BUNDLE=$(ABS_OUTPUTDIR)/$(JPRT_BUILD_FLAVOR)-bundle.zip
   1.183 +
   1.184 +jprt_build_product jprt_build_debug jprt_build_fastdebug: all
   1.185 +	( $(CD) $(OUTPUTDIR) && \
   1.186 +	  $(ZIP) -q -r $(JPRT_ARCHIVE_BUNDLE) build dist )
   1.187 +
   1.188 +#-------------------------------------------------------------------
   1.189 +
   1.190 +
   1.191 +#
   1.192 +# Phonies to avoid accidents.
   1.193 +#
   1.194 +.PHONY: all build clean clobber debug jprt_build_product jprt_build_debug jprt_build_fastdebug

mercurial