jdk/make/CreateSecurityJars.gmk
author dl
Fri, 05 Sep 2014 10:54:28 +0200
changeset 26448 5853628b0e63
parent 26191 a0ff4b39d34b
child 26861 47dde7f5cf36
permissions -rw-r--r--
8056248: Improve ForkJoin thread throttling Reviewed-by: psandoz, martin
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     1
#
21128
2a7460bba7a5 8009280: JCE jurisdiction policy files not copied into jdk/lib/security
erikj
parents: 20884
diff changeset
     2
# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     4
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    10
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    15
# accompanied this code).
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    16
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    20
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    23
# questions.
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    24
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    25
21128
2a7460bba7a5 8009280: JCE jurisdiction policy files not copied into jdk/lib/security
erikj
parents: 20884
diff changeset
    26
default: all
2a7460bba7a5 8009280: JCE jurisdiction policy files not copied into jdk/lib/security
erikj
parents: 20884
diff changeset
    27
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    28
include $(SPEC)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    29
include MakeBase.gmk
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    30
include JavaCompilation.gmk
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    31
21128
2a7460bba7a5 8009280: JCE jurisdiction policy files not copied into jdk/lib/security
erikj
parents: 20884
diff changeset
    32
# The jars created in this file are required for the exploded jdk image to function and
2a7460bba7a5 8009280: JCE jurisdiction policy files not copied into jdk/lib/security
erikj
parents: 20884
diff changeset
    33
# cannot wait to be built in the images target.
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    34
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    35
##########################################################################################
14527
b2b7e2931859 8003482: build-infra: Use correct manifest in security jars
erikj
parents: 14425
diff changeset
    36
# Create manifest for security jars
b2b7e2931859 8003482: build-infra: Use correct manifest in security jars
erikj
parents: 14425
diff changeset
    37
#
b2b7e2931859 8003482: build-infra: Use correct manifest in security jars
erikj
parents: 14425
diff changeset
    38
# Include these extra attributes for now, should probably take out.
b2b7e2931859 8003482: build-infra: Use correct manifest in security jars
erikj
parents: 14425
diff changeset
    39
#
21805
c7d7946239de 8027566: Remove the old build system
ihse
parents: 21416
diff changeset
    40
MAINMANIFEST := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf
21128
2a7460bba7a5 8009280: JCE jurisdiction policy files not copied into jdk/lib/security
erikj
parents: 20884
diff changeset
    41
JCE_MANIFEST := $(JDK_OUTPUTDIR)/lib/_the.security.manifest.mf
2a7460bba7a5 8009280: JCE jurisdiction policy files not copied into jdk/lib/security
erikj
parents: 20884
diff changeset
    42
14527
b2b7e2931859 8003482: build-infra: Use correct manifest in security jars
erikj
parents: 14425
diff changeset
    43
$(JCE_MANIFEST): $(MAINMANIFEST)
b2b7e2931859 8003482: build-infra: Use correct manifest in security jars
erikj
parents: 14425
diff changeset
    44
	$(MKDIR) -p $(@D)
b2b7e2931859 8003482: build-infra: Use correct manifest in security jars
erikj
parents: 14425
diff changeset
    45
	$(RM) $@ $@.tmp
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
    46
	$(SED) -e "s#@@RELEASE@@#$(JDK_VERSION)#" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
    47
	    -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
    48
	    $(MAINMANIFEST) >> $@.tmp
14527
b2b7e2931859 8003482: build-infra: Use correct manifest in security jars
erikj
parents: 14425
diff changeset
    49
	$(ECHO) "Extension-Name: javax.crypto" >> $@.tmp
b2b7e2931859 8003482: build-infra: Use correct manifest in security jars
erikj
parents: 14425
diff changeset
    50
	$(ECHO) "Implementation-Vendor-Id: com.sun" >> $@.tmp
