jdk/make/com/sun/crypto/provider/Makefile
author ohair
Wed, 06 Apr 2011 22:06:11 -0700
changeset 9035 1255eb81cc2f
parent 8583 15dea0fdc2ea
child 10336 0bb1999251f8
permissions -rw-r--r--
7033660: Update copyright year to 2011 on any files changed in 2011 Reviewed-by: dholmes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
#
9035
1255eb81cc2f 7033660: Update copyright year to 2011 on any files changed in 2011
ohair
parents: 8583
diff changeset
     2
# Copyright (c) 2007, 2011, 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 sunjce_provider.jar.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
# This file was derived from make/javax/crypto/Makefile.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
# (The terms "OpenJDK" and "JDK" below refer to OpenJDK and Sun JDK builds
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
# respectively.)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
# JCE builds are very different between OpenJDK and JDK.  The OpenJDK JCE
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
# jar files do not require signing, but those for JDK do.  If an unsigned
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
# jar file is installed into JDK, things will break when the crypto
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
# routines are called.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
# This Makefile does the "real" build of the JCE files.  There are some
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
# javac options currently specific to JCE, so we recompile now to make
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
# sure any implicit compilations didn't use any incorrect flags.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
# For OpenJDK, the jar files built here are installed directly into the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
# OpenJDK.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
#
3353
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    48
# 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
    49
# 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
    50
# 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
    51
# 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
    52
# 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
    53
# separate from the JDK workspace to prevent its disclosure.
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    54
# 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
# 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
    56
# 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
    57
# 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
    58
# 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
    59
# reflected in the shipped binaries.  The "release" target should be
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
# used to generate the required files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
# There are a number of targets to help both JDK/OpenJDK developers.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
# Main Targets (JDK/OPENJDK):
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
#
3353
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    66
#     all/clobber/clean        The usual.
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    67
#                                  If OpenJDK, installs sunjce_provider.jar.
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    68
#                                  If JDK, installs prebuilt
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    69
#                                      sunjce_provider.jar.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
#
3353
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    71
#     jar                      Builds/installs sunjce_provider.jar
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    72
#                                  If OpenJDK, does not sign.
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    73
#                                  If JDK, tries to sign.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
# Other lesser-used Targets (JDK/OPENJDK):
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
#     build-jar                Builds sunjce_provider.jar
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    78
#                                  (does not sign/install)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
#
3353
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    80
#     install-jar              Alias for "jar" above.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
# Other targets (JDK only):
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
#
3353
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    84
#     sign                     Alias for sign-jar
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    85
#         sign-jar             Builds/signs sunjce_provider.jar (no 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
#     release                  Builds all targets in preparation
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    88
#                              for workspace integration.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
#
3353
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
    90
#     install-prebuilt         Installs the pre-built jar files
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
# This makefile was written to support parallel target execution.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
BUILDDIR = ../../../..
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
PACKAGE = com.sun.crypto.provider
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
PRODUCT = sun
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
    98
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
    99
#
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   100
# 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
   101
# (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
   102
# 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
   103
#
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   104
ifndef OPENJDK
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   105
  ifdef ALT_JCE_BUILD_DIR
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   106
    # =====================================================
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   107
    # 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
   108
    # 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
   109
    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
   110
    IGNORE_WRITABLE_OUTPUTDIR_TEST=true
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   111
  else
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   112
    JCE_BUILD_DIR=${TEMPDIR}
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   113
  endif
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   114
endif
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   115
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
include $(BUILDDIR)/common/Defs.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
# Location for the newly built classfiles.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
CLASSDESTDIR = $(TEMPDIR)/classes
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
# Subdirectories of these are automatically included.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
AUTO_FILES_JAVA_DIRS = \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
    com/sun/crypto/provider
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
include $(BUILDDIR)/common/Classes.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
# Rules
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
# Some licensees do not get the security sources, but we still need to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
# be able to build "all" for them.  Check here to see if the sources were
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
# available.  If not, then we don't need to continue this rule.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
ifdef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
all: build-jar install-jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
else  # OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
ifeq ($(strip $(FILES_java)),)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
all: install-prebuilt
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
	$(no-source-warning)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
else  # FILES_java available
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
all: build-jar install-prebuilt
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
	$(build-warning)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
