jdk/make/javax/crypto/Makefile
author ohair
Tue, 28 Dec 2010 15:53:50 -0800
changeset 7668 d4a77089c587
parent 5506 202f599c92aa
child 8583 15dea0fdc2ea
permissions -rw-r--r--
6962318: Update copyright year Reviewed-by: xdono
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
#
7668
d4a77089c587 6962318: Update copyright year
ohair
parents: 5506
diff changeset
     2
# Copyright (c) 2007, 2010, Oracle and/or its affiliates. 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
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4665
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4665
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
2
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
#
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4665
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4665
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4665
diff changeset
    23
# questions.
2
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
#
3353
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    47
# For JDK, the binaries use pre-built/pre-signed binary files stored in
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    48
# the closed workspace that are not shipped in the OpenJDK workspaces.
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    49
# We still build the JDK files here to verify the files compile, and in
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    50
# preparation for possible signing.  Developers working on JCE in JDK
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    51
# must sign the JCE files before testing.  The JCE signing key is kept
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    52
# separate from the JDK workspace to prevent its disclosure.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
# SPECIAL NOTE TO JCE/JDK developers:  The source files must eventually
3353
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    55
# be built and signed, and the resulting jar files *MUST BE CHECKED INTO
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    56
# THE CLOSED PART OF THE WORKSPACE*.  This separate step *MUST NOT BE
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    57
# FORGOTTEN*, otherwise a bug fixed in the source code will not be
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    58
# reflected in the shipped binaries.  The "release" target should be
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    59
# used to generate the required files.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
# There are a number of targets to help both JDK/OpenJDK developers.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
# Main Targets (JDK/OPENJDK):
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
#
3353
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    65
#     all/clobber/clean        The usual.
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    66
#                                  If OpenJDK: builds/installs the
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    67
#                                      jce.jar/limited policy files.
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    68
#                                  If JDK: builds but does not install.
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    69
#                                     During full tops-down builds,
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    70
#                                     prebuilt/presigned jce.jar &
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    71
#                                     limited policy files are copied
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    72
#                                     in by make/java/redist/Makefile.
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    73
#                                     If you are working in this directory
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    74
#                                     and want to install the prebuilts,
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    75
#                                     use the "install-prebuilt" target.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
#
3353
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    77
#     jar                      Builds/installs jce.jar
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    78
#                                  If OpenJDK, does not sign
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    79
#                                  If JDK, tries to sign
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
# Other lesser-used Targets (JDK/OPENJDK):
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
#
3353
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    83
#     build-jar                Builds jce.jar (does not sign/install)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
#
3353
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    85
#     build-policy             Builds policy files (does not sign/install)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
#
3353
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    87
#     install-jar              Alias for "jar" above
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
#
3353
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    89
#     install-limited          Builds/installs limited policy files
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    90
#                                  If OpenJDK, does not sign
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    91
#                                  If JDK, tries to sign
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    92
#     install-unlimited        Builds/nstalls unlimited policy files
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    93
#                                  If OpenJDK, does not sign
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    94
#                                  If JDK, tries to sign
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
# Other targets (JDK only):
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
#
3353
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    98
#     sign                     Alias for sign-jar and sign-policy
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    99
#          sign-jar            Builds/signs jce.jar file (no install)
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
   100
#          sign-policy         Builds/signs policy files (no install)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
#
3353
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
   102
#     release                  Builds all targets in preparation
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
   103
#                              for workspace integration.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
#
3353
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
   105
#     install-prebuilt         Installs the pre-built jar files
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
# This makefile was written to support parallel target execution.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
BUILDDIR = ../..
4665
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 3353
diff changeset
   111
MODULE  = base
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
PACKAGE = javax.crypto
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
PRODUCT = sun
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   115
#
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   116
# The following is for when we need to do postprocessing
3353
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
   117
# (signing) against a read-only build.  If the OUTPUTDIR
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   118
# 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
   119
#
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   120
ifndef OPENJDK
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   121
  ifdef ALT_JCE_BUILD_DIR
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   122
    # =====================================================
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   123
    # 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
   124
    # 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
   125
    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
   126
    IGNORE_WRITABLE_OUTPUTDIR_TEST=true
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   127
  else
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   128
    JCE_BUILD_DIR=${TEMPDIR}
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   129
  endif
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   130
endif
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   131
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
include $(BUILDDIR)/common/Defs.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
# Location for the newly built classfiles.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
CLASSDESTDIR = $(TEMPDIR)/classes
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
# Subdirectories of these are automatically included.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
AUTO_FILES_JAVA_DIRS = \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
    javax/crypto \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
    sun/security/internal/interfaces \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
    sun/security/internal/spec
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
include $(BUILDDIR)/common/Classes.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
# Rules
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
# Some licensees do not get the security sources, but we still need to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
# be able to build "all" for them.  Check here to see if the sources were
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
# available.  If not, then we don't need to continue this rule.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
ifdef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
all: build-jar install-jar build-policy install-limited
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
else  # OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
ifeq ($(strip $(FILES_java)),)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
all:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
	$(no-source-warning)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
