make/UnpackSecurity.gmk
author egahlin
Tue, 22 May 2018 23:27:54 +0200
changeset 50225 2942ae532175
parent 47217 72e3ae9a25eb
permissions -rw-r--r--
8201331: Better test cleanup for jdk/jfr/api/consumer/TestRecordingFile.java Reviewed-by: tbell, mgronlun
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     1
#
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
     2
# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
25859
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
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    31
################################################################################
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    32
# Unpack the binary distributions of the crypto classes if they exist.
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
    33
SEC_FILES_ZIP := $(TOPDIR)/make/tools/crypto/sec-bin.zip
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
    34
SEC_FILES_WIN_ZIP := $(TOPDIR)/make/tools/crypto/sec-windows-bin.zip
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
    35
JGSS_WIN32_FILES_ZIP := $(TOPDIR)/make/tools/crypto/jgss-windows-i586-bin.zip
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
    36
JGSS_WIN64_FILES_ZIP := $(TOPDIR)/make/tools/crypto/jgss-windows-x64-bin.zip
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    37
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    38
define unzip-sec-file
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    39
	$(ECHO) Unzipping $(<F)
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    40
	$(MKDIR) -p $(@D) $(JDK_OUTPUTDIR)
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    41
	$(RM) $@
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    42
	($(CD) $(JDK_OUTPUTDIR) && $(UNZIP) -q -o $< > $@.tmp)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    43
	$(MV) $@.tmp $@
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    44
endef
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    45
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    46
define unzip-native-sec-file
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    47
	$(ECHO) Unzipping $(<F)
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    48
	$(MKDIR) -p $(@D)
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    49
	$(RM) $@
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    50
	($(CD) $(SUPPORT_OUTPUTDIR) && $(UNZIP) -q -o $< > $@.tmp)
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    51
	$(MV) $@.tmp $@
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    52
endef
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    53
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    54
$(SUPPORT_OUTPUTDIR)/_the.sec-bin.unzipped: $(SEC_FILES_ZIP)
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    55
	$(call unzip-sec-file)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    56
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    57
# Trying to unzip both of the sec files at the same time may cause a race
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    58
# when creating directories common to both files.
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    59
$(SUPPORT_OUTPUTDIR)/_the.sec-windows-bin.unzipped: $(SEC_FILES_WIN_ZIP) \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    60
    | $(SUPPORT_OUTPUTDIR)/_the.sec-bin.unzipped
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    61
	$(call unzip-sec-file)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    62
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    63
$(SUPPORT_OUTPUTDIR)/_the.jgss-windows-i586-bin.unzipped: $(JGSS_WIN32_FILES_ZIP)
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    64
	$(call unzip-native-sec-file)
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    65
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    66
$(SUPPORT_OUTPUTDIR)/_the.jgss-windows-x64-bin.unzipped: $(JGSS_WIN64_FILES_ZIP)
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    67
	$(call unzip-native-sec-file)
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    68
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    69
ifneq ($(wildcard $(SEC_FILES_ZIP)), )
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    70
  IMPORT_TARGET_FILES += $(SUPPORT_OUTPUTDIR)/_the.sec-bin.unzipped
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    71
  ifeq ($(OPENJDK_TARGET_OS), windows)
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    72
    IMPORT_TARGET_FILES += $(SUPPORT_OUTPUTDIR)/_the.sec-windows-bin.unzipped
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    73
    ifeq ($(OPENJDK_TARGET_CPU), x86)
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    74
      IMPORT_TARGET_FILES += $(SUPPORT_OUTPUTDIR)/_the.jgss-windows-i586-bin.unzipped
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    75
    endif
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    76
    ifeq ($(OPENJDK_TARGET_CPU), x86_64)
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    77
      IMPORT_TARGET_FILES += $(SUPPORT_OUTPUTDIR)/_the.jgss-windows-x64-bin.unzipped
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    78
    endif
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    79
  endif
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    80
endif
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    81
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    82
################################################################################
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    83
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    84
sec: $(IMPORT_TARGET_FILES)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    85
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    86
all: sec
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    87
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    88
.PHONY: sec all