endif # $(FILES_java) available
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
endif # OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
# We use a variety of subdirectories in the $(TEMPDIR) depending on what
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
# 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
   156
# 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
   157
# placed in the appropriate areas.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
UNSIGNED_DIR = $(TEMPDIR)/unsigned
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   161
include $(BUILDDIR)/javax/crypto/Defs-jce.gmk
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   162
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
# =====================================================
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
# Build the unsigned sunjce_provider.jar file.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
JAR_DESTFILE = $(EXTDIR)/sunjce_provider.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
# The sunjce_provider.jar needs to be in the extension class directory,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
# therefore none of its classes should appear in $(CLASSBINDIR).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
# Currently no one is using any of the SunJCE internals, so these files
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
# should not have been built.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
# Since the -C option to jar is used below, each directory entry must be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
# preceded with the appropriate directory to "cd" into.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
JAR_DIRS = $(patsubst %, -C $(CLASSDESTDIR) %, $(AUTO_FILES_JAVA_DIRS))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
build-jar: $(UNSIGNED_DIR)/sunjce_provider.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
# Build sunjce_provider.jar.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
$(UNSIGNED_DIR)/sunjce_provider.jar: build $(JCE_MANIFEST_FILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
	$(prep-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
	$(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
   191
	    $(BOOT_JAR_JFLAGS)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
	@$(java-vm-cleanup)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
ifndef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
# =====================================================
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
# Sign the provider jar file.  Not needed for OpenJDK.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   200
SIGNED_DIR = $(JCE_BUILD_DIR)/signed
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
sign: sign-jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
sign-jar: $(SIGNED_DIR)/sunjce_provider.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   206
ifndef ALT_JCE_BUILD_DIR
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
$(SIGNED_DIR)/sunjce_provider.jar: $(UNSIGNED_DIR)/sunjce_provider.jar
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   208
else
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   209
#
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   210
# 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
   211
# 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
   212
#
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   213
$(SIGNED_DIR)/sunjce_provider.jar:
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   214
	@if [ ! -r $(UNSIGNED_DIR)/sunjce_provider.jar ] ; then \
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   215
	    $(ECHO) "Couldn't find $(UNSIGNED_DIR)/sunjce_provider.jar"; \
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   216
	    exit 1; \
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   217
	fi
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   218
endif
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   219
	$(call sign-file, $(UNSIGNED_DIR)/sunjce_provider.jar)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
3353
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
   221
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
# =====================================================
3353
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
   223
# Create the Release Engineering files.  Signed builds, etc.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
3353
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
   226
release: $(SIGNED_DIR)/sunjce_provider.jar
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   227
	$(RM) $(JCE_BUILD_DIR)/release/sunjce_provider.jar
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   228
	$(MKDIR) -p $(JCE_BUILD_DIR)/release
3353
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
   229
	$(CP) $(SIGNED_DIR)/sunjce_provider.jar $(JCE_BUILD_DIR)/release
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
	$(release-warning)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
endif # OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
# =====================================================
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
# Install routines.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
# Install sunjce_provider.jar, depending on which type is requested.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
install-jar jar: $(JAR_DESTFILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
ifndef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
	$(release-warning)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
ifdef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
$(JAR_DESTFILE): $(UNSIGNED_DIR)/sunjce_provider.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
$(JAR_DESTFILE): $(SIGNED_DIR)/sunjce_provider.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
endif
8583
15dea0fdc2ea 7025631: Remove the modules build support from jdk 7
mchung
parents: 7668
diff changeset
   252
	$(install-file)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
ifndef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
install-prebuilt:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
	@$(ECHO) "\n>>>Installing prebuilt SunJCE provider..."
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
	$(RM) $(JAR_DESTFILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
	$(CP) $(PREBUILT_DIR)/jce/sunjce_provider.jar $(JAR_DESTFILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
# =====================================================
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
# Support routines.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
clobber clean::
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 2
diff changeset
   267
	$(RM) -r $(JAR_DESTFILE) $(TEMPDIR) $(JCE_BUILD_DIR)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
.PHONY: build-jar jar install-jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
ifndef OPENJDK
3353
ddbd63234844 6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents: 3332
diff changeset
   271
.PHONY: sign sign-jar release install-prebuilt
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
endif