b2b7e2931859 8003482: build-infra: Use correct manifest in security jars
erikj
parents: 14425
diff changeset
    51
	$(MV) $@.tmp $@
b2b7e2931859 8003482: build-infra: Use correct manifest in security jars
erikj
parents: 14425
diff changeset
    52
b2b7e2931859 8003482: build-infra: Use correct manifest in security jars
erikj
parents: 14425
diff changeset
    53
##########################################################################################
18573
52f07c119829 8019155: Update makefiles with correct jfr packages
sla
parents: 18031
diff changeset
    54
# For security and crypto jars, always build the jar, but for closed, install the prebuilt
52f07c119829 8019155: Update makefiles with correct jfr packages
sla
parents: 18031
diff changeset
    55
# signed version instead of the newly built jar. Unsigned jars are treated as intermediate
21980
393509a81cc3 8027963: Create unlimited policy jars.
erikj
parents: 21805
diff changeset
    56
# targets and explicitly added to the TARGETS list. For open, signing is not needed. See
17957
1a51992c6097 8010785: JDK 8 build on Linux fails with new build mechanism
erikj
parents: 17493
diff changeset
    57
# SignJars.gmk for more information.
1a51992c6097 8010785: JDK 8 build on Linux fails with new build mechanism
erikj
parents: 17493
diff changeset
    58
#
1a51992c6097 8010785: JDK 8 build on Linux fails with new build mechanism
erikj
parents: 17493
diff changeset
    59
# The source for the crypto jars is not available for all licensees. The BUILD_CRYPTO
1a51992c6097 8010785: JDK 8 build on Linux fails with new build mechanism
erikj
parents: 17493
diff changeset
    60
# variable is set to no if these jars can't be built to skip that step of the build.
18573
52f07c119829 8019155: Update makefiles with correct jfr packages
sla
parents: 18031
diff changeset
    61
# Note that for OPENJDK, the build will fail if BUILD_CRYPTO=no since then there is no
17957
1a51992c6097 8010785: JDK 8 build on Linux fails with new build mechanism
erikj
parents: 17493
diff changeset
    62
# other way to get the jars than to build them.
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    63
21128
2a7460bba7a5 8009280: JCE jurisdiction policy files not copied into jdk/lib/security
erikj
parents: 20884
diff changeset
    64
SUNPKCS11_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunpkcs11.jar
21980
393509a81cc3 8027963: Create unlimited policy jars.
erikj
parents: 21805
diff changeset
    65
SUNPKCS11_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunpkcs11.jar
15128
296bb1620e00 8005355: build-infra: Java security signing (need a top-level make target).
erikj
parents: 15126
diff changeset
    66
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
    67
$(eval $(call SetupArchive,BUILD_SUNPKCS11_JAR, , \
26191
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25859
diff changeset
    68
    SRCS := $(JDK_OUTPUTDIR)/modules/jdk.crypto.pkcs11, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
    69
    SUFFIXES := .class, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
    70
    INCLUDES := sun/security/pkcs11, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
    71
    JAR := $(SUNPKCS11_JAR_UNSIGNED), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
    72
    MANIFEST := $(JCE_MANIFEST), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
    73
    SKIP_METAINF := true))
15128
296bb1620e00 8005355: build-infra: Java security signing (need a top-level make target).
erikj
parents: 15126
diff changeset
    74
296bb1620e00 8005355: build-infra: Java security signing (need a top-level make target).
erikj
parents: 15126
diff changeset
    75
$(SUNPKCS11_JAR_UNSIGNED): $(JCE_MANIFEST)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    76
13702
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13583
diff changeset
    77
ifndef OPENJDK
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
    78
  SUNPKCS11_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/pkcs11/sunpkcs11.jar
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
    79
  $(SUNPKCS11_JAR_DST): $(SUNPKCS11_JAR_SRC)
21980
393509a81cc3 8027963: Create unlimited policy jars.
erikj
parents: 21805
diff changeset
    80
	@$(ECHO) $(LOG_INFO) Copying prebuilt $(@F)
