aboutsummaryrefslogtreecommitdiff
path: root/make
diff options
context:
space:
mode:
authorduke <none@none>2007-12-01 00:00:00 +0000
committerduke <none@none>2007-12-01 00:00:00 +0000
commit5557ec694477db6cc25dcb02a99351a331c7e0ee (patch)
tree0b7a765d4ed60ce4c9497ec27b0e7ede95dea973 /make
downloadjdk8u_jaxws-5557ec694477db6cc25dcb02a99351a331c7e0ee.tar.gz
Initial load
Diffstat (limited to 'make')
-rw-r--r--make/Makefile134
-rw-r--r--make/README14
-rw-r--r--make/build.properties46
-rw-r--r--make/build.xml120
-rw-r--r--make/jprt.config241
-rw-r--r--make/jprt.properties55
-rw-r--r--make/tools/StripProperties/StripProperties.java329
-rw-r--r--make/tools/StripProperties/StripPropertiesTask.java87
8 files changed, 1026 insertions, 0 deletions
diff --git a/make/Makefile b/make/Makefile
new file mode 100644
index 00000000..3dab62be
--- /dev/null
+++ b/make/Makefile
@@ -0,0 +1,134 @@
+#
+# Copyright 2007 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.
+#
+
+# Makefile for jaxws: wrapper around Ant build.xml file
+
+#
+# On Solaris, the 'make' utility from Sun will not work with these makefiles.
+# This little rule is only understood by Sun's make, and is harmless
+# when seen by the GNU make tool. If using Sun's make, this causes the
+# make command to fail.
+#
+SUN_MAKE_TEST:sh = @echo "ERROR: PLEASE USE GNU VERSION OF MAKE"; exit 33
+
+ifdef QUIET
+ ANT_OPTIONS += -quiet
+endif
+
+ifdef VERBOSE
+ ANT_OPTIONS += -verbose
+endif
+
+ifdef JDK_VERSION
+ ANT_OPTIONS += -Djdk.version=$(JDK_VERSION)
+endif
+
+ifdef FULL_VERSION
+ ANT_OPTIONS += -Dfull.version='$(FULL_VERSION)' # will contain spaces
+endif
+
+ifdef MILESTONE
+ ANT_OPTIONS += -Dmilestone=$(MILESTONE)
+endif
+
+ifdef BUILD_NUMBER
+ ANT_OPTIONS += -Dbuild.number=$(BUILD_NUMBER)
+else
+ ifdef JDK_BUILD_NUMBER
+ ANT_OPTIONS += -Dbuild.number=$(JDK_BUILD_NUMBER)
+ endif
+endif
+
+ifeq ($(VARIANT), DBG)
+ ANT_OPTIONS += -Djavac.debug=true
+else
+ ifeq ($(VARIANT), OPT)
+ ANT_OPTIONS += -Djavac.debug=false
+ endif
+endif
+
+# Note: j2se/make/common/Defs.gmk uses LANGUAGE_VERSION (-source NN)
+# and the somewhat misnamed CLASS_VERSION (-target NN)
+ifdef TARGET_CLASS_VERSION
+ ANT_OPTIONS += -Djavac.target=$(TARGET_CLASS_VERSION)
+else
+ ifdef JAVAC_TARGET_ARG
+ ANT_OPTIONS += -Djavac.target=$(JAVAC_TARGET_ARG)
+ endif
+endif
+
+ifdef ALT_BOOTDIR
+ ANT_JAVA_HOME = JAVA_HOME=$(ALT_BOOTDIR)
+endif
+
+ifdef ALT_OUTPUTDIR
+ OUTPUTDIR = $(ALT_OUTPUTDIR)
+ ANT_OPTIONS += -Dbuild.dir=$(ALT_OUTPUTDIR)/build
+ ANT_OPTIONS += -Ddist.dir=$(ALT_OUTPUTDIR)/dist
+else
+ OUTPUTDIR = ..
+endif
+ABS_OUTPUTDIR = $(call FullPath,$(OUTPUTDIR))
+
+ifdef ALT_LANGTOOLS_DIST
+ ANT_OPTIONS += -Dbootstrap.dir=$(ALT_LANGTOOLS_DIST)/bootstrap
+endif
+
+ifdef FINDBUGS_HOME
+ ANT_OPTIONS += -Dfindbugs.home=$(FINDBUGS_HOME)
+endif
+
+ifdef ANT_HOME
+ ANT = $(ANT_HOME)/bin/ant
+ ifneq ($(shell test -x $(ANT); echo $$?), 0)
+ $(error "$(ANT) not found; please update ANT_HOME")
+ endif
+else
+ ANT = ant
+ ifneq ($(shell which $(ANT) > /dev/null; echo $$?), 0)
+ $(error "\"ant\" not found; please set ANT_HOME or put \"ant\" on your PATH")
+ endif
+endif
+
+# Default target and expected 'do everything' target
+all: build
+
+# Standard make clobber target
+clobber: clean
+
+# All ant targets of interest
+ANT_TARGETS = build clean sanity # for now
+
+# Create a make target for each
+$(ANT_TARGETS):
+ $(ANT_JAVA_HOME) $(ANT) -version
+ $(ANT_JAVA_HOME) $(ANT) $(ANT_OPTIONS) $@
+
+# Targets for Sun's internal JPRT build system
+jprt_build_product jprt_build_debug jprt_build_fastdebug: all
+
+# Declare these phony (not filenames)
+.PHONY: $(ANT_TARGETS) all clobber \
+ jprt_build_product jprt_build_debug jprt_build_fastdebug
diff --git a/make/README b/make/README
new file mode 100644
index 00000000..3a06b291
--- /dev/null
+++ b/make/README
@@ -0,0 +1,14 @@
+README:
+ This file should be located at the top of the jaxws Mercurial repository.
+
+ See http://openjdk.java.net/ for more information about the OpenJDK.
+
+ See ../README-builds.html for complete details on build machine requirements.
+
+Simple Build Instructions:
+
+ cd make && gnumake
+
+ The files that will be imported into the jdk build will be in the "dist"
+ directory.
+
diff --git a/make/build.properties b/make/build.properties
new file mode 100644
index 00000000..e0225090
--- /dev/null
+++ b/make/build.properties
@@ -0,0 +1,46 @@
+#
+# Copyright 2007 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.
+#
+
+# This is the JDK used to build and run the bootstrap version of javac.
+# The bootstrap javac is used to compile both boostrap versions of the
+# other tools, and product versions of all the tools.
+# Override this path as needed, either on the command line or in
+# one of the standard user build.properties files (see build.xml)
+
+# options for the <javac> tasks used to compile the tools
+javac.target = 5
+javac.debug = true
+javac.debuglevel = source,lines
+javac.no.jdk.warnings = -XDignore.symbol.file=true
+# set the following to -version to verify the versions of javac being used
+javac.version.opt =
+# in time, there should be no exceptions to -Xlint:all
+javac.lint.opts = -Xlint:all,-unchecked,-deprecation,-fallthrough,-cast,-serial -Werror
+
+# JVM memory size
+javac.memoryInitialSize = 128m
+javac.memoryMaximumSize = 256m
+
+#------------------------------------------------------------
diff --git a/make/build.xml b/make/build.xml
new file mode 100644
index 00000000..9f013e99
--- /dev/null
+++ b/make/build.xml
@@ -0,0 +1,120 @@
+<?xml version="1.0"?>
+<!--
+ Copyright 2007 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.
+-->
+
+<!--
+ This is the main build file for the jaxws workspace.
+ -->
+
+<project name="jaxws" default="all" basedir=".">
+
+ <!-- Convenient shorthands for standard locations within the workspace. -->
+ <property file="build.properties"/>
+ <property name="topdir" value=".."/>
+ <property name="build.dir" location="${topdir}/build"/>
+ <property name="build.classes.dir" location="${build.dir}/classes"/>
+ <property name="build.gensrc.dir" location="${build.dir}/gensrc"/>
+ <property name="build.toolclasses.dir" location="${build.dir}/toolclasses"/>
+ <property name="dist.dir" location="${topdir}/dist"/>
+ <property name="dist.lib.dir" location="${dist.dir}/lib"/>
+ <property name="make.dir" location="${topdir}/make"/>
+ <property name="make.tools.dir" location="${make.dir}/tools"/>
+ <property name="src.dir" location="${topdir}/src"/>
+ <property name="src.classes.dir" location="${src.dir}/share/classes"/>
+ <property environment="env"/>
+
+ <target name="build" depends="banner, build-classes, build-tools, build-binaries">
+ <mkdir dir="${dist.lib.dir}"/>
+ <jar file="${dist.lib.dir}/classes.jar" basedir="${build.classes.dir}"/>
+ <zip file="${dist.lib.dir}/src.zip" basedir="${src.classes.dir}"/>
+ </target>
+
+ <!-- Debug information -->
+ <target name="sanity"
+ description="display settings of configuration values">
+ <echo level="info">ant.home = ${ant.home}</echo>
+ <echo level="info">java.home = ${env.JAVA_HOME}</echo>
+ <echo level="info">bootstrap.dir = ${bootstrap.dir}</echo>
+ </target>
+
+ <target name="build-tools" depends="-defs-pstrip">
+ <mkdir dir="${build.dir}"/>
+ <mkdir dir="${build.classes.dir}"/>
+ <pstrip srcdir="${src.classes.dir}"
+ destdir="${build.classes.dir}"
+ includes="**/*.properties"/>
+ </target>
+
+ <target name="build-binaries">
+ <mkdir dir="${build.dir}"/>
+ <mkdir dir="${build.classes.dir}"/>
+ <copy todir="${build.classes.dir}">
+ <fileset dir="${src.classes.dir}"
+ includes="**/*.xsd, **/*.default"
+ excludes="**/*.java, **/*.package.html, **/*.properties"/>
+ </copy>
+ <mkdir dir="${build.classes.dir}/META-INF/services"/>
+ <copy todir="${build.classes.dir}/META-INF/services"
+ file="${src.classes.dir}/com/sun/tools/etc/META-INF/services/com.sun.mirror.apt.AnnotationProcessorFactory"/>
+ </target>
+
+ <target name="-defs-pstrip">
+ <mkdir dir="${build.toolclasses.dir}"/>
+ <javac srcdir="${make.tools.dir}/StripProperties"
+ destdir="${build.toolclasses.dir}/"
+ classpath="${ant.home}/lib/ant.jar"/>
+ <taskdef name="pstrip"
+ classname="StripPropertiesTask"
+ classpath="${build.toolclasses.dir}/"/>
+ </target>
+
+ <target name="build-classes" depends="sanity">
+ <mkdir dir="${build.dir}"/>
+ <mkdir dir="${build.classes.dir}"/>
+ <javac fork="true"
+ srcdir="${src.classes.dir}"
+ destdir="${build.classes.dir}"
+ memoryInitialSize="${javac.memoryInitialSize}"
+ memoryMaximumSize="${javac.memoryMaximumSize}"
+ target="${javac.target}"
+ excludes="com/sun/tools/internal/txw2/**">
+ <compilerarg value="-J-Xbootclasspath/p:${bootstrap.dir}/lib/javac.jar"/>
+ <compilerarg line="${javac.version.opt}"/>
+ <compilerarg line="${javac.no.jdk.warnings}"/>
+ </javac>
+ </target>
+
+ <target name="clean" description="Delete all generated files">
+ <delete dir="${build.dir}"/>
+ <delete dir="${dist.dir}"/>
+ </target>
+
+ <target name="banner">
+ <echo>+---------------------------------------+</echo>
+ <echo>+ Building JAX-WS Component +</echo>
+ <echo>+---------------------------------------+</echo>
+ </target>
+
+</project>
diff --git a/make/jprt.config b/make/jprt.config
new file mode 100644
index 00000000..90200b1b
--- /dev/null
+++ b/make/jprt.config
@@ -0,0 +1,241 @@
+#!echo "This is not a shell script"
+#############################################################################
+#
+# Copyright 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.
+#
+#############################################################################
+#
+# JPRT shell configuration for building.
+#
+# Input environment variables:
+# ALT_BOOTDIR
+# ALT_SLASH_JAVA
+# ALT_JDK_IMPORT_PATH
+# Windows Only:
+# PATH
+# PROCESSOR_IDENTIFIER
+# ROOTDIR
+#
+# Output variable settings:
+# make Full path to GNU make
+#
+# Output environment variables:
+# PATH
+# Windows Only:
+# ALT_DEVTOOLS_PATH (To avoid the C:/UTILS default)
+#
+# After JDK6, most settings will be found via ALT_SLASH_JAVA or
+# by way of other system environment variables. If this was JDK5
+# or an older JDK, you might need to export more ALT_* variables.
+#
+#############################################################################
+
+#############################################################################
+# Error
+error() # message
+{
+ echo "ERROR: $1"
+ exit 6
+}
+# Directory must exist
+dirMustExist() # dir name
+{
+ if [ ! -d "$1" ] ; then
+ error "Directory for $2 does not exist: $1"
+ fi
+}
+# File must exist
+fileMustExist() # dir name
+{
+ if [ ! -f "$1" ] ; then
+ error "File for $2 does not exist: $1"
+ fi
+}
+#############################################################################
+
+# Should be set by JPRT as the 3 basic inputs
+bootdir="${ALT_BOOTDIR}"
+slashjava="${ALT_SLASH_JAVA}"
+jdk_import="${ALT_JDK_IMPORT_PATH}"
+
+# Check input
+dirMustExist "${bootdir}" ALT_BOOTDIR
+dirMustExist "${slashjava}" ALT_SLASH_JAVA
+dirMustExist "${jdk_import}" ALT_JDK_IMPORT_PATH
+
+# Uses 'uname -s', but only expect SunOS or Linux, assume Windows otherwise.
+osname=`uname -s`
+if [ "${osname}" = SunOS ] ; then
+
+ # SOLARIS: Sparc or X86
+ osarch=`uname -p`
+ if [ "${osarch}" = sparc ] ; then
+ solaris_arch=sparc
+ else
+ solaris_arch=i386
+ fi
+
+ # Add basic solaris system paths
+ path4sdk=/usr/ccs/bin:/usr/ccs/lib:/usr/bin:/bin:/usr/sfw/bin
+
+ # Get the previous JDK to be used to bootstrap the build
+ path4sdk=${bootdir}/bin:${path4sdk}
+
+ # Ant
+ ANT_HOME=${slashjava}/devtools/share/ant/1.7.0
+ export ANT_HOME
+ antbindir=${ANT_HOME}/bin
+ fileMustExist "${antbindir}/ant" ant
+ path4sdk=${antbindir}:${path4sdk}
+
+ # Find GNU make
+ make=/usr/sfw/bin/gmake
+ if [ ! -f ${make} ] ; then
+ make=/opt/sfw/bin/gmake
+ if [ ! -f ${make} ] ; then
+ make=${slashjava}/devtools/${solaris_arch}/bin/gnumake
+ fi
+ fi
+ fileMustExist "${make}" make
+
+ # File creation mask
+ umask 002
+
+elif [ "${osname}" = Linux ] ; then
+
+ # LINUX: X86, AMD64
+ osarch=`uname -m`
+ if [ "${osarch}" = i686 ] ; then
+ linux_arch=i586
+ elif [ "${osarch}" = x86_64 ] ; then
+ linux_arch=amd64
+ fi
+
+ # Add basic paths
+ path4sdk=/usr/bin:/bin:/usr/sbin:/sbin
+
+ # Get the previous JDK to be used to bootstrap the build
+ path4sdk=${bootdir}/bin:${path4sdk}
+
+ # Ant
+ ANT_HOME=${slashjava}/devtools/share/ant/1.7.0
+ export ANT_HOME
+ antbindir=${ANT_HOME}/bin
+ fileMustExist "${antbindir}/ant" ant
+ path4sdk=${antbindir}:${path4sdk}
+
+ # Find GNU make
+ make=/usr/bin/make
+ fileMustExist "${make}" make
+
+ umask 002
+
+else
+
+ # Windows: Differs on CYGWIN vs. MKS.
+ # Also, blanks in pathnames gives GNU make headaches, so anything placed
+ # in any ALT_* variable should be the short windows dosname.
+
+ # WINDOWS: Install and use MKS or CYGWIN (should have already been done)
+ # Assumption here is that you are in a shell window via MKS or cygwin.
+ # MKS install should have defined the environment variable ROOTDIR.
+ # We also need to figure out which one we have: X86, AMD64
+ if [ "`echo ${PROCESSOR_IDENTIFIER} | fgrep AMD64`" != "" ] ; then
+ windows_arch=amd64
+ else
+ windows_arch=i586
+ fi
+
+ # We need to determine if we are running a CYGWIN shell or an MKS shell
+ # (if uname isn't available, then it will be unix_toolset=unknown)
+ unix_toolset=unknown
+ if [ "`uname -a | fgrep Cygwin`" = "" -a -d "${ROOTDIR}" ] ; then
+ # We kind of assume ROOTDIR is where MKS is and it's ok
+ unix_toolset=MKS
+ mkshome=`dosname -s "${ROOTDIR}"`
+ # Utility to convert to short pathnames without spaces
+ dosname="${mkshome}/mksnt/dosname -s"
+ # Most unix utilities are in the mksnt directory of ROOTDIR
+ unixcommand_path="${mkshome}/mksnt"
+ path4sdk="${unixcommand_path}"
+ dirMustExist "${unixcommand_path}" ALT_UNIXCOMMAND_PATH
+ devtools_path="${slashjava}/devtools/win32/bin"
+ path4sdk="${devtools_path};${path4sdk}"
+ # Normally this need not be set, but on Windows it's default is C:/UTILS
+ ALT_DEVTOOLS_PATH="${devtools_path}"
+ export ALT_DEVTOOLS_PATH
+ dirMustExist "${devtools_path}" ALT_DEVTOOLS_PATH
+ # Find GNU make
+ make="${devtools_path}/gnumake.exe"
+ fileMustExist "${make}" make
+ elif [ "`uname -a | fgrep Cygwin`" != "" -a -f /bin/cygpath ] ; then
+ # For CYGWIN, uname will have "Cygwin" in it, and /bin/cygpath should exist
+ unix_toolset=CYGWIN
+ # Utility to convert to short pathnames without spaces
+ dosname="/usr/bin/cygpath -a -m -s"
+ # Most unix utilities are in the /usr/bin
+ unixcommand_path="/usr/bin"
+ path4sdk="${unixcommand_path}"
+ dirMustExist "${unixcommand_path}" ALT_UNIXCOMMAND_PATH
+ # Find GNU make
+ make="${unixcommand_path}/make.exe"
+ fileMustExist "${make}" make
+ else
+ echo "WARNING: Cannot figure out if this is MKS or CYGWIN"
+ fi
+
+ # WINDOWS: Get the previous JDK to be used to bootstrap the build
+ path4sdk="${bootdir}/bin;${path4sdk}"
+
+ # Ant
+ ANT_HOME=${slashjava}/devtools/share/ant/1.7.0
+ export ANT_HOME
+ antbindir=${ANT_HOME}/bin
+ fileMustExist "${antbindir}/ant" ant
+ path4sdk="${antbindir};${path4sdk}"
+
+ # Turn all \\ into /, remove duplicates and trailing /
+ slash_path="`echo ${path4sdk} | sed -e 's@\\\\@/@g' -e 's@//@/@g' -e 's@/$@@' -e 's@/;@;@g'`"
+
+ # For windows, it's hard to know where the system is, so we just add this
+ # to PATH.
+ path4sdk="${slash_path};${PATH}"
+
+ # Convert path4sdk to cygwin style
+ if [ "${unix_toolset}" = CYGWIN ] ; then
+ path4sdk="`/usr/bin/cygpath -p ${path4sdk}`"
+ fi
+
+fi
+
+# Export PATH setting
+PATH="${path4sdk}"
+export PATH
+
+# Things we need to unset
+unset LD_LIBRARY_PATH
+unset LD_LIBRARY_PATH_32
+unset LD_LIBRARY_PATH_64
+unset JAVA_HOME
+
diff --git a/make/jprt.properties b/make/jprt.properties
new file mode 100644
index 00000000..26ffd61a
--- /dev/null
+++ b/make/jprt.properties
@@ -0,0 +1,55 @@
+#
+# Copyright 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.
+#
+
+# Properties for jprt
+jprt.tools.default.release=jdk1.7.0
+
+# Specific platform list
+jprt.build.platforms=\
+solaris_sparc_5.10,\
+solaris_sparcv9_5.10,\
+solaris_i586_5.10,\
+solaris_x64_5.10,\
+linux_i586,\
+linux_x64,\
+windows_i586,\
+windows_x64
+
+# The different build flavors we want
+jprt.build.flavors=product
+
+# Explicitly designate what the 32bit match is for the 64bit build
+jprt.solaris_sparcv9.build.platform.match32=solaris_sparc_5.10
+jprt.solaris_sparcv9_5.10.build.platform.match32=solaris_sparc_5.10
+jprt.solaris_x64.build.platform.match32=solaris_i586_5.10
+jprt.solaris_x64_5.10.build.platform.match32=solaris_i586_5.10
+
+# Standard list of jprt test targets for this workspace
+jprt.test.targets=
+
+# Directories needed to build
+jprt.bundle.src.dirs=make src
+jprt.bundle.exclude.src.dirs=build dist
+
diff --git a/make/tools/StripProperties/StripProperties.java b/make/tools/StripProperties/StripProperties.java
new file mode 100644
index 00000000..4a3943b0
--- /dev/null
+++ b/make/tools/StripProperties/StripProperties.java
@@ -0,0 +1,329 @@
+/*
+ * Copyright 2001 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.
+ */
+
+import java.io.BufferedInputStream;
+import java.io.BufferedWriter;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.Properties;
+
+/**
+ * Reads a properties file from standard input and writes an equivalent
+ * properties file without comments to standard output.
+ */
+public class StripProperties {
+
+ public static void main(String[] args) {
+ StripProperties sp = new StripProperties();
+ boolean ok = sp.run(args);
+ if ( !ok ) {
+ System.exit(1);
+ }
+ }
+
+ static interface Log {
+ void info(String msg);
+ void verbose(String msg);
+ void error(String msg, Exception e);
+ }
+
+ private String propfiles[];
+ private String outfiles[] ;
+ private int stripCount = 0;
+ private boolean quiet = false;
+ private Log log;
+
+ public void setLog(Log log) {
+ this.log = log;
+ }
+
+ private boolean parseOptions(String args[]) {
+ boolean ok = true;
+ if ( stripCount > 0 ) {
+ String new_propfiles[] = new String[stripCount + args.length];
+ String new_outfiles[] = new String[stripCount + args.length];
+ System.arraycopy(propfiles, 0, new_propfiles, 0, stripCount);
+ System.arraycopy(outfiles, 0, new_outfiles, 0, stripCount);
+ propfiles = new_propfiles;
+ outfiles = new_outfiles;
+ } else {
+ propfiles = new String[args.length];
+ outfiles = new String[args.length];
+ }
+
+ for ( int i = 0; i < args.length ; i++ ) {
+ if ( "-strip".equals(args[i]) && i+2 < args.length ) {
+ propfiles[stripCount] = args[++i];
+ outfiles[stripCount] = args[++i];
+ stripCount++;
+ } else if ( "-optionsfile".equals(args[i]) && i+1 < args.length ) {
+ String filename = args[++i];
+ FileInputStream finput = null;
+ byte contents[] = null;
+ try {
+ finput = new FileInputStream(filename);
+ int byteCount = finput.available();
+ if ( byteCount <= 0 ) {
+ log.error("The -optionsfile file is empty", null);
+ ok = false;
+ } else {
+ contents = new byte[byteCount];
+ int bytesRead = finput.read(contents);
+ if ( byteCount != bytesRead ) {
+ log.error("Cannot read all of -optionsfile file", null);
+ ok = false;
+ }
+ }
+ } catch ( IOException e ) {
+ log.error("cannot open " + filename, e);
+ ok = false;
+ }
+ if ( finput != null ) {
+ try {
+ finput.close();
+ } catch ( IOException e ) {
+ ok = false;
+ log.error("cannot close " + filename, e);
+ }
+ }
+ if ( ok = true && contents != null ) {
+ String tokens[] = (new String(contents)).split("\\s+");
+ if ( tokens.length > 0 ) {
+ ok = parseOptions(tokens);
+ }
+ }
+ if ( !ok ) {
+ break;
+ }
+ } else if ( "-quiet".equals(args[i]) ) {
+ quiet = true;
+ } else {
+ log.error("argument error", null);
+ ok = false;
+ }
+ }
+ return ok;
+ }
+
+ private boolean stripFiles(String propertiesPath, String outputPath) {
+ boolean ok = true;
+ Properties prop = new Properties();
+ InputStream in = null;
+ try {
+ in = new BufferedInputStream(new FileInputStream(propertiesPath));
+ prop.load(in);
+ } catch ( FileNotFoundException e ) {
+ log.error("Cannot access file " + propertiesPath, e);
+ ok = false;
+ } catch ( IOException e ) {
+ log.error("IO exception processing file " + propertiesPath, e);
+ ok = false;
+ }
+ if ( in != null ) {
+ try {
+ in.close();
+ } catch ( IOException e ) {
+ log.error("IO exception closing file " + propertiesPath, e);
+ ok = false;
+ }
+ }
+
+ OutputStream out = null;
+ try {
+ out = new FileOutputStream(outputPath);
+ storeProperties(prop, out);
+ out.flush();
+ } catch ( IOException e ) {
+ log.error("IO exception processing file " + outputPath, e);
+ e.printStackTrace();
+ ok = false;
+ }
+ if ( out != null ) {
+ try {
+ out.close();
+ } catch ( IOException e ) {
+ log.error("IO exception closing file " + outputPath, e);
+ ok = false;
+ }
+ }
+ return ok;
+ }
+
+ /**
+ * Strip the properties filenames supplied, replacing their contents.
+ * @param args Names of properties files to process and replace contents
+ */
+ public boolean run(String args[]) {
+ if (log == null) {
+ log = new Log() {
+ public void error(String msg, Exception e) {
+ System.err.println("ERROR: StripProperties: " + msg);
+ if ( e != null ) {
+ System.err.println("EXCEPTION: " + e.toString());
+ e.printStackTrace();
+ }
+ }
+ public void info(String msg) {
+ System.out.println(msg);
+ }
+ public void verbose(String msg) {
+ if (!quiet)
+ System.out.println(msg);
+ }
+ };
+ }
+
+ boolean ok = true;
+ ok = parseOptions(args);
+ if ( ok && stripCount == 0 ) {
+ log.error("options parsed but no files to compile", null);
+ ok = false;
+ }
+ /* Need at least one file. */
+ if ( !ok ) {
+ //usage(log);
+ } else {
+ /* Process files */
+ for ( int i = 0; i < stripCount && ok ; i++ ) {
+ ok = stripFiles(propfiles[i], outfiles[i]);
+ }
+ }
+ return ok;
+ }
+
+ // --- code below here is adapted from java.util.Properties ---
+
+ private static final String specialSaveChars = "=: \t\r\n\f#!";
+
+ /*
+ * Converts unicodes to encoded &#92;uxxxx
+ * and writes out any of the characters in specialSaveChars
+ * with a preceding slash
+ */
+ private static String saveConvert(String theString, boolean escapeSpace) {
+ int len = theString.length();
+ StringBuffer outBuffer = new StringBuffer(len*2);
+
+ for(int x=0; x<len; x++) {
+ char aChar = theString.charAt(x);
+ switch(aChar) {
+ case ' ':
+ if (x == 0 || escapeSpace) {
+ outBuffer.append('\\');
+ }
+ outBuffer.append(' ');
+ break;
+ case '\\':
+ outBuffer.append('\\');
+ outBuffer.append('\\');
+ break;
+ case '\t':
+ outBuffer.append('\\');
+ outBuffer.append('t');
+ break;
+ case '\n':
+ outBuffer.append('\\');
+ outBuffer.append('n');
+ break;
+ case '\r':
+ outBuffer.append('\\');
+ outBuffer.append('r');
+ break;
+ case '\f':
+ outBuffer.append('\\');
+ outBuffer.append('f');
+ break;
+ default:
+ if ((aChar < 0x0020) || (aChar == 0x007e) || (aChar > 0x00ff)) {
+ outBuffer.append('\\');
+ outBuffer.append('u');
+ outBuffer.append(toHex((aChar >> 12) & 0xF));
+ outBuffer.append(toHex((aChar >> 8) & 0xF));
+ outBuffer.append(toHex((aChar >> 4) & 0xF));
+ outBuffer.append(toHex( aChar & 0xF));
+ } else {
+ if (specialSaveChars.indexOf(aChar) != -1) {
+ outBuffer.append('\\');
+ }
+ outBuffer.append(aChar);
+ }
+ }
+ }
+ return outBuffer.toString();
+ }
+
+ /**
+ * Writes the content of <code>properties</code> to <code>out</code>.
+ * The format is that of Properties.store with the following modifications:
+ * <ul>
+ * <li>No header or date is written
+ * <li>Latin-1 characters are written as single bytes, not escape sequences
+ * <li>Line breaks are indicated by a single \n independent of platform
+ * <ul>
+ */
+ private static void storeProperties(Properties properties, OutputStream out)
+ throws IOException {
+ BufferedWriter awriter;
+ awriter = new BufferedWriter(new OutputStreamWriter(out, "8859_1"));
+ for (Enumeration e = properties.keys(); e.hasMoreElements();) {
+ String key = (String)e.nextElement();
+ String val = (String)properties.get(key);
+ key = saveConvert(key, true);
+
+ /* No need to escape embedded and trailing spaces for value, hence
+ * pass false to flag.
+ */
+ val = saveConvert(val, false);
+ writeln(awriter, key + "=" + val);
+ }
+ awriter.flush();
+ }
+
+ private static void writeln(BufferedWriter bw, String s) throws IOException {
+ bw.write(s);
+ bw.write("\n");
+ }
+
+ /**
+ * Convert a nibble to a hex character
+ * @param nibble the nibble to convert.
+ */
+ private static char toHex(int nibble) {
+ return hexDigit[(nibble & 0xF)];
+ }
+
+ /** A table of hex digits */
+ private static final char[] hexDigit = {
+ '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'
+ };
+}
diff --git a/make/tools/StripProperties/StripPropertiesTask.java b/make/tools/StripProperties/StripPropertiesTask.java
new file mode 100644
index 00000000..59a95ee9
--- /dev/null
+++ b/make/tools/StripProperties/StripPropertiesTask.java
@@ -0,0 +1,87 @@
+/*
+ * Copyright 2007 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.
+ */
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.DirectoryScanner;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.taskdefs.MatchingTask;
+
+public class StripPropertiesTask extends MatchingTask {
+ public void setSrcDir(File srcDir) {
+ this.srcDir = srcDir;
+ }
+
+ public void setDestDir(File destDir) {
+ this.destDir = destDir;
+ }
+
+ public void execute() {
+ StripProperties.Log log = new StripProperties.Log() {
+ public void error(String msg, Exception e) {
+ log(msg, Project.MSG_ERR);
+ }
+ public void info(String msg) {
+ log(msg, Project.MSG_INFO);
+ }
+ public void verbose(String msg) {
+ log(msg, Project.MSG_VERBOSE);
+ }
+ };
+ List<String> mainOpts = new ArrayList<String>();
+ int count = 0;
+ DirectoryScanner s = getDirectoryScanner(srcDir);
+ for (String path: s.getIncludedFiles()) {
+ if (path.endsWith(".properties")) {
+ File srcFile = new File(srcDir, path);
+ File destFile = new File(destDir, path);
+ // Arguably, the comparison in the next line should be ">", not ">="
+ // but that assumes the resolution of the last modified time is fine
+ // grained enough; in practice, it is better to use ">=".
+ if (destFile.exists() && destFile.lastModified() >= srcFile.lastModified())
+ continue;
+ destFile.getParentFile().mkdirs();
+ mainOpts.add("-strip");
+ mainOpts.add(srcFile.getPath());
+ mainOpts.add(destFile.getPath());
+ count++;
+ }
+ }
+ if (mainOpts.size() > 0) {
+ log("Generating " + count + " resource files to " + destDir, Project.MSG_INFO);
+ StripProperties sp = new StripProperties();
+ sp.setLog(log);
+ boolean ok = sp.run((String[])mainOpts.toArray(new String[mainOpts.size()]));
+ if (!ok)
+ throw new BuildException("StripProperties failed.");
+ }
+ }
+
+ private File srcDir;
+ private File destDir;
+}