jdk/make/javax/crypto/Makefile
author ohair
Wed, 06 Aug 2008 15:02:15 -0700
changeset 916 867515b155b5
parent 300 d4f77ff718fd
child 3332 b9c68d909f98
permissions -rw-r--r--
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build Summary: Needed BOOT_JAR_JFLAGS. Fixed PREVIOUS_RELEASE_IMAGE. Reviewed-by: tbell
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
#
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
     2
# Copyright 2007-2008 Sun Microsystems, Inc.  All Rights Reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
# published by the Free Software Foundation.  Sun designates this
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
# by Sun in the LICENSE file that accompanied this code.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
# accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
# CA 95054 USA or visit www.sun.com if you need additional information or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
# have any questions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
# Makefile for building jce.jar and the various cryptographic strength
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
# policy jar files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
# (The terms "OpenJDK" and "JDK" below refer to OpenJDK and Sun JDK builds
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
# respectively.)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
# JCE builds are very different between OpenJDK and JDK.  The OpenJDK JCE
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
# jar files do not require signing, but those for JDK do.  If an unsigned
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
# jar file is installed into JDK, things will break when the crypto
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
# routines are called.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
# This Makefile does the "real" build of the JCE files.  There are some
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
# javac options currently specific to JCE, so we recompile now to make
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
# sure any implicit compilations didn't use any incorrect flags.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
# For OpenJDK, the jar files built here are installed directly into the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
# OpenJDK.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
# For JDK, the binaries use pre-built/pre-signed/pre-obfuscated binary
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
# files stored in the closed workspace that are not shipped in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
# OpenJDK workspaces.  We still build the JDK files here to verify the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
# files compile, and in preparation for possible signing and
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
# obfuscation.  Developers working on JCE in JDK must sign the JCE files
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
# before testing: obfuscation is optional during development.  The JCE
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
# signing key is kept separate from the JDK workspace to prevent its
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
# disclosure.  The obfuscation tool has not been licensed for general
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
# usage.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
# SPECIAL NOTE TO JCE/JDK developers:  The source files must eventually
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
# be built, obfuscated, signed, and the resulting jar files *MUST BE
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
# CHECKED INTO THE CLOSED PART OF THE WORKSPACE*.  This separate step
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
# *MUST NOT BE FORGOTTEN*, otherwise a bug fixed in the source code will
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
# not be reflected in the shipped binaries.  The "release" target should
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
# be used to generate the required files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
# There are a number of targets to help both JDK/OpenJDK developers.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
# Main Targets (JDK/OPENJDK):
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
#     all/clobber/clean		The usual.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
#				    If OpenJDK, installs
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
#					jce.jar/limited policy files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
#				    If JDK, installs prebuilt
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
#					jce.jar/limited policy files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
#     jar			Builds/installs jce.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
#				    If OpenJDK, does not sign
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
#				    If JDK, tries to sign
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
# Other lesser-used Targets (JDK/OPENJDK):
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
#     build-jar			Builds jce.jar (does not sign/install)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
#     build-policy		Builds policy files (does not sign/install)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
#     install-jar		Alias for "jar" above
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
#     install-limited		Builds/installs limited policy files
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
#				    If OpenJDK, does not sign
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
#				    If JDK, tries to sign
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
#     install-unlimited		Builds/nstalls unlimited policy files
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
#				    If OpenJDK, does not sign
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
#				    If JDK, tries to sign
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
# Other targets (JDK only):
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
#     sign			Alias for sign-jar and sign-policy
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
#	  sign-jar		Builds/signs jce.jar file (no install)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
#	  sign-policy		Builds/signs policy files (no install)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
#
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
    99