14596
a1f29d55b5ee 8004281: build-infra: Move all jar creation to images target and put jars in images/lib
erikj
parents: 14527
diff changeset
    81
	$(install-file)
13702
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13583
diff changeset
    82
else
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
    83
  $(SUNPKCS11_JAR_DST): $(SUNPKCS11_JAR_UNSIGNED)
15128
296bb1620e00 8005355: build-infra: Java security signing (need a top-level make target).
erikj
parents: 15126
diff changeset
    84
	$(install-file)
13702
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13583
diff changeset
    85
endif
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    86
21980
393509a81cc3 8027963: Create unlimited policy jars.
erikj
parents: 21805
diff changeset
    87
TARGETS += $(SUNPKCS11_JAR_UNSIGNED) $(SUNPKCS11_JAR_DST)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    88
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    89
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    90
21128
2a7460bba7a5 8009280: JCE jurisdiction policy files not copied into jdk/lib/security
erikj
parents: 20884
diff changeset
    91
SUNEC_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunec.jar
21980
393509a81cc3 8027963: Create unlimited policy jars.
erikj
parents: 21805
diff changeset
    92
SUNEC_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunec.jar
15128
296bb1620e00 8005355: build-infra: Java security signing (need a top-level make target).
erikj
parents: 15126
diff changeset
    93
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
    94
$(eval $(call SetupArchive,BUILD_SUNEC_JAR, , \
26191
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25859
diff changeset
    95
    SRCS := $(JDK_OUTPUTDIR)/modules/jdk.crypto.ec, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
    96
    SUFFIXES := .class, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
    97
    INCLUDES := sun/security/ec, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
    98
    JAR := $(SUNEC_JAR_UNSIGNED), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
    99
    MANIFEST := $(JCE_MANIFEST), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   100
    SKIP_METAINF := true))
15128
296bb1620e00 8005355: build-infra: Java security signing (need a top-level make target).
erikj
parents: 15126
diff changeset
   101
296bb1620e00 8005355: build-infra: Java security signing (need a top-level make target).
erikj
parents: 15126
diff changeset
   102
$(SUNEC_JAR_UNSIGNED): $(JCE_MANIFEST)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   103
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   104
ifndef OPENJDK
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   105
  SUNEC_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ec/sunec.jar
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   106
  $(SUNEC_JAR_DST): $(SUNEC_JAR_SRC)
21980
393509a81cc3 8027963: Create unlimited policy jars.
erikj
parents: 21805
diff changeset
   107
	@$(ECHO) $(LOG_INFO) Copying prebuilt $(@F)
14596
a1f29d55b5ee 8004281: build-infra: Move all jar creation to images target and put jars in images/lib
erikj
parents: 14527
diff changeset
   108
	$(install-file)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   109
else
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   110
  $(SUNEC_JAR_DST): $(SUNEC_JAR_UNSIGNED)
15128
296bb1620e00 8005355: build-infra: Java security signing (need a top-level make target).
erikj
parents: 15126
diff changeset
   111
	$(install-file)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   112
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   113
21980
393509a81cc3 8027963: Create unlimited policy jars.
erikj
parents: 21805
diff changeset
   114
TARGETS += $(SUNEC_JAR_UNSIGNED) $(SUNEC_JAR_DST)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   115
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   116
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   117
21128
2a7460bba7a5 8009280: JCE jurisdiction policy files not copied into jdk/lib/security
erikj
parents: 20884
diff changeset
   118
SUNJCE_PROVIDER_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunjce_provider.jar
21980
393509a81cc3 8027963: Create unlimited policy jars.
erikj
parents: 21805
diff changeset
   119
