Makefile revision 2080
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# Copyright 2007-2009 Sun Microsystems, Inc. All Rights Reserved.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# This code is free software; you can redistribute it and/or modify it
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# under the terms of the GNU General Public License version 2 only, as
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# published by the Free Software Foundation. Sun designates this
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# particular file as subject to the "Classpath" exception as provided
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# by Sun in the LICENSE file that accompanied this code.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# This code is distributed in the hope that it will be useful, but WITHOUT
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# version 2 for more details (a copy is included in the LICENSE file that
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# accompanied this code).
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# You should have received a copy of the GNU General Public License version
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# 2 along with this work; if not, write to the Free Software Foundation,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# CA 95054 USA or visit www.sun.com if you need additional information or
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# have any questions.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# Makefile for building sunjce_provider.jar.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# This file was derived from make/javax/crypto/Makefile.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# (The terms "OpenJDK" and "JDK" below refer to OpenJDK and Sun JDK builds
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# respectively.)
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# JCE builds are very different between OpenJDK and JDK. The OpenJDK JCE
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# jar files do not require signing, but those for JDK do. If an unsigned
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# jar file is installed into JDK, things will break when the crypto
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# routines are called.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# This Makefile does the "real" build of the JCE files. There are some
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# javac options currently specific to JCE, so we recompile now to make
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# sure any implicit compilations didn't use any incorrect flags.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# For OpenJDK, the jar files built here are installed directly into the
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# For JDK, the binaries use pre-built/pre-signed binary files stored in
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# the closed workspace that are not shipped in the OpenJDK workspaces.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# We still build the JDK files here to verify the files compile, and in
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# preparation for possible signing. Developers working on JCE in JDK
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# must sign the JCE files before testing. The JCE signing key is kept
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# separate from the JDK workspace to prevent its disclosure.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# SPECIAL NOTE TO JCE/JDK developers: The source files must eventually
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# be built and signed, and the resulting jar files MUST BE CHECKED INTO
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# THE CLOSED PART OF THE WORKSPACE*. This separate step *MUST NOT BE
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# FORGOTTEN*, otherwise a bug fixed in the source code will not be
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# reflected in the shipped binaries. The "release" target should be
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# used to generate the required files.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# There are a number of targets to help both JDK/OpenJDK developers.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# Main Targets (JDK/OPENJDK):
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# If OpenJDK, installs sunjce_provider.jar.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# If JDK, installs prebuilt
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# If OpenJDK, does not sign.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# If JDK, tries to sign.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# Other lesser-used Targets (JDK/OPENJDK):
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# build-jar Builds sunjce_provider.jar
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# install-jar Alias for "jar" above.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# Other targets (JDK only):
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# sign Alias for sign-jar
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# sign-jar Builds/signs sunjce_provider.jar (no install)
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# release Builds all targets in preparation
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# for workspace integration.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# install-prebuilt Installs the pre-built jar files
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# This makefile was written to support parallel target execution.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncBUILDDIR = ../../../..
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# The following is for when we need to do postprocessing
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# (signing) against a read-only build. If the OUTPUTDIR
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# isn't writable, the build currently crashes out.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync # =====================================================
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync # Where to place the output, in case we're building from a read-only
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync # build area. (e.g. a release engineering build.)
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# Location for the newly built classfiles.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# Subdirectories of these are automatically included.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# Some licensees do not get the security sources, but we still need to
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# be able to build "all" for them. Check here to see if the sources were
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# available. If not, then we don't need to continue this rule.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncelse # OPENJDK
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncelse # FILES_java available
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# We use a variety of subdirectories in the $(TEMPDIR) depending on what
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# part of the build we're doing. Both OPENJDK/JDK builds are initially
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# done in the unsigned area. When files are signed in JDK, they will be
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# placed in the appropriate areas.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# =====================================================
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# Build the unsigned sunjce_provider.jar file.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# The sunjce_provider.jar needs to be in the extension class directory,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# therefore none of its classes should appear in $(CLASSBINDIR).
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# Currently no one is using any of the SunJCE internals, so these files
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# should not have been built.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# Since the -C option to jar is used below, each directory entry must be
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# preceded with the appropriate directory to "cd" into.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncJAR_DIRS = $(patsubst %, -C $(CLASSDESTDIR) %, $(AUTO_FILES_JAVA_DIRS))
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync$(UNSIGNED_DIR)/sunjce_provider.jar: build $(JCE_MANIFEST_FILE)
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync $(BOOT_JAR_CMD) cmf $(JCE_MANIFEST_FILE) $@ $(JAR_DIRS) \
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# =====================================================
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync# Sign the provider jar file. Not needed for OpenJDK.
# Install sunjce_provider.jar, depending on which type is requested.