else  # FILES_java/policy files available
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
all: build-jar build-policy
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
	$(build-warning)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
endif # $(FILES_java)/policy files available
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
endif # OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
# We use a variety of subdirectories in the $(TEMPDIR) depending on what
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
# part of the build we're doing.  Both OPENJDK/JDK builds are initially
3353
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
   174
# done in the unsigned area.  When files are signed in JDK, they will be
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
   175
# placed in the appropriate areas.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
UNSIGNED_DIR = $(TEMPDIR)/unsigned
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   179
include Defs-jce.gmk
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   180
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
# =====================================================
3353
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
   183
# Build the unsigned jce.jar file.  Signing comes later.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
JAR_DESTFILE = $(LIBDIR)/jce.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
# JCE building is somewhat involved.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
# OpenJDK:  Since we do not ship prebuilt JCE files, previous compiles
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
# in the build may have needed JCE class signatures.  There were then
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
# implicitly built by javac (likely using the boot javac).  While using
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
# those class files was fine for signatures, we need to rebuild using
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
# the right compiler.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
# JDK:  Even through the jce.jar was previously installed, since the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
# source files are accessible in the source directories, they will
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
# always be "newer" than the prebuilt files inside the jar, and thus
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
# make will always rebuild them.  (We could "hide" the JCE source in a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
# separate directory, but that would make the build logic for JDK and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
# OpenJDK more complicated.)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
# Thus in either situation, we shouldn't use these files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
# To make sure the classes were built with the right compiler options,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
# delete the existing files in $(CLASSBINDIR), rebuild the right way in a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
# directory under $(TEMPDIR), then copy the files back to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
# $(CLASSBINDIR).   Building in $(TEMPDIR) allows us to use our make
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
# infrastructure without modification:  .classes.list, macros, etc.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
# The list of directories that will be remade from scratch, using the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
# right compilers/options.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
DELETE_DIRS = $(patsubst %, $(CLASSBINDIR)/%, $(AUTO_FILES_JAVA_DIRS))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
# Since the -C option to jar is used below, each directory entry must be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
# preceded with the appropriate directory to "cd" into.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
JAR_DIRS = $(patsubst %, -C $(CLASSDESTDIR) %, $(AUTO_FILES_JAVA_DIRS))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
build-jar: $(UNSIGNED_DIR)/jce.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
# Build jce.jar, then replace the previously built JCE files in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
# classes directory with these.  This ensures we have consistently built
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
# files throughout the workspaces.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
$(UNSIGNED_DIR)/jce.jar: prebuild build $(JCE_MANIFEST_FILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
	$(prep-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
	$(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
   235
	    $(BOOT_JAR_JFLAGS)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
	$(CP) -r $(CLASSDESTDIR)/* $(CLASSBINDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
	@$(java-vm-cleanup)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
build: prebuild
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
prebuild:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
	$(RM) -r $(DELETE_DIRS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
# =====================================================
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
# Build the unsigned policy files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
# Given the current state of world export/import policies,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
# these settings work for Sun's situation.  This note is not
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
# legal guidance, you must still resolve any export/import issues
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
# applicable for your situation.  Contact your export/import
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
# counsel for more information.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
POLICY_DESTDIR			= $(LIBDIR)/security
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
UNSIGNED_POLICY_BUILDDIR	= $(UNSIGNED_DIR)/policy
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
build-policy: unlimited limited
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
# Build the unsigned unlimited policy files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
unlimited: \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
	    $(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar	\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
	    $(UNSIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
$(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar:		\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
	    policy/unlimited/default_US_export.policy			\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
	    policy/unlimited/UNLIMITED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
	$(prep-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
	$(BOOT_JAR_CMD) cmf policy/unlimited/UNLIMITED $@		\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
	    -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
   273
	    $(BOOT_JAR_JFLAGS)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
	@$(java-vm-cleanup)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
$(UNSIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar:			\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
	    policy/unlimited/default_local.policy			\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
	    policy/unlimited/UNLIMITED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
	$(prep-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
	$(BOOT_JAR_CMD) cmf policy/unlimited/UNLIMITED $@		\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
	    -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
   282
	    $(BOOT_JAR_JFLAGS)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
	@$(java-vm-cleanup)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
# Build the unsigned limited policy files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
# NOTE:  We currently do not place restrictions on our limited export
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
# policy.  This was not a typo.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
limited: \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
	    $(UNSIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar	\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
	    $(UNSIGNED_POLICY_BUILDDIR)/limited/local_policy.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
$(UNSIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar:		\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
	    $(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar
4665
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 3353
diff changeset
   297
	$(install-non-module-file)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
$(UNSIGNED_POLICY_BUILDDIR)/limited/local_policy.jar:			\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
	    policy/limited/default_local.policy				\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
	    policy/limited/exempt_local.policy				\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
	    policy/limited/LIMITED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
	$(prep-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
	$(BOOT_JAR_CMD) cmf policy/limited/LIMITED $@			\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
	    -C policy/limited default_local.policy			\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
	    -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
   307
	    $(BOOT_JAR_JFLAGS)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
	@$(java-vm-cleanup)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
UNSIGNED_POLICY_FILES = \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
    $(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar		\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
    $(UNSIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar		\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
    $(UNSIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar		\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   314
    $(UNSIGNED_POLICY_BUILDDIR)/limited/local_policy.jar		\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
ifndef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
# =====================================================
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
# Sign the various jar files.  Not needed for OpenJDK.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   322
SIGNED_DIR		= $(JCE_BUILD_DIR)/signed
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
SIGNED_POLICY_BUILDDIR	= $(SIGNED_DIR)/policy
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
SIGNED_POLICY_FILES = \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
    $(patsubst $(UNSIGNED_POLICY_BUILDDIR)/%,$(SIGNED_POLICY_BUILDDIR)/%, \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
	$(UNSIGNED_POLICY_FILES))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
sign: sign-jar sign-policy
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
sign-jar: $(SIGNED_DIR)/jce.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
sign-policy: $(SIGNED_POLICY_FILES)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   335
ifndef ALT_JCE_BUILD_DIR
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
$(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
   337
else
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   338
#
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   339
# 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
   340
# 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
   341
#
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   342
$(SIGNED_DIR)/jce.jar:
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   343
	@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
   344
	    $(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
   345
	    exit 1; \
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   346
	fi
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   347
endif
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   348
	$(call sign-file, $(UNSIGNED_DIR)/jce.jar)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   349
90ce3da70b43 Initial load
duke
parents:
diff changeset
   350
$(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
   351
	    $(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
   352
	$(call sign-file, $<)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   353
90ce3da70b43 Initial load
duke
parents:
diff changeset
   354
$(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
   355
	    $(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
   356
	$(call sign-file, $<)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   357
90ce3da70b43 Initial load
duke
parents:
diff changeset
   358
$(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
   359
	    $(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
   360
	$(call sign-file, $<)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   361
90ce3da70b43 Initial load
duke
parents:
diff changeset
   362
$(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
   363
	    $(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
   364
	$(call sign-file, $<)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   365
90ce3da70b43 Initial load
duke
parents:
diff changeset
   366
90ce3da70b43 Initial load
duke
parents:
diff changeset
   367
# =====================================================
3353
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
   368
# Create the Release Engineering files.  Signed builds,
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
   369
# unlimited policy file distribution, etc.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   370
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   371
90ce3da70b43 Initial load
duke
parents:
diff changeset
   372
CLOSED_DIR = $(BUILDDIR)/closed/javax/crypto
90ce3da70b43 Initial load
duke
parents:
diff changeset
   373
3353
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
   374
release: $(SIGNED_DIR)/jce.jar sign-policy $(CLOSED_DIR)/doc/COPYRIGHT.html \
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   375
         $(CLOSED_DIR)/doc/README.txt
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   376
	$(RM) -r \
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   377
	    $(JCE_BUILD_DIR)/release/UnlimitedJCEPolicy              \
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   378
	    $(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
   379
	    $(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
   380
	    $(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
   381
	    $(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
   382
	$(MKDIR) -p $(JCE_BUILD_DIR)/release/UnlimitedJCEPolicy
3353
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
   383
	$(CP) $(SIGNED_DIR)/jce.jar $(JCE_BUILD_DIR)/release
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   384
	$(CP) \
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   385
	    $(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
   386
	    $(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
   387
	    $(JCE_BUILD_DIR)/release
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   388
	$(CP) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   389
	    $(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
   390
	    $(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
   391
	    $(CLOSED_DIR)/doc/COPYRIGHT.html                         \
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   392
	    $(CLOSED_DIR)/doc/README.txt                             \
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   393
	    $(JCE_BUILD_DIR)/release/UnlimitedJCEPolicy
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   394
	cd $(JCE_BUILD_DIR)/release ; \
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   395
	$(ZIPEXE) -qr UnlimitedJCEPolicy.zip UnlimitedJCEPolicy
90ce3da70b43 Initial load
duke
parents:
diff changeset
   396
	$(release-warning)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
endif # OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
90ce3da70b43 Initial load
duke
parents:
diff changeset
   400
90ce3da70b43 Initial load
duke
parents:
diff changeset
   401
# =====================================================
90ce3da70b43 Initial load
duke
parents:
diff changeset
   402
# Install routines.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   403
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
# Install jce.jar, depending on which type is requested.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
install-jar jar: $(JAR_DESTFILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   409
ifndef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
	$(release-warning)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   411
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   412
90ce3da70b43 Initial load
duke
parents:
diff changeset
   413
ifdef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   414
$(JAR_DESTFILE): $(UNSIGNED_DIR)/jce.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   415
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   416
$(JAR_DESTFILE): $(SIGNED_DIR)/jce.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
endif
4665
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 3353
diff changeset
   418
	$(install-non-module-file)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   419
90ce3da70b43 Initial load
duke
parents:
diff changeset
   420
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   421
# Install the appropriate policy file, depending on the type of build.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   422
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   423
ifdef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   424
INSTALL_POLICYDIR = $(UNSIGNED_POLICY_BUILDDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   425
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   426
INSTALL_POLICYDIR = $(SIGNED_POLICY_BUILDDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   427
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   428
4665
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 3353
diff changeset
   429
install-limited-jars: \
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   430
	    $(INSTALL_POLICYDIR)/limited/US_export_policy.jar	\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   431
	    $(INSTALL_POLICYDIR)/limited/local_policy.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   432
	$(MKDIR) -p $(POLICY_DESTDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   433
	$(RM) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   434
	    $(POLICY_DESTDIR)/US_export_policy.jar		\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   435
	    $(POLICY_DESTDIR)/local_policy.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   436
	$(CP) $^ $(POLICY_DESTDIR)
4665
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 3353
diff changeset
   437
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 3353
diff changeset
   438
install-limited: install-limited-jars install-module-files
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   439
ifndef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   440
	$(release-warning)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   441
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   442
4665
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 3353
diff changeset
   443
install-unlimited-jars: \
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   444
	    $(INSTALL_POLICYDIR)/unlimited/US_export_policy.jar	\
4665
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 3353
diff changeset
   445
	    $(INSTALL_POLICYDIR)/unlimited/local_policy.jar 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   446
	$(MKDIR) -p $(POLICY_DESTDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   447
	$(RM) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   448
	    $(POLICY_DESTDIR)/US_export_policy.jar		\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   449
	    $(POLICY_DESTDIR)/local_policy.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   450
	$(CP) $^ $(POLICY_DESTDIR)
4665
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 3353
diff changeset
   451
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 3353
diff changeset
   452
install-unlimited: install-unlimited-jars install-module-files
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   453
ifndef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   454
	$(release-warning)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   455
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   456
90ce3da70b43 Initial load
duke
parents:
diff changeset
   457
ifndef OPENJDK
4665
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 3353
diff changeset
   458
install-prebuilt-jars:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   459
	@$(ECHO) "\n>>>Installing prebuilt JCE framework..."
90ce3da70b43 Initial load
duke
parents:
diff changeset
   460
	$(RM) $(JAR_DESTFILE) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   461
	    $(POLICY_DESTDIR)/US_export_policy.jar \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   462
	    $(POLICY_DESTDIR)/local_policy.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   463
	$(CP) $(PREBUILT_DIR)/jce/jce.jar $(JAR_DESTFILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   464
	$(CP) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   465
	    $(PREBUILT_DIR)/jce/US_export_policy.jar \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   466
	    $(PREBUILT_DIR)/jce/local_policy.jar \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   467
	    $(POLICY_DESTDIR)
4665
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 3353
diff changeset
   468
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 3353
diff changeset
   469
install-prebuilt: install-prebuilt-jars install-module-files
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   470
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   471
4665
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 3353
diff changeset
   472
install-module-files: \
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 3353
diff changeset
   473
	   $(POLICY_DESTDIR)/US_export_policy.jar \
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 3353
diff changeset
   474
	   $(POLICY_DESTDIR)/local_policy.jar
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 3353
diff changeset
   475
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 3353
diff changeset
   476
$(POLICY_DESTDIR)/%.jar :
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 3353
diff changeset
   477
	$(install-module-file)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   478
90ce3da70b43 Initial load
duke
parents:
diff changeset
   479
# =====================================================
90ce3da70b43 Initial load
duke
parents:
diff changeset
   480
# Support routines.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   481
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   482
90ce3da70b43 Initial load
duke
parents:
diff changeset
   483
clobber clean::
90ce3da70b43 Initial load
duke
parents:
diff changeset
   484
	$(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
   485
	    $(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
   486
	    $(JCE_BUILD_DIR)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   487
90ce3da70b43 Initial load
duke
parents:
diff changeset
   488
.PHONY: build-jar jar build-policy unlimited limited install-jar \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   489
	install-limited install-unlimited
90ce3da70b43 Initial load
duke
parents:
diff changeset
   490
ifndef OPENJDK
3353
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
   491
.PHONY: sign sign-jar sign-policy release install-prebuilt
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   492
endif