SUNJCE_PROVIDER_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunjce_provider.jar
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   120
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   121
ifneq ($(BUILD_CRYPTO), no)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   122
  $(eval $(call SetupArchive,BUILD_SUNJCE_PROVIDER_JAR, , \
26191
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25859
diff changeset
   123
      SRCS := $(JDK_OUTPUTDIR)/modules/java.base, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   124
      SUFFIXES := .class, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   125
      INCLUDES := com/sun/crypto/provider, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   126
      JAR := $(SUNJCE_PROVIDER_JAR_UNSIGNED), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   127
      MANIFEST := $(JCE_MANIFEST), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   128
      SKIP_METAINF := true))
14527
b2b7e2931859 8003482: build-infra: Use correct manifest in security jars
erikj
parents: 14425
diff changeset
   129
17957
1a51992c6097 8010785: JDK 8 build on Linux fails with new build mechanism
erikj
parents: 17493
diff changeset
   130
  $(SUNJCE_PROVIDER_JAR_UNSIGNED): $(JCE_MANIFEST)
1a51992c6097 8010785: JDK 8 build on Linux fails with new build mechanism
erikj
parents: 17493
diff changeset
   131
21980
393509a81cc3 8027963: Create unlimited policy jars.
erikj
parents: 21805
diff changeset
   132
  TARGETS += $(SUNJCE_PROVIDER_JAR_UNSIGNED)
17957
1a51992c6097 8010785: JDK 8 build on Linux fails with new build mechanism
erikj
parents: 17493
diff changeset
   133
endif
14527
b2b7e2931859 8003482: build-infra: Use correct manifest in security jars
erikj
parents: 14425
diff changeset
   134
15128
296bb1620e00 8005355: build-infra: Java security signing (need a top-level make target).
erikj
parents: 15126
diff changeset
   135
ifndef OPENJDK
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   136
  SUNJCE_PROVIDER_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/sunjce_provider.jar
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   137
  $(SUNJCE_PROVIDER_JAR_DST): $(SUNJCE_PROVIDER_JAR_SRC)
21980
393509a81cc3 8027963: Create unlimited policy jars.
erikj
parents: 21805
diff changeset
   138
	@$(ECHO) $(LOG_INFO) Copying prebuilt $(@F)
15128
296bb1620e00 8005355: build-infra: Java security signing (need a top-level make target).
erikj
parents: 15126
diff changeset
   139
	$(install-file)
296bb1620e00 8005355: build-infra: Java security signing (need a top-level make target).
erikj
parents: 15126
diff changeset
   140
else
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   141
  $(SUNJCE_PROVIDER_JAR_DST): $(SUNJCE_PROVIDER_JAR_UNSIGNED)
15128
296bb1620e00 8005355: build-infra: Java security signing (need a top-level make target).
erikj
parents: 15126
diff changeset
   142
	$(install-file)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   143
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   144
21980
393509a81cc3 8027963: Create unlimited policy jars.
erikj
parents: 21805
diff changeset
   145
TARGETS += $(SUNJCE_PROVIDER_JAR_DST)
21128
2a7460bba7a5 8009280: JCE jurisdiction policy files not copied into jdk/lib/security
erikj
parents: 20884
diff changeset
   146
15128
296bb1620e00 8005355: build-infra: Java security signing (need a top-level make target).
erikj
parents: 15126
diff changeset
   147
##########################################################################################
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   148
21128
2a7460bba7a5 8009280: JCE jurisdiction policy files not copied into jdk/lib/security
erikj
parents: 20884
diff changeset
   149
JCE_JAR_DST := $(JDK_OUTPUTDIR)/lib/jce.jar
21980
393509a81cc3 8027963: Create unlimited policy jars.
erikj
parents: 21805
diff changeset
   150