#     obfus			Builds/obfuscates/signs jce.jar
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
#     release			Builds all targets in preparation
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
#				for workspace integration.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
#     install-prebuilt		Installs the pre-built jar files
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
# This makefile was written to support parallel target execution.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
BUILDDIR = ../..
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
PACKAGE = javax.crypto
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
PRODUCT = sun
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   113
#
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   114
# The following is for when we need to do postprocessing
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   115
# (signing/obfuscation) against a read-only build.  If the OUTPUTDIR
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   116
# isn't writable, the build currently crashes out.
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   117
#
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   118
ifndef OPENJDK
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   119
  ifdef ALT_JCE_BUILD_DIR
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   120
    # =====================================================
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   121
    # Where to place the output, in case we're building from a read-only
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   122
    # build area.  (e.g. a release engineering build.)
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   123
    JCE_BUILD_DIR=${ALT_JCE_BUILD_DIR}
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   124
    IGNORE_WRITABLE_OUTPUTDIR_TEST=true
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   125
  else
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   126
    JCE_BUILD_DIR=${TEMPDIR}
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   127
  endif
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   128
endif
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   129
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
include $(BUILDDIR)/common/Defs.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
# Location for the newly built classfiles.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
CLASSDESTDIR = $(TEMPDIR)/classes
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
# Subdirectories of these are automatically included.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
AUTO_FILES_JAVA_DIRS = \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
    javax/crypto \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
    sun/security/internal/interfaces \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
    sun/security/internal/spec
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
include $(BUILDDIR)/common/Classes.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
# Rules
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
# Some licensees do not get the security sources, but we still need to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
# be able to build "all" for them.  Check here to see if the sources were
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
# available.  If not, then we don't need to continue this rule.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
ifdef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
all: build-jar install-jar build-policy install-limited
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
else  # OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
ifeq ($(strip $(FILES_java)),)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
all:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
	$(no-source-warning)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
else  # FILES_java/policy files available
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
all: build-jar build-policy
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
	$(build-warning)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
