jdk/make/CreatePolicyJars.gmk
author dermashov
Tue, 26 Aug 2014 15:04:49 +0400
changeset 26601 2713482c0fd3
parent 25859 3317bb8137f4
child 26861 47dde7f5cf36
permissions -rw-r--r--
8055360: Move the rest part of AWT ShapedAndTranslucent tests to OpenJDK Reviewed-by: alexsch
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     1
#
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     2
# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     4
#
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    10
#
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    15
# accompanied this code).
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    16
#
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    20
#
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    23
# questions.
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    24
#
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    25
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    26
default: all
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    27
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    28
include $(SPEC)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    29
include MakeBase.gmk
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    30
include JavaCompilation.gmk
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    31
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    32
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    33
################################################################################
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    34
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    35
US_EXPORT_POLICY_JAR_DST := $(JDK_OUTPUTDIR)/lib/security/US_export_policy.jar
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    36
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    37
ifneq ($(BUILD_CRYPTO), no)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    38
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    39
  US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED := \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    40
      $(JDK_OUTPUTDIR)/jce/unsigned/policy/limited/US_export_policy.jar
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    41
  US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED := \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    42
      $(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/US_export_policy.jar
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    43
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    44
  #
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    45
  # TODO fix so that SetupArchive does not write files into SRCS
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    46
  # then we don't need this extra copying
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    47
  #
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    48
  # NOTE: We currently do not place restrictions on our limited export
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    49
  # policy. This was not a typo. This means we are shipping the same file
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    50
  # for both limimted and unlimited US_export_policy.jar.
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    51
  #
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    52
  US_EXPORT_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/data/cryptopolicy/unlimited
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    53
  US_EXPORT_POLICY_JAR_TMP := \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    54
      $(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/US_export_policy_jar.tmp
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    55
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    56
  $(US_EXPORT_POLICY_JAR_TMP)/%: $(US_EXPORT_POLICY_JAR_SRC_DIR)/%
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    57
	$(install-file)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    58
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    59
  US_EXPORT_POLICY_JAR_DEPS := $(US_EXPORT_POLICY_JAR_TMP)/default_US_export.policy
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    60
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    61
  $(eval $(call SetupArchive,BUILD_US_EXPORT_POLICY_JAR, $(US_EXPORT_POLICY_JAR_DEPS), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    62
      SRCS := $(US_EXPORT_POLICY_JAR_TMP), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    63
      SUFFIXES := .policy, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    64
      JAR := $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    65
      EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    66
      SKIP_METAINF := true))
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    67
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    68
  $(US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED): $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    69
	$(ECHO) $(LOG_INFO) Copying unlimited $(patsubst $(OUTPUT_ROOT)/%,%,$@)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    70
	$(install-file)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    71
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    72
  TARGETS += $(US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED) \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    73
      $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    74
endif
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    75
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    76
ifndef OPENJDK
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    77
  ifeq ($(UNLIMITED_CRYPTO), true)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    78
    $(error No prebuilt unlimited crypto jars available)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    79
  endif
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    80
  $(US_EXPORT_POLICY_JAR_DST): $(JDK_TOPDIR)/make/closed/tools/crypto/jce/US_export_policy.jar
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    81
	$(ECHO) $(LOG_INFO) Copying prebuilt $(@F)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    82
	$(install-file)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    83
else
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    84
  ifeq ($(UNLIMITED_CRYPTO), true)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    85
    $(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    86
	$(install-file)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    87
  else
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    88
    $(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    89
	$(install-file)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    90
  endif
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    91
endif
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    92
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    93
POLICY_JARS += $(US_EXPORT_POLICY_JAR_DST)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    94
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    95
################################################################################
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    96
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    97
LOCAL_POLICY_JAR_DST := $(JDK_OUTPUTDIR)/lib/security/local_policy.jar
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    98
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    99
ifneq ($(BUILD_CRYPTO), no)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   100
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   101
  LOCAL_POLICY_JAR_LIMITED_UNSIGNED := \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   102
      $(JDK_OUTPUTDIR)/jce/unsigned/policy/limited/local_policy.jar
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   103
  LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED := \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   104
      $(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/local_policy.jar
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   105
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   106
  #
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   107
  # TODO fix so that SetupArchive does not write files into SRCS
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   108
  # then we don't need this extra copying
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   109
  #
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   110
  LOCAL_POLICY_JAR_LIMITED_TMP := \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   111
      $(JDK_OUTPUTDIR)/jce/unsigned/policy/limited/local_policy_jar.tmp
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   112
  LOCAL_POLICY_JAR_UNLIMITED_TMP := \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   113
      $(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/local_policy_jar.tmp
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   114
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   115
  $(LOCAL_POLICY_JAR_LIMITED_TMP)/%: $(JDK_TOPDIR)/make/data/cryptopolicy/limited/%
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   116
	$(install-file)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   117
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   118
  $(LOCAL_POLICY_JAR_UNLIMITED_TMP)/%: $(JDK_TOPDIR)/make/data/cryptopolicy/unlimited/%
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   119
	$(install-file)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   120
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   121
  $(eval $(call SetupArchive,BUILD_LOCAL_POLICY_JAR_LIMITED, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   122
      $(LOCAL_POLICY_JAR_LIMITED_TMP)/exempt_local.policy \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   123
      $(LOCAL_POLICY_JAR_LIMITED_TMP)/default_local.policy, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   124
      SRCS := $(LOCAL_POLICY_JAR_LIMITED_TMP), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   125
      SUFFIXES := .policy, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   126
      JAR := $(LOCAL_POLICY_JAR_LIMITED_UNSIGNED), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   127
      EXTRA_MANIFEST_ATTR := Crypto-Strength: limited, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   128
      SKIP_METAINF := true))
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   129
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   130
  $(eval $(call SetupArchive,BUILD_LOCAL_POLICY_JAR_UNLIMITED, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   131
      $(LOCAL_POLICY_JAR_UNLIMITED_TMP)/default_local.policy, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   132
      SRCS := $(LOCAL_POLICY_JAR_UNLIMITED_TMP), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   133
      SUFFIXES := .policy, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   134
      JAR := $(LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   135
      EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   136
      SKIP_METAINF := true))
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   137
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   138
  TARGETS += $(LOCAL_POLICY_JAR_LIMITED_UNSIGNED) $(LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   139
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   140
  ifndef OPENJDK
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   141
    $(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/README.txt: \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   142
        $(JDK_TOPDIR)/make/closed/javax/crypto/doc/README.txt
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   143
		$(install-file)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   144
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   145
    TARGETS += $(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/README.txt
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   146
  endif
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   147
endif
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   148
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   149
ifndef OPENJDK
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   150
  $(LOCAL_POLICY_JAR_DST): $(JDK_TOPDIR)/make/closed/tools/crypto/jce/local_policy.jar
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   151
	$(ECHO) $(LOG_INFO) Copying prebuilt $(@F)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   152
	$(install-file)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   153
else
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   154
  ifeq ($(UNLIMITED_CRYPTO), true)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   155
    $(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   156
	$(install-file)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   157
  else
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   158
    $(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_LIMITED_UNSIGNED)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   159
	$(install-file)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   160
  endif
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   161
endif
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   162
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   163
POLICY_JARS += $(LOCAL_POLICY_JAR_DST)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   164
TARGETS += $(POLICY_JARS)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   165
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   166
################################################################################
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   167
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   168
all: $(TARGETS)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   169