JCE_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/jce.jar
15128
296bb1620e00 8005355: build-infra: Java security signing (need a top-level make target).
erikj
parents: 15126
diff changeset
   151
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   152
ifneq ($(BUILD_CRYPTO), no)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   153
  $(eval $(call SetupArchive,BUILD_JCE_JAR, , \
26191
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25859
diff changeset
   154
      SRCS := $(JDK_OUTPUTDIR)/modules/java.base, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   155
      SUFFIXES := .class, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   156
      INCLUDES := javax/crypto sun/security/internal, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   157
      JAR := $(JCE_JAR_UNSIGNED), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   158
      MANIFEST := $(JCE_MANIFEST), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   159
      SKIP_METAINF := true))
15128
296bb1620e00 8005355: build-infra: Java security signing (need a top-level make target).
erikj
parents: 15126
diff changeset
   160
17957
1a51992c6097 8010785: JDK 8 build on Linux fails with new build mechanism
erikj
parents: 17493
diff changeset
   161
  $(JCE_JAR_UNSIGNED): $(JCE_MANIFEST)
1a51992c6097 8010785: JDK 8 build on Linux fails with new build mechanism
erikj
parents: 17493
diff changeset
   162
21980
393509a81cc3 8027963: Create unlimited policy jars.
erikj
parents: 21805
diff changeset
   163
  TARGETS += $(JCE_JAR_UNSIGNED)
17957
1a51992c6097 8010785: JDK 8 build on Linux fails with new build mechanism
erikj
parents: 17493
diff changeset
   164
endif
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   165
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   166
ifndef OPENJDK
17957
1a51992c6097 8010785: JDK 8 build on Linux fails with new build mechanism
erikj
parents: 17493
diff changeset
   167
  JCE_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/jce.jar
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   168
  $(JCE_JAR_DST): $(JCE_JAR_SRC)
21980
393509a81cc3 8027963: Create unlimited policy jars.
erikj
parents: 21805
diff changeset
   169
	@$(ECHO) $(LOG_INFO) Copying prebuilt $(@F)
14596
a1f29d55b5ee 8004281: build-infra: Move all jar creation to images target and put jars in images/lib
erikj
parents: 14527
diff changeset
   170
	$(install-file)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   171
else
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   172
  $(JCE_JAR_DST): $(JCE_JAR_UNSIGNED)
15128
296bb1620e00 8005355: build-infra: Java security signing (need a top-level make target).
erikj
parents: 15126
diff changeset
   173
	$(install-file)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   174
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   175
21980
393509a81cc3 8027963: Create unlimited policy jars.
erikj
parents: 21805
diff changeset
   176
TARGETS += $(JCE_JAR_DST)
21128
2a7460bba7a5 8009280: JCE jurisdiction policy files not copied into jdk/lib/security
erikj
parents: 20884
diff changeset
   177
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   178
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   179
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   180
ifeq ($(OPENJDK_TARGET_OS), windows)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   181
21128
2a7460bba7a5 8009280: JCE jurisdiction policy files not copied into jdk/lib/security
erikj
parents: 20884
diff changeset
   182
  SUNMSCAPI_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunmscapi.jar
21980
393509a81cc3 8027963: Create unlimited policy jars.
erikj
parents: 21805
diff changeset
   183
  SUNMSCAPI_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunmscapi.jar
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   184
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   185
  $(eval $(call SetupArchive,BUILD_SUNMSCAPI_JAR, , \
26191
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25859
diff changeset
   186
      SRCS := $(JDK_OUTPUTDIR)/modules/jdk.crypto.mscapi, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   187
      SUFFIXES := .class, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   188
      INCLUDES := sun/security/mscapi, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   189
      JAR := $(SUNMSCAPI_JAR_UNSIGNED), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   190
      MANIFEST := $(JCE_MANIFEST), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   191
      SKIP_METAINF := true))
15128
296bb1620e00 8005355: build-infra: Java security signing (need a top-level make target).
erikj
parents: 15126
diff changeset
   192
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   193
  $(SUNMSCAPI_JAR_UNSIGNED): $(JCE_MANIFEST)
