annotate make/javax/crypto/Defs-jce.gmk @ 3688:c28f5ac2d5f8

7025412: make381 issues with quotes in jdk/make/docs/Makefile and other places Reviewed-by: mchung, herrick
author ohair
date Thu, 10 Mar 2011 14:48:32 -0800
parents 00cd9dc3c2b5
children 272483f6650b 29e88b0c0894
rev   line source
duke@0 1 #
ohair@2362 2 # Copyright (c) 2007, 2009, Oracle and/or its affiliates. All rights reserved.
duke@0 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@0 4 #
duke@0 5 # This code is free software; you can redistribute it and/or modify it
duke@0 6 # under the terms of the GNU General Public License version 2 only, as
ohair@2362 7 # published by the Free Software Foundation. Oracle designates this
duke@0 8 # particular file as subject to the "Classpath" exception as provided
ohair@2362 9 # by Oracle in the LICENSE file that accompanied this code.
duke@0 10 #
duke@0 11 # This code is distributed in the hope that it will be useful, but WITHOUT
duke@0 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@0 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@0 14 # version 2 for more details (a copy is included in the LICENSE file that
duke@0 15 # accompanied this code).
duke@0 16 #
duke@0 17 # You should have received a copy of the GNU General Public License version
duke@0 18 # 2 along with this work; if not, write to the Free Software Foundation,
duke@0 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@0 20 #
ohair@2362 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ohair@2362 22 # or visit www.oracle.com if you need additional information or have any
ohair@2362 23 # questions.
duke@0 24 #
duke@0 25
duke@0 26 include $(BUILDDIR)/common/Release.gmk
duke@0 27
duke@0 28 #
duke@0 29 # Include these extra attributes for now, should probably take out.
duke@0 30 #
duke@0 31 JCE_MANIFEST_FILE = $(TEMPDIR)/manifest.mf
duke@0 32 $(JCE_MANIFEST_FILE): $(MAINMANIFEST)
duke@0 33 $(prep-target)
wetmore@160 34 ( $(SED) "s/@@RELEASE@@/$(RELEASE)/" $<; \
duke@0 35 $(ECHO) "Extension-Name: javax.crypto"; \
duke@0 36 $(ECHO) "Implementation-Vendor-Id: com.sun"; ) > $@
duke@0 37
duke@0 38 README-MAKEFILE_WARNING = \
duke@0 39 "\nPlease read make/javax/crypto/Makefile for further build instructions."
duke@0 40
duke@0 41 define no-source-warning
duke@0 42 @$(ECHO) "\n***JCE sources are not available, skipping build.***" \
duke@0 43 $(README-MAKEFILE_WARNING)
duke@0 44 endef
duke@0 45
duke@0 46 ifndef OPENJDK
duke@0 47
duke@0 48 PREBUILT_DIR = $(BUILDDIR)/closed/tools/crypto
duke@0 49
duke@0 50 define build-warning
duke@0 51 @$(ECHO) "\n***JCE in JDK builds require special tools/procedures.***" \
duke@0 52 $(README-MAKEFILE_WARNING)
duke@0 53 endef
duke@0 54
duke@0 55 #
duke@0 56 # Location for JCE codesigning key.
duke@0 57 #
duke@0 58 SIGNING_KEY_DIR = /security/ws/JCE-signing/src
duke@0 59 SIGNING_KEYSTORE = $(SIGNING_KEY_DIR)/KeyStore.jks
duke@0 60 SIGNING_PASSPHRASE = $(SIGNING_KEY_DIR)/passphrase.txt
duke@0 61 SIGNING_ALIAS = jce_rsa
duke@0 62
duke@0 63 #
wetmore@1460 64 # Defines for signing the various jar files.
duke@0 65 #
duke@0 66
duke@0 67 define presign
duke@0 68 @if [ ! -f $(SIGNING_KEYSTORE) -o ! -f $(SIGNING_PASSPHRASE) ]; then \
duke@0 69 $(ECHO) "\n$(SIGNING_KEYSTORE): Signing mechanism *NOT* available..." \
duke@0 70 $(README-MAKEFILE_WARNING); \
duke@0 71 exit 2; \
duke@0 72 fi
duke@0 73 endef
duke@0 74
duke@0 75 define sign-target
duke@0 76 $(BOOT_JARSIGNER_CMD) -keystore $(SIGNING_KEYSTORE) \
duke@0 77 $@ $(SIGNING_ALIAS) < $(SIGNING_PASSPHRASE)
wetmore@160 78 @$(java-vm-cleanup)
duke@0 79 @$(ECHO) "\nJar codesigning finished."
duke@0 80 endef
duke@0 81
duke@0 82 RELEASE_DIR = $(OUTPUTDIR)/jce-release
duke@0 83
duke@0 84 define release-warning
duke@0 85 @$(ECHO) \
ohair@3688 86 "\n***The jar files built by the 'release' target must***" \
duke@0 87 "\n***still be checked into the closed workspace! ***" \
duke@0 88 $(README-MAKEFILE_WARNING)
duke@0 89 endef
duke@0 90
duke@0 91 #
wetmore@160 92 # Convenience macros for signing a jar file.
wetmore@160 93 #
wetmore@160 94 # Call through $(call sign-file, target file)
duke@0 95 #
duke@0 96 define sign-file
duke@0 97 $(presign)
wetmore@160 98 $(prep-target)
wetmore@160 99 $(CP) $1 $@
duke@0 100 $(sign-target)
duke@0 101 endef
duke@0 102
duke@0 103 endif # !OPENJDK