Makefile revision 160
1fdd2470b625a58b57d0b155e6caf8c4fc0afe8aAutomatic Updater# Copyright 2007-2008 Sun Microsystems, Inc. All Rights Reserved.
6a42ab64276ff832a47e009be1208f7c7d4da22dAutomatic Updater# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6a42ab64276ff832a47e009be1208f7c7d4da22dAutomatic Updater# This code is free software; you can redistribute it and/or modify it
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# under the terms of the GNU General Public License version 2 only, as
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# published by the Free Software Foundation. Sun designates this
6a42ab64276ff832a47e009be1208f7c7d4da22dAutomatic Updater# particular file as subject to the "Classpath" exception as provided
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# by Sun in the LICENSE file that accompanied this code.
6a42ab64276ff832a47e009be1208f7c7d4da22dAutomatic Updater# This code is distributed in the hope that it will be useful, but WITHOUT
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# version 2 for more details (a copy is included in the LICENSE file that
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# accompanied this code).
852ccdd42a71550c974111b49415204ffeca6573Automatic Updater# You should have received a copy of the GNU General Public License version
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# 2 along with this work; if not, write to the Free Software Foundation,
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# CA 95054 USA or visit www.sun.com if you need additional information or
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# have any questions.
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# Makefile for building jce.jar and the various cryptographic strength
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# policy jar files.
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# (The terms "OpenJDK" and "JDK" below refer to OpenJDK and Sun JDK builds
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# respectively.)
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# JCE builds are very different between OpenJDK and JDK. The OpenJDK JCE
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# jar files do not require signing, but those for JDK do. If an unsigned
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# jar file is installed into JDK, things will break when the crypto
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# routines are called.
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# This Makefile does the "real" build of the JCE files. There are some
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# javac options currently specific to JCE, so we recompile now to make
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# sure any implicit compilations didn't use any incorrect flags.
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# For OpenJDK, the jar files built here are installed directly into the
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# For JDK, the binaries use pre-built/pre-signed/pre-obfuscated binary
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# files stored in the closed workspace that are not shipped in the
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# OpenJDK workspaces. We still build the JDK files here to verify the
ed4475f3f583f6137b4ff7fea775c5363a4fdb29Automatic Updater# files compile, and in preparation for possible signing and
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# obfuscation. Developers working on JCE in JDK must sign the JCE files
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# before testing: obfuscation is optional during development. The JCE
852ccdd42a71550c974111b49415204ffeca6573Automatic Updater# signing key is kept separate from the JDK workspace to prevent its
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# disclosure. The obfuscation tool has not been licensed for general
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# SPECIAL NOTE TO JCE/JDK developers: The source files must eventually
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# be built, obfuscated, signed, and the resulting jar files *MUST BE
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# CHECKED INTO THE CLOSED PART OF THE WORKSPACE*. This separate step
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# *MUST NOT BE FORGOTTEN*, otherwise a bug fixed in the source code will
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# not be reflected in the shipped binaries. The "release" target should
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# be used to generate the required files.
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# There are a number of targets to help both JDK/OpenJDK developers.
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# Main Targets (JDK/OPENJDK):
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# If OpenJDK, installs
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# If JDK, installs prebuilt
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# If OpenJDK, does not sign
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# If JDK, tries to sign
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# Other lesser-used Targets (JDK/OPENJDK):
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# build-jar Builds jce.jar (does not sign/install)
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# build-policy Builds policy files (does not sign/install)
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# install-jar Alias for "jar" above
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater# install-limited Builds/installs limited policy files
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater# If OpenJDK, does not sign
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater# If JDK, tries to sign
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater# install-unlimited Builds/nstalls unlimited policy files
852ccdd42a71550c974111b49415204ffeca6573Automatic Updater# If OpenJDK, does not sign
852ccdd42a71550c974111b49415204ffeca6573Automatic Updater# If JDK, tries to sign
852ccdd42a71550c974111b49415204ffeca6573Automatic Updater# Other targets (JDK only):
ed4475f3f583f6137b4ff7fea775c5363a4fdb29Automatic Updater# sign Alias for sign-jar and sign-policy
ed4475f3f583f6137b4ff7fea775c5363a4fdb29Automatic Updater# sign-jar Builds/signs jce.jar file (no install)
ed4475f3f583f6137b4ff7fea775c5363a4fdb29Automatic Updater# sign-policy Builds/signs policy files (no install)
ed4475f3f583f6137b4ff7fea775c5363a4fdb29Automatic Updater# release Builds all targets in preparation
ed4475f3f583f6137b4ff7fea775c5363a4fdb29Automatic Updater# for workspace integration.
ed4475f3f583f6137b4ff7fea775c5363a4fdb29Automatic Updater# install-prebuilt Installs the pre-built jar files
ed4475f3f583f6137b4ff7fea775c5363a4fdb29Automatic Updater# This makefile was written to support parallel target execution.
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# The following is for when we need to do postprocessing
ed4475f3f583f6137b4ff7fea775c5363a4fdb29Automatic Updater# (signing/obfuscation) against a read-only build. If the OUTPUTDIR
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# isn't writable, the build currently crashes out.
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater # =====================================================
852ccdd42a71550c974111b49415204ffeca6573Automatic Updater # Where to place the output, in case we're building from a read-only
852ccdd42a71550c974111b49415204ffeca6573Automatic Updater # build area. (e.g. a release engineering build.)
852ccdd42a71550c974111b49415204ffeca6573Automatic Updater# Location for the newly built classfiles.
852ccdd42a71550c974111b49415204ffeca6573Automatic Updater# Subdirectories of these are automatically included.
852ccdd42a71550c974111b49415204ffeca6573Automatic Updater# Some licensees do not get the security sources, but we still need to
852ccdd42a71550c974111b49415204ffeca6573Automatic Updater# be able to build "all" for them. Check here to see if the sources were
852ccdd42a71550c974111b49415204ffeca6573Automatic Updater# available. If not, then we don't need to continue this rule.
852ccdd42a71550c974111b49415204ffeca6573Automatic Updaterall: build-jar install-jar build-policy install-limited
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updaterelse # FILES_java/policy files available
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updaterendif # $(FILES_java)/policy files available
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# We use a variety of subdirectories in the $(TEMPDIR) depending on what
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# part of the build we're doing. Both OPENJDK/JDK builds are initially
852ccdd42a71550c974111b49415204ffeca6573Automatic Updater# done in the unsigned area. When files are signed or obfuscated in JDK,
852ccdd42a71550c974111b49415204ffeca6573Automatic Updater# they will be placed in the appropriate areas.
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# =====================================================
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# Build the unsigned jce.jar file. Signing/obfuscation comes later.
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# JCE building is somewhat involved.
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# OpenJDK: Since we do not ship prebuilt JCE files, previous compiles
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# in the build may have needed JCE class signatures. There were then
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# implicitly built by javac (likely using the boot javac). While using
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# those class files was fine for signatures, we need to rebuild using
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# the right compiler.
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# JDK: Even through the jce.jar was previously installed, since the
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# source files are accessible in the source directories, they will
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# always be "newer" than the prebuilt files inside the jar, and thus
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# make will always rebuild them. (We could "hide" the JCE source in a
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# separate directory, but that would make the build logic for JDK and
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# OpenJDK more complicated.)
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# Thus in either situation, we shouldn't use these files.
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# To make sure the classes were built with the right compiler options,
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# delete the existing files in $(CLASSBINDIR), rebuild the right way in a
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# directory under $(TEMPDIR), then copy the files back to
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# $(CLASSBINDIR). Building in $(TEMPDIR) allows us to use our make
852ccdd42a71550c974111b49415204ffeca6573Automatic Updater# infrastructure without modification: .classes.list, macros, etc.
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# The list of directories that will be remade from scratch, using the
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic UpdaterDELETE_DIRS = $(patsubst %, $(CLASSBINDIR)/%, $(AUTO_FILES_JAVA_DIRS))
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# Since the -C option to jar is used below, each directory entry must be
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# preceded with the appropriate directory to "cd" into.
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic UpdaterJAR_DIRS = $(patsubst %, -C $(CLASSDESTDIR) %, $(AUTO_FILES_JAVA_DIRS))
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# Build jce.jar, then replace the previously built JCE files in the
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# classes directory with these. This ensures we have consistently built
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# files throughout the workspaces.
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater$(UNSIGNED_DIR)/jce.jar: prebuild build $(JCE_MANIFEST_FILE)
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(BOOT_JAR_CMD) cmf $(JCE_MANIFEST_FILE) $@ $(JAR_DIRS) \
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# =====================================================
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# Build the unsigned policy files.
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# Given the current state of world export/import policies,
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# these settings work for Sun's situation. This note is not
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# legal guidance, you must still resolve any export/import issues
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# applicable for your situation. Contact your export/import
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# counsel for more information.
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic UpdaterUNSIGNED_POLICY_BUILDDIR = $(UNSIGNED_DIR)/policy
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# Build the unsigned unlimited policy files.
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar \
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(UNSIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater$(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar: \
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater policy/unlimited/default_US_export.policy \
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(BOOT_JAR_CMD) cmf policy/unlimited/UNLIMITED $@ \
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater -C policy/unlimited default_US_export.policy \
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater$(UNSIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar: \
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(BOOT_JAR_CMD) cmf policy/unlimited/UNLIMITED $@ \
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater -C policy/unlimited default_local.policy \
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# Build the unsigned limited policy files.
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# NOTE: We currently do not place restrictions on our limited export
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# policy. This was not a typo.
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(UNSIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar \
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(UNSIGNED_POLICY_BUILDDIR)/limited/local_policy.jar
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater$(UNSIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar: \
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater$(UNSIGNED_POLICY_BUILDDIR)/limited/local_policy.jar: \
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater $(BOOT_JAR_CMD) cmf policy/limited/LIMITED $@ \
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater $(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar \
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(UNSIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar \
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(UNSIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar \
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(UNSIGNED_POLICY_BUILDDIR)/limited/local_policy.jar \
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# =====================================================
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# Sign the various jar files. Not needed for OpenJDK.
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic UpdaterSIGNED_POLICY_BUILDDIR = $(SIGNED_DIR)/policy
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(patsubst $(UNSIGNED_POLICY_BUILDDIR)/%,$(SIGNED_POLICY_BUILDDIR)/%, \
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater$(SIGNED_DIR)/jce.jar: $(UNSIGNED_DIR)/jce.jar
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# We have to remove the build dependency, otherwise, we'll try to rebuild it
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# which we can't do on a read-only filesystem.
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater @if [ ! -r $(UNSIGNED_DIR)/jce.jar ] ; then \
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(ECHO) "Couldn't find $(UNSIGNED_DIR)/jce.jar"; \
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(call sign-file, $(UNSIGNED_DIR)/jce.jar)
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater$(SIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar: \
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater$(SIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar: \
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(UNSIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater$(SIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar: \
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(UNSIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater$(SIGNED_POLICY_BUILDDIR)/limited/local_policy.jar: \
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(UNSIGNED_POLICY_BUILDDIR)/limited/local_policy.jar
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# =====================================================
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# Obfuscate/sign/install the JDK build. Not needed for OpenJDK.
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic UpdaterCLOSED_DIR = $(BUILDDIR)/closed/javax/crypto
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater$(OBFUS_DIR)/jce.jar: build-jar $(JCE_MANIFEST_FILE) $(OBFUS_DIR)/framework.dox
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# We have to remove the build dependency, otherwise, we'll try to rebuild it
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# which we can't do on a read-only filesystem.
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater$(OBFUS_DIR)/jce.jar: $(JCE_MANIFEST_FILE) $(OBFUS_DIR)/framework.dox
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater @if [ ! -d $(CLASSDESTDIR) ] ; then \
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(ECHO) "Couldn't find $(CLASSDESTDIR)"; \
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater @$(ECHO) ">>>Obfuscating JCE framework..."
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater @# The sun.security.internal classes are currently not obfuscated
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater @# due to an obfus problem. Manually copy them to the build directory
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater @# so that they are included in the jce.jar file.
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(CP) -r $(CLASSDESTDIR)/sun $(OBFUS_DIR)/build
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(BOOT_JAR_CMD) cmf $(JCE_MANIFEST_FILE) $@ \
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater$(OBFUS_DIR)/framework.dox: $(CLOSED_DIR)/obfus/framework.dox
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(SED) "s:@@TEMPDIR@@:$(ABS_TEMPDIR):" $< > $@
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# The current obfuscator has a limitation in that it currently only
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# supports up to v49 class file format. Force v49 classfiles in our
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# builds for now.
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# =====================================================
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# Create the Release Engineering files. Obfuscated builds,
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# unlimited policy file distribution, etc.
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updaterrelease: $(OBFUS_DIR)/jce.jar sign-policy $(CLOSED_DIR)/doc/COPYRIGHT.html \
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(JCE_BUILD_DIR)/release/UnlimitedJCEPolicy \
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(JCE_BUILD_DIR)/release/US_export_policy.jar \
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(JCE_BUILD_DIR)/release/local_policy.jar \
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(JCE_BUILD_DIR)/release/UnlimitedJCEPolicy.zip
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(MKDIR) -p $(JCE_BUILD_DIR)/release/UnlimitedJCEPolicy
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(CP) $(OBFUS_DIR)/jce.jar $(JCE_BUILD_DIR)/release
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(SIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar \
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(SIGNED_POLICY_BUILDDIR)/limited/local_policy.jar \
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(SIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar \
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(SIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar \
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(JCE_BUILD_DIR)/release/UnlimitedJCEPolicy
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(ZIPEXE) -qr UnlimitedJCEPolicy.zip UnlimitedJCEPolicy
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# =====================================================
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# Install routines.
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater# Install jce.jar, depending on which type is requested.
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# Install the appropriate policy file, depending on the type of build.
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic UpdaterINSTALL_POLICYDIR = $(UNSIGNED_POLICY_BUILDDIR)
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic UpdaterINSTALL_POLICYDIR = $(SIGNED_POLICY_BUILDDIR)
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(INSTALL_POLICYDIR)/limited/US_export_policy.jar \
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(INSTALL_POLICYDIR)/limited/local_policy.jar
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(INSTALL_POLICYDIR)/unlimited/US_export_policy.jar \
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(INSTALL_POLICYDIR)/unlimited/local_policy.jar
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater @$(ECHO) "\n>>>Installing prebuilt JCE framework..."
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(CP) $(PREBUILT_DIR)/jce/jce.jar $(JAR_DESTFILE)
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(PREBUILT_DIR)/jce/US_export_policy.jar \
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# =====================================================
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# Support routines.
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater $(RM) -r $(JAR_DESTFILE) $(POLICY_DESTDIR)/US_export_policy.jar \
852ccdd42a71550c974111b49415204ffeca6573Automatic Updater $(POLICY_DESTDIR)/local_policy.jar $(DELETE_DIRS) $(TEMPDIR) \
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater.PHONY: build-jar jar build-policy unlimited limited install-jar \