15137
1ad653469ebc 8006296: build-infra: Unsigned sunmscapi.jar is missing manifest.
erikj
parents: 15133
diff changeset
   194
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   195
  ifndef OPENJDK
15128
296bb1620e00 8005355: build-infra: Java security signing (need a top-level make target).
erikj
parents: 15126
diff changeset
   196
    SUNMSCAPI_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/mscapi/sunmscapi.jar
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   197
    $(SUNMSCAPI_JAR_DST): $(SUNMSCAPI_JAR_SRC)
21980
393509a81cc3 8027963: Create unlimited policy jars.
erikj
parents: 21805
diff changeset
   198
	@$(ECHO) $(LOG_INFO) Copying prebuilt $(@F)
15128
296bb1620e00 8005355: build-infra: Java security signing (need a top-level make target).
erikj
parents: 15126
diff changeset
   199
	$(install-file)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   200
  else
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   201
    $(SUNMSCAPI_JAR_DST): $(SUNMSCAPI_JAR_UNSIGNED)
15128
296bb1620e00 8005355: build-infra: Java security signing (need a top-level make target).
erikj
parents: 15126
diff changeset
   202
	$(install-file)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   203
  endif
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   204
21980
393509a81cc3 8027963: Create unlimited policy jars.
erikj
parents: 21805
diff changeset
   205
  TARGETS += $(SUNMSCAPI_JAR_UNSIGNED) $(SUNMSCAPI_JAR_DST)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   206
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   207
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   208
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   209
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   210
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   211
ifeq ($(OPENJDK_TARGET_OS), solaris)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   212
  ifndef OPENJDK
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   213
21128
2a7460bba7a5 8009280: JCE jurisdiction policy files not copied into jdk/lib/security
erikj
parents: 20884
diff changeset
   214
    UCRYPTO_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/ucrypto.jar
21980
393509a81cc3 8027963: Create unlimited policy jars.
erikj
parents: 21805
diff changeset
   215
    UCRYPTO_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/ucrypto.jar
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   216
    UCRYPTO_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ucrypto/ucrypto.jar
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   217
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   218
    $(eval $(call SetupArchive,BUILD_UCRYPTO_JAR, , \
26191
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25859
diff changeset
   219
        SRCS := $(JDK_OUTPUTDIR)/modules/jdk.crypto.ucrypto, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   220
        SUFFIXES := .class, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   221
        INCLUDES := com/oracle/security/ucrypto, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   222
        JAR := $(UCRYPTO_JAR_UNSIGNED), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   223
        MANIFEST := $(JCE_MANIFEST), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   224
        SKIP_METAINF := true))
15128
296bb1620e00 8005355: build-infra: Java security signing (need a top-level make target).
erikj
parents: 15126
diff changeset
   225
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   226
    $(UCRYPTO_JAR_UNSIGNED): $(JCE_MANIFEST)
15128
296bb1620e00 8005355: build-infra: Java security signing (need a top-level make target).
erikj
parents: 15126
diff changeset
   227
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   228
    $(UCRYPTO_JAR_DST): $(UCRYPTO_JAR_SRC)
21980
393509a81cc3 8027963: Create unlimited policy jars.
erikj
parents: 21805
diff changeset
   229
	@$(ECHO) $(LOG_INFO) Copying prebuilt $(@F)
14596
a1f29d55b5ee 8004281: build-infra: Move all jar creation to images target and put jars in images/lib
erikj
parents: 14527
diff changeset
   230
	$(install-file)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   231
21980
393509a81cc3 8027963: Create unlimited policy jars.
erikj
parents: 21805
diff changeset
   232
    TARGETS += $(UCRYPTO_JAR_UNSIGNED) $(UCRYPTO_JAR_DST)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   233
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20324
diff changeset
   234
  endif
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   235
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   236
21980
393509a81cc3 8027963: Create unlimited policy jars.
erikj
parents: 21805
diff changeset
   237
all: $(TARGETS)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   238
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   239
.PHONY: default all