endif # $(FILES_java)/policy files available
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
endif # OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
# We use a variety of subdirectories in the $(TEMPDIR) depending on what
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
# part of the build we're doing.  Both OPENJDK/JDK builds are initially
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
# done in the unsigned area.  When files are signed or obfuscated in JDK,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
# they will be placed in the appropriate areas.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
UNSIGNED_DIR = $(TEMPDIR)/unsigned
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   177
include Defs-jce.gmk
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   178
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
# =====================================================
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
# Build the unsigned jce.jar file.  Signing/obfuscation comes later.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
JAR_DESTFILE = $(LIBDIR)/jce.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
# JCE building is somewhat involved.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
# OpenJDK:  Since we do not ship prebuilt JCE files, previous compiles
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
# in the build may have needed JCE class signatures.  There were then
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
# implicitly built by javac (likely using the boot javac).  While using
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
# those class files was fine for signatures, we need to rebuild using
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
# the right compiler.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
# JDK:  Even through the jce.jar was previously installed, since the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
# source files are accessible in the source directories, they will
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
# always be "newer" than the prebuilt files inside the jar, and thus
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
# make will always rebuild them.  (We could "hide" the JCE source in a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
# separate directory, but that would make the build logic for JDK and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
# OpenJDK more complicated.)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
# Thus in either situation, we shouldn't use these files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
# To make sure the classes were built with the right compiler options,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
# delete the existing files in $(CLASSBINDIR), rebuild the right way in a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
# directory under $(TEMPDIR), then copy the files back to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
# $(CLASSBINDIR).   Building in $(TEMPDIR) allows us to use our make
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
# infrastructure without modification:  .classes.list, macros, etc.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
# The list of directories that will be remade from scratch, using the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
# right compilers/options.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
DELETE_DIRS = $(patsubst %, $(CLASSBINDIR)/%, $(AUTO_FILES_JAVA_DIRS))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
# Since the -C option to jar is used below, each directory entry must be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
# preceded with the appropriate directory to "cd" into.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
JAR_DIRS = $(patsubst %, -C $(CLASSDESTDIR) %, $(AUTO_FILES_JAVA_DIRS))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
build-jar: $(UNSIGNED_DIR)/jce.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
# Build jce.jar, then replace the previously built JCE files in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
# classes directory with these.  This ensures we have consistently built
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
# files throughout the workspaces.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
$(UNSIGNED_DIR)/jce.jar: prebuild build $(JCE_MANIFEST_FILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
	$(prep-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
	$(BOOT_JAR_CMD) cmf $(JCE_MANIFEST_FILE) $@ $(JAR_DIRS) \
916
867515b155b5 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 300
diff changeset
   233
	    $(BOOT_JAR_JFLAGS)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
	$(CP) -r $(CLASSDESTDIR)/* $(CLASSBINDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
	@$(java-vm-cleanup)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
build: prebuild
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
prebuild:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
	$(RM) -r $(DELETE_DIRS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
# =====================================================
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
# Build the unsigned policy files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
# Given the current state of world export/import policies,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
# these settings work for Sun's situation.  This note is not
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
# legal guidance, you must still resolve any export/import issues
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
# applicable for your situation.  Contact your export/import
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
# counsel for more information.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
POLICY_DESTDIR			= $(LIBDIR)/security
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
UNSIGNED_POLICY_BUILDDIR	= $(UNSIGNED_DIR)/policy
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
build-policy: unlimited limited
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
# Build the unsigned unlimited policy files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
unlimited: \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
	    $(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar	\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
	    $(UNSIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
$(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar:		\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
	    policy/unlimited/default_US_export.policy			\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
	    policy/unlimited/UNLIMITED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
	$(prep-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
	$(BOOT_JAR_CMD) cmf policy/unlimited/UNLIMITED $@		\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
	    -C policy/unlimited default_US_export.policy		\
916
867515b155b5 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 300
diff changeset
   271
	    $(BOOT_JAR_JFLAGS)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
	@$(java-vm-cleanup)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
$(UNSIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar:			\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
	    policy/unlimited/default_local.policy			\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
	    policy/unlimited/UNLIMITED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
	$(prep-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
	$(BOOT_JAR_CMD) cmf policy/unlimited/UNLIMITED $@		\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
	    -C policy/unlimited default_local.policy			\
916
867515b155b5 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 300
diff changeset
   280
	    $(BOOT_JAR_JFLAGS)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
	@$(java-vm-cleanup)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
# Build the unsigned limited policy files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
# NOTE:  We currently do not place restrictions on our limited export
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
# policy.  This was not a typo.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
limited: \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
	    $(UNSIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar	\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
	    $(UNSIGNED_POLICY_BUILDDIR)/limited/local_policy.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
$(UNSIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar:		\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
	    $(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
	$(install-file)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
$(UNSIGNED_POLICY_BUILDDIR)/limited/local_policy.jar:			\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
	    policy/limited/default_local.policy				\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
	    policy/limited/exempt_local.policy				\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
	    policy/limited/LIMITED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
	$(prep-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
	$(BOOT_JAR_CMD) cmf policy/limited/LIMITED $@			\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
	    -C policy/limited default_local.policy			\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
	    -C policy/limited exempt_local.policy			\
916
867515b155b5 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 300
diff changeset
   305
	    $(BOOT_JAR_JFLAGS)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
	@$(java-vm-cleanup)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
UNSIGNED_POLICY_FILES = \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
    $(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar		\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
    $(UNSIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar		\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
    $(UNSIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar		\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
    $(UNSIGNED_POLICY_BUILDDIR)/limited/local_policy.jar		\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
90ce3da70b43 Initial load
duke
parents:
diff changeset
   314
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
ifndef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
# =====================================================
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
# Sign the various jar files.  Not needed for OpenJDK.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   320
SIGNED_DIR		= $(JCE_BUILD_DIR)/signed
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
SIGNED_POLICY_BUILDDIR	= $(SIGNED_DIR)/policy
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
SIGNED_POLICY_FILES = \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
    $(patsubst $(UNSIGNED_POLICY_BUILDDIR)/%,$(SIGNED_POLICY_BUILDDIR)/%, \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
	$(UNSIGNED_POLICY_FILES))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
sign: sign-jar sign-policy
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
sign-jar: $(SIGNED_DIR)/jce.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
sign-policy: $(SIGNED_POLICY_FILES)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   333
ifndef ALT_JCE_BUILD_DIR
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
$(SIGNED_DIR)/jce.jar: $(UNSIGNED_DIR)/jce.jar
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   335
else
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   336
#
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   337
# We have to remove the build dependency, otherwise, we'll try to rebuild it
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   338
# which we can't do on a read-only filesystem.
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   339
#
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   340
$(SIGNED_DIR)/jce.jar:
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   341
	@if [ ! -r $(UNSIGNED_DIR)/jce.jar ] ; then \
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   342
	    $(ECHO) "Couldn't find $(UNSIGNED_DIR)/jce.jar"; \
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   343
	    exit 1; \
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   344
	fi
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   345
endif
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   346
	$(call sign-file, $(UNSIGNED_DIR)/jce.jar)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
90ce3da70b43 Initial load
duke
parents:
diff changeset
   348
$(SIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar:	\
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   349
	    $(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   350
	$(call sign-file, $<)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   351
90ce3da70b43 Initial load
duke
parents:
diff changeset
   352
$(SIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar:		\
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   353
	    $(UNSIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   354
	$(call sign-file, $<)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   355
90ce3da70b43 Initial load
duke
parents:
diff changeset
   356
$(SIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar:		\
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   357
	    $(UNSIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   358
	$(call sign-file, $<)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   359
90ce3da70b43 Initial load
duke
parents:
diff changeset
   360
$(SIGNED_POLICY_BUILDDIR)/limited/local_policy.jar:		\
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   361
	    $(UNSIGNED_POLICY_BUILDDIR)/limited/local_policy.jar
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   362
	$(call sign-file, $<)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   363
90ce3da70b43 Initial load
duke
parents:
diff changeset
   364
90ce3da70b43 Initial load
duke
parents:
diff changeset
   365
# =====================================================
90ce3da70b43 Initial load
duke
parents:
diff changeset
   366
# Obfuscate/sign/install the JDK build.  Not needed for OpenJDK.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   367
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   369
OBFUS_DIR = $(JCE_BUILD_DIR)/obfus/jce
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   370
90ce3da70b43 Initial load
duke
parents:
diff changeset
   371
CLOSED_DIR = $(BUILDDIR)/closed/javax/crypto
90ce3da70b43 Initial load
duke
parents:
diff changeset
   372
90ce3da70b43 Initial load
duke
parents:
diff changeset
   373
obfus: $(OBFUS_DIR)/jce.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   374
	$(release-warning)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   375
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   376
ifndef ALT_JCE_BUILD_DIR
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   377
$(OBFUS_DIR)/jce.jar: build-jar $(JCE_MANIFEST_FILE) $(OBFUS_DIR)/framework.dox
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   378
else
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   379
#
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   380
# We have to remove the build dependency, otherwise, we'll try to rebuild it
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   381
# which we can't do on a read-only filesystem.
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   382
#
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   383
$(OBFUS_DIR)/jce.jar: $(JCE_MANIFEST_FILE) $(OBFUS_DIR)/framework.dox
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   384
	@if [ ! -d $(CLASSDESTDIR) ] ; then \
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   385
	    $(ECHO) "Couldn't find $(CLASSDESTDIR)"; \
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   386
	    exit 1; \
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   387
	fi
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   388
endif
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   389
	@$(ECHO) ">>>Obfuscating JCE framework..."
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   390
	$(presign)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   391
	$(preobfus)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
	$(prep-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   393
	$(CD) $(OBFUS_DIR); \
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   394
	$(OBFUSCATOR) -fv framework.dox
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   395
	@$(CD) $(OBFUS_DIR); $(java-vm-cleanup)
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   396
	@#
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
	@# The sun.security.internal classes are currently not obfuscated
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
	@# due to an obfus problem. Manually copy them to the build directory
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
	@# so that they are included in the jce.jar file.
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   400
	@#
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   401
	$(CP) -r $(CLASSDESTDIR)/sun $(OBFUS_DIR)/build
90ce3da70b43 Initial load
duke
parents:
diff changeset
   402
	$(BOOT_JAR_CMD) cmf $(JCE_MANIFEST_FILE) $@	\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   403
	    -C $(OBFUS_DIR)/build javax			\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
	    -C $(OBFUS_DIR)/build sun			\
916
867515b155b5 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 300
diff changeset
   405
	    $(BOOT_JAR_JFLAGS)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
	$(sign-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
	@$(java-vm-cleanup)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   409
$(OBFUS_DIR)/framework.dox: $(CLOSED_DIR)/obfus/framework.dox
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   410
	@$(ECHO) ">>>Creating framework.dox"
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   411
	$(prep-target)
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   412
	$(SED) "s:@@TEMPDIR@@:$(ABS_TEMPDIR):" $< > $@
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   413
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   414
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   415
# The current obfuscator has a limitation in that it currently only
90ce3da70b43 Initial load
duke
parents:
diff changeset
   416
# supports up to v49 class file format.  Force v49 classfiles in our
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
# builds for now.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   418
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   419
TARGET_CLASS_VERSION = 5
90ce3da70b43 Initial load
duke
parents:
diff changeset
   420
90ce3da70b43 Initial load
duke
parents:
diff changeset
   421
90ce3da70b43 Initial load
duke
parents:
diff changeset
   422
# =====================================================
90ce3da70b43 Initial load
duke
parents:
diff changeset
   423
# Create the Release Engineering files.  Obfuscated builds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   424
# unlimited policy file distribution, etc.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   425
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   426
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   427
release: $(OBFUS_DIR)/jce.jar sign-policy $(CLOSED_DIR)/doc/COPYRIGHT.html \
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   428
         $(CLOSED_DIR)/doc/README.txt
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   429
	$(RM) -r \
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   430
	    $(JCE_BUILD_DIR)/release/UnlimitedJCEPolicy              \
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   431
	    $(JCE_BUILD_DIR)/release/jce.jar                         \
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   432
	    $(JCE_BUILD_DIR)/release/US_export_policy.jar            \
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   433
	    $(JCE_BUILD_DIR)/release/local_policy.jar                \
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   434
	    $(JCE_BUILD_DIR)/release/UnlimitedJCEPolicy.zip
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   435
	$(MKDIR) -p $(JCE_BUILD_DIR)/release/UnlimitedJCEPolicy
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   436
	$(CP) $(OBFUS_DIR)/jce.jar $(JCE_BUILD_DIR)/release
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   437
	$(CP) \
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   438
	    $(SIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar   \
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   439
	    $(SIGNED_POLICY_BUILDDIR)/limited/local_policy.jar       \
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   440
	    $(JCE_BUILD_DIR)/release
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   441
	$(CP) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   442
	    $(SIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar \
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   443
	    $(SIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar     \
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   444
	    $(CLOSED_DIR)/doc/COPYRIGHT.html                         \
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   445
	    $(CLOSED_DIR)/doc/README.txt                             \
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   446
	    $(JCE_BUILD_DIR)/release/UnlimitedJCEPolicy
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   447
	cd $(JCE_BUILD_DIR)/release ; \
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   448
	$(ZIPEXE) -qr UnlimitedJCEPolicy.zip UnlimitedJCEPolicy
90ce3da70b43 Initial load
duke
parents:
diff changeset
   449
	$(release-warning)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   450
90ce3da70b43 Initial load
duke
parents:
diff changeset
   451
endif # OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   452
90ce3da70b43 Initial load
duke
parents:
diff changeset
   453
90ce3da70b43 Initial load
duke
parents:
diff changeset
   454
# =====================================================
90ce3da70b43 Initial load
duke
parents:
diff changeset
   455
# Install routines.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   456
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   457
90ce3da70b43 Initial load
duke
parents:
diff changeset
   458
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   459
# Install jce.jar, depending on which type is requested.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   460
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   461
install-jar jar: $(JAR_DESTFILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   462
ifndef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   463
	$(release-warning)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   464
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   465
90ce3da70b43 Initial load
duke
parents:
diff changeset
   466
ifdef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   467
$(JAR_DESTFILE): $(UNSIGNED_DIR)/jce.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   468
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   469
$(JAR_DESTFILE): $(SIGNED_DIR)/jce.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   470
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   471
	$(install-file)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   472
90ce3da70b43 Initial load
duke
parents:
diff changeset
   473
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   474
# Install the appropriate policy file, depending on the type of build.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   475
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   476
ifdef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   477
INSTALL_POLICYDIR = $(UNSIGNED_POLICY_BUILDDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   478
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   479
INSTALL_POLICYDIR = $(SIGNED_POLICY_BUILDDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   480
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   481
90ce3da70b43 Initial load
duke
parents:
diff changeset
   482
install-limited: \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   483
	    $(INSTALL_POLICYDIR)/limited/US_export_policy.jar	\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   484
	    $(INSTALL_POLICYDIR)/limited/local_policy.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   485
	$(MKDIR) -p $(POLICY_DESTDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   486
	$(RM) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   487
	    $(POLICY_DESTDIR)/US_export_policy.jar		\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   488
	    $(POLICY_DESTDIR)/local_policy.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   489
	$(CP) $^ $(POLICY_DESTDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   490
ifndef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   491
	$(release-warning)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   492
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   493
90ce3da70b43 Initial load
duke
parents:
diff changeset
   494
install-unlimited: \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   495
	    $(INSTALL_POLICYDIR)/unlimited/US_export_policy.jar	\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   496
	    $(INSTALL_POLICYDIR)/unlimited/local_policy.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   497
	$(MKDIR) -p $(POLICY_DESTDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   498
	$(RM) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   499
	    $(POLICY_DESTDIR)/US_export_policy.jar		\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   500
	    $(POLICY_DESTDIR)/local_policy.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   501
	$(CP) $^ $(POLICY_DESTDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   502
ifndef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   503
	$(release-warning)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   504
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   505
90ce3da70b43 Initial load
duke
parents:
diff changeset
   506
ifndef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   507
install-prebuilt:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   508
	@$(ECHO) "\n>>>Installing prebuilt JCE framework..."
90ce3da70b43 Initial load
duke
parents:
diff changeset
   509
	$(RM) $(JAR_DESTFILE) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   510
	    $(POLICY_DESTDIR)/US_export_policy.jar \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   511
	    $(POLICY_DESTDIR)/local_policy.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   512
	$(CP) $(PREBUILT_DIR)/jce/jce.jar $(JAR_DESTFILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   513
	$(CP) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   514
	    $(PREBUILT_DIR)/jce/US_export_policy.jar \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   515
	    $(PREBUILT_DIR)/jce/local_policy.jar \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   516
	    $(POLICY_DESTDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   517
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   518
90ce3da70b43 Initial load
duke
parents:
diff changeset
   519
90ce3da70b43 Initial load
duke
parents:
diff changeset
   520
# =====================================================
90ce3da70b43 Initial load
duke
parents:
diff changeset
   521
# Support routines.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   522
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   523
90ce3da70b43 Initial load
duke
parents:
diff changeset
   524
clobber clean::
90ce3da70b43 Initial load
duke
parents:
diff changeset
   525
	$(RM) -r $(JAR_DESTFILE) $(POLICY_DESTDIR)/US_export_policy.jar \
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   526
	    $(POLICY_DESTDIR)/local_policy.jar $(DELETE_DIRS) $(TEMPDIR) \
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   527
	    $(JCE_BUILD_DIR)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   528
90ce3da70b43 Initial load
duke
parents:
diff changeset
   529
.PHONY: build-jar jar build-policy unlimited limited install-jar \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   530
	install-limited install-unlimited
90ce3da70b43 Initial load
duke
parents:
diff changeset
   531
ifndef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   532
.PHONY: sign sign-jar sign-policy obfus release install-prebuilt
90ce3da70b43 Initial load
duke
parents:
diff changeset
   533
endif