jdk/make/Import.gmk
author jwilhelm
Tue, 08 Sep 2015 16:10:37 +0200
changeset 32734 7029a3eb3008
parent 30329 f483f76692f6
child 33653 c1ee09fe3274
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
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.
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
     4
#
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
    10
#
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
    15
# accompanied this code).
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
    16
#
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
    20
#
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
    23
# questions.
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
    24
#
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
    25
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
    26
default: all
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
    27
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
    28
include $(SPEC)
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
    29
include MakeBase.gmk
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
    30
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 23355
diff changeset
    31
################################################################################
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
    32
27736
8c9bd4be4a86 8058631: Rename posix to unix in build system to match file name changes
ihse
parents: 25859
diff changeset
    33
# Put the libraries here. Different locations for different target OS types.
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    34
ifneq ($(OPENJDK_TARGET_OS), windows)
30329
f483f76692f6 8075725: Remove /jre subdir in hotspot dist dir
erikj
parents: 27953
diff changeset
    35
  HOTSPOT_LIB_DIR := $(HOTSPOT_DIST)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    36
  BASE_INSTALL_LIBRARIES_HERE := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR)
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    37
  SA_INSTALL_LIBRARIES_HERE := $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.hotspot.agent$(OPENJDK_TARGET_CPU_LIBDIR)
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
    38
else
30329
f483f76692f6 8075725: Remove /jre subdir in hotspot dist dir
erikj
parents: 27953
diff changeset
    39
  HOTSPOT_LIB_DIR := $(HOTSPOT_DIST)/bin
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    40
  BASE_INSTALL_LIBRARIES_HERE := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    41
  SA_INSTALL_LIBRARIES_HERE := $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.hotspot.agent
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
    42
endif
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
    43
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 23355
diff changeset
    44
################################################################################
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
    45
#
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
    46
# Import hotspot
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
    47
#
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    48
HOTSPOT_BASE_IMPORT_FILES := \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    49
    $(addprefix $(LIBRARY_PREFIX), jvm.* jsig.* jvm_db.* jvm_dtrace.*) \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    50
    Xusage.txt \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    51
    #
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    52
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    53
HOTSPOT_SA_IMPORT_FILES := \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    54
    $(addprefix $(LIBRARY_PREFIX), saproc.* sawindbg.*) \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    55
    #
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    56
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    57
$(eval $(call SetupCopyFiles,COPY_HOTSPOT_BASE, \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    58
    SRC := $(HOTSPOT_LIB_DIR), \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    59
    DEST := $(BASE_INSTALL_LIBRARIES_HERE), \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    60
    FILES := $(shell $(FIND) $(HOTSPOT_LIB_DIR) -type f  \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    61
        -a \( -name DUMMY $(addprefix -o$(SPACE)-name$(SPACE), $(HOTSPOT_BASE_IMPORT_FILES)) \) )))
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    62
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    63
ifeq ($(OPENJDK_TARGET_OS), windows)
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    64
  $(eval $(call SetupCopyFiles,COPY_HOTSPOT_BASE_JVMLIB, \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    65
      SRC := $(HOTSPOT_DIST)/lib, \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    66
      DEST := $(BASE_INSTALL_LIBRARIES_HERE), \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    67
      FILES := $(wildcard $(HOTSPOT_DIST)/lib/*.lib)))
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    68
endif
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    69
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    70
BASE_TARGETS := $(COPY_HOTSPOT_BASE) $(COPY_HOTSPOT_BASE_JVMLIB)
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    71
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    72
$(eval $(call SetupCopyFiles,COPY_HOTSPOT_SA, \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    73
    SRC := $(HOTSPOT_LIB_DIR), \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    74
    DEST := $(SA_INSTALL_LIBRARIES_HERE), \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    75
    FILES := $(shell $(FIND) $(HOTSPOT_LIB_DIR) -type f  \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    76
        -a \( -name DUMMY $(addprefix -o$(SPACE)-name$(SPACE), $(HOTSPOT_SA_IMPORT_FILES)) \) )))
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    77
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    78
SA_TARGETS := $(COPY_HOTSPOT_SA)
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    79
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    80
################################################################################
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
    81
20887
e6ca3d58bfe9 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 17957
diff changeset
    82
ifeq ($(OPENJDK_TARGET_OS), macosx)
30329
f483f76692f6 8075725: Remove /jre subdir in hotspot dist dir
erikj
parents: 27953
diff changeset
    83
  JSIG_DEBUGINFO := $(strip $(wildcard $(HOTSPOT_DIST)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig$(SHARED_LIBRARY_SUFFIX).dSYM) \
f483f76692f6 8075725: Remove /jre subdir in hotspot dist dir
erikj
parents: 27953
diff changeset
    84
      $(wildcard $(HOTSPOT_DIST)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.diz) )
20887
e6ca3d58bfe9 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 17957
diff changeset
    85
else
30329
f483f76692f6 8075725: Remove /jre subdir in hotspot dist dir
erikj
parents: 27953
diff changeset
    86
  JSIG_DEBUGINFO := $(strip $(wildcard $(HOTSPOT_DIST)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.debuginfo) \
f483f76692f6 8075725: Remove /jre subdir in hotspot dist dir
erikj
parents: 27953
diff changeset
    87
      $(wildcard $(HOTSPOT_DIST)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.diz) )
20887
e6ca3d58bfe9 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 17957
diff changeset
    88
endif
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
    89
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
    90
ifneq ($(OPENJDK_TARGET_OS), windows)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 17957
diff changeset
    91
  ifeq ($(JVM_VARIANT_SERVER), true)
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    92
    BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/server/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 17957
diff changeset
    93
    ifneq (, $(JSIG_DEBUGINFO))
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    94
      BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/server/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
    95
    endif
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 17957
diff changeset
    96
  endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 17957
diff changeset
    97
  ifeq ($(JVM_VARIANT_CLIENT), true)
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    98
    BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/client/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 17957
diff changeset
    99
    ifneq (, $(JSIG_DEBUGINFO))
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   100
      BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/client/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
   101
    endif
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 17957
diff changeset
   102
  endif
21131
7171b82a14c3 8027117: adapt JDK-7165611 to new build-infra whitespace/indent policy
dcubed
parents: 20888
diff changeset
   103
  ifneq ($(OPENJDK_TARGET_OS), macosx)
7171b82a14c3 8027117: adapt JDK-7165611 to new build-infra whitespace/indent policy
dcubed
parents: 20888
diff changeset
   104
    ifeq ($(JVM_VARIANT_MINIMAL1), true)
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   105
      BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/minimal/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
21131
7171b82a14c3 8027117: adapt JDK-7165611 to new build-infra whitespace/indent policy
dcubed
parents: 20888
diff changeset
   106
      ifneq (,$(JSIG_DEBUGINFO))
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   107
        BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/minimal/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
21131
7171b82a14c3 8027117: adapt JDK-7165611 to new build-infra whitespace/indent policy
dcubed
parents: 20888
diff changeset
   108
      endif
15680
d379c4f7bb47 8006651: build-infra: Import.gmk needs to add support for the minimal VM
dholmes
parents: 15139
diff changeset
   109
    endif
21131
7171b82a14c3 8027117: adapt JDK-7165611 to new build-infra whitespace/indent policy
dcubed
parents: 20888
diff changeset
   110
  endif
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
   111
endif
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
   112
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   113
$(BASE_INSTALL_LIBRARIES_HERE)/server/%$(SHARED_LIBRARY_SUFFIX): $(BASE_INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX)
13702
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   114
	$(MKDIR) -p $(@D)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   115
	$(RM) $@
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
   116
	$(LN) -s ../$(@F) $@
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
   117
20887
e6ca3d58bfe9 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 17957
diff changeset
   118
ifeq ($(OPENJDK_TARGET_OS), macosx)
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   119
  $(BASE_INSTALL_LIBRARIES_HERE)/server/%.dSYM : $(BASE_INSTALL_LIBRARIES_HERE)/%.dSYM
20887
e6ca3d58bfe9 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 17957
diff changeset
   120
	$(MKDIR) -p $(@D)
e6ca3d58bfe9 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 17957
diff changeset
   121
	$(RM) $@
e6ca3d58bfe9 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 17957
diff changeset
   122
	$(LN) -s ../$(@F) $@
e6ca3d58bfe9 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 17957
diff changeset
   123
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   124
  $(BASE_INSTALL_LIBRARIES_HERE)/server/%.diz : $(BASE_INSTALL_LIBRARIES_HERE)/%.diz
20887
e6ca3d58bfe9 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 17957
diff changeset
   125
	$(MKDIR) -p $(@D)
e6ca3d58bfe9 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 17957
diff changeset
   126
	$(RM) $@
21133
dcec14b84950 8027298: broken link in jdk8b113 macosx binaries
erikj
parents: 21131
diff changeset
   127
	$(RM) $@.tmp $(basename $@)$(SHARED_LIBRARY_SUFFIX).dSYM
dcec14b84950 8027298: broken link in jdk8b113 macosx binaries
erikj
parents: 21131
diff changeset
   128
	$(LN) -s ../$(basename $(@F))$(SHARED_LIBRARY_SUFFIX).dSYM $(basename $@)$(SHARED_LIBRARY_SUFFIX).dSYM
dcec14b84950 8027298: broken link in jdk8b113 macosx binaries
erikj
parents: 21131
diff changeset
   129
	$(CD) $(@D) && $(ZIP) -q -y $@.tmp $(basename $(@F))$(SHARED_LIBRARY_SUFFIX).dSYM
dcec14b84950 8027298: broken link in jdk8b113 macosx binaries
erikj
parents: 21131
diff changeset
   130
	$(RM) $(basename $@)$(SHARED_LIBRARY_SUFFIX).dSYM
20887
e6ca3d58bfe9 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 17957
diff changeset
   131
	$(MV) $@.tmp $@
e6ca3d58bfe9 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 17957
diff changeset
   132
else
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   133
  $(BASE_INSTALL_LIBRARIES_HERE)/server/%.debuginfo: $(BASE_INSTALL_LIBRARIES_HERE)/%.debuginfo
13702
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   134
	$(MKDIR) -p $(@D)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   135
	$(RM) $@
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
   136
	$(LN) -s ../$(@F) $@
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
   137
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   138
  $(BASE_INSTALL_LIBRARIES_HERE)/server/%.diz: $(BASE_INSTALL_LIBRARIES_HERE)/%.diz
13702
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   139
	$(MKDIR) -p $(@D)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   140
	$(RM) $@
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   141
	$(RM) $@.tmp $(basename $@).debuginfo
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
   142
	$(LN) -s ../$(basename $(@F)).debuginfo $(basename $@).debuginfo
15139
3ec04e4fbb5e 8006385: build-infra: linux and solaris *-debuginfo-*.zip file created from the new makefile has extra HUDSON direcotry in jre/lib/i386/server
erikj
parents: 14596
diff changeset
   143
	$(CD) $(@D) && $(ZIP) -q -y $@.tmp $(basename $(@F)).debuginfo
13702
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   144
	$(RM) $(basename $@).debuginfo
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   145
	$(MV) $@.tmp $@
20887
e6ca3d58bfe9 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 17957
diff changeset
   146
endif
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
   147
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   148
$(BASE_INSTALL_LIBRARIES_HERE)/client/%$(SHARED_LIBRARY_SUFFIX): $(BASE_INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX)
13702
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   149
	$(MKDIR) -p $(@D)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   150
	$(RM) $@
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
   151
	$(LN) -s ../$(@F) $@
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
   152
20887
e6ca3d58bfe9 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 17957
diff changeset
   153
ifeq ($(OPENJDK_TARGET_OS), macosx)
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   154
  $(BASE_INSTALL_LIBRARIES_HERE)/client/%.dSYM : $(BASE_INSTALL_LIBRARIES_HERE)/%.dSYM
20887
e6ca3d58bfe9 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 17957
diff changeset
   155
	$(MKDIR) -p $(@D)
e6ca3d58bfe9 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 17957
diff changeset
   156
	$(RM) $@
e6ca3d58bfe9 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 17957
diff changeset
   157
	$(LN) -s ../$(@F) $@
e6ca3d58bfe9 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 17957
diff changeset
   158
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   159
  $(BASE_INSTALL_LIBRARIES_HERE)/client/%.diz : $(BASE_INSTALL_LIBRARIES_HERE)/%.diz
20887
e6ca3d58bfe9 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 17957
diff changeset
   160
	$(MKDIR) -p $(@D)
e6ca3d58bfe9 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 17957
diff changeset
   161
	$(RM) $@
21133
dcec14b84950 8027298: broken link in jdk8b113 macosx binaries
erikj
parents: 21131
diff changeset
   162
	$(RM) $@.tmp $(basename $@)$(SHARED_LIBRARY_SUFFIX).dSYM
dcec14b84950 8027298: broken link in jdk8b113 macosx binaries
erikj
parents: 21131
diff changeset
   163
	$(LN) -s ../$(basename $(@F))$(SHARED_LIBRARY_SUFFIX).dSYM $(basename $@)$(SHARED_LIBRARY_SUFFIX).dSYM
dcec14b84950 8027298: broken link in jdk8b113 macosx binaries
erikj
parents: 21131
diff changeset
   164
	$(CD) $(@D) && $(ZIP) -q -y $@.tmp $(basename $(@F))$(SHARED_LIBRARY_SUFFIX).dSYM
dcec14b84950 8027298: broken link in jdk8b113 macosx binaries
erikj
parents: 21131
diff changeset
   165
	$(RM) $(basename $@)$(SHARED_LIBRARY_SUFFIX).dSYM
20887
e6ca3d58bfe9 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 17957
diff changeset
   166
	$(MV) $@.tmp $@
e6ca3d58bfe9 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 17957
diff changeset
   167
else
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   168
  $(BASE_INSTALL_LIBRARIES_HERE)/client/%.debuginfo: $(BASE_INSTALL_LIBRARIES_HERE)/%.debuginfo
13702
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   169
	$(MKDIR) -p $(@D)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   170
	$(RM) $@
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
   171
	$(LN) -s ../$(@F) $@
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
   172
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   173
  $(BASE_INSTALL_LIBRARIES_HERE)/client/%.diz: $(BASE_INSTALL_LIBRARIES_HERE)/%.diz
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   174
	$(MKDIR) -p $(@D)
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   175
	$(RM) $@
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   176
	$(RM) $@.tmp $(basename $@).debuginfo
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   177
	$(LN) -s ../$(basename $(@F)).debuginfo $(basename $@).debuginfo
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   178
	$(CD) $(@D) && $(ZIP) -q -y $@.tmp $(basename $(@F)).debuginfo
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   179
	$(RM) $(basename $@).debuginfo
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   180
	$(MV) $@.tmp $@
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   181
endif
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   182
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   183
$(BASE_INSTALL_LIBRARIES_HERE)/minimal/%$(SHARED_LIBRARY_SUFFIX): $(BASE_INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX)
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   184
	$(MKDIR) -p $(@D)
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   185
	$(RM) $@
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   186
	$(LN) -s ../$(@F) $@
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   187
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   188
ifneq ($(OPENJDK_TARGET_OS), macosx)
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   189
  $(BASE_INSTALL_LIBRARIES_HERE)/minimal/%.debuginfo: $(BASE_INSTALL_LIBRARIES_HERE)/%.debuginfo
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   190
	$(MKDIR) -p $(@D)
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   191
	$(RM) $@
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   192
	$(LN) -s ../$(@F) $@
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   193
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   194
  $(BASE_INSTALL_LIBRARIES_HERE)/minimal/%.diz: $(BASE_INSTALL_LIBRARIES_HERE)/%.diz
13702
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   195
	$(MKDIR) -p $(@D)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   196
	$(RM) $@
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   197
	$(RM) $@.tmp $(basename $@).debuginfo
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
   198
	$(LN) -s ../$(basename $(@F)).debuginfo $(basename $@).debuginfo
15139
3ec04e4fbb5e 8006385: build-infra: linux and solaris *-debuginfo-*.zip file created from the new makefile has extra HUDSON direcotry in jre/lib/i386/server
erikj
parents: 14596
diff changeset
   199
	$(CD) $(@D) && $(ZIP) -q -y $@.tmp $(basename $(@F)).debuginfo
13702
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   200
	$(RM) $(basename $@).debuginfo
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   201
	$(MV) $@.tmp $@
20887
e6ca3d58bfe9 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 17957
diff changeset
   202
endif
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents:
diff changeset
   203
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   204
################################################################################
15680
d379c4f7bb47 8006651: build-infra: Import.gmk needs to add support for the minimal VM
dholmes
parents: 15139
diff changeset
   205
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   206
$(JDK_OUTPUTDIR)/modules/jdk.hotspot.agent/_the.sa.jar.unpacked: $(HOTSPOT_DIST)/lib/sa-jdi.jar \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   207
    $(SUPPORT_OUTPUTDIR)/gensrc/jdk.hotspot.agent/_the.sa.services
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   208
	$(ECHO) $(LOG_INFO) Unzipping $(<F)
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   209
	$(RM) -r $(@D)
15680
d379c4f7bb47 8006651: build-infra: Import.gmk needs to add support for the minimal VM
dholmes
parents: 15139
diff changeset
   210
	$(MKDIR) -p $(@D)
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   211
	$(CD) $(@D) && $(UNZIP) $< -x META-INF/MANIFEST.MF $(LOG_DEBUG)
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   212
        # We must move the service provider file out of the way so that
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   213
        # Gensrc-jdk.jdi.gmk can combine them.
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   214
	$(MKDIR) -p $(SUPPORT_OUTPUTDIR)/gensrc/jdk.hotspot.agent
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   215
	$(MV) $(JDK_OUTPUTDIR)/modules/jdk.hotspot.agent/META-INF/services/com.sun.jdi.connect.Connector \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   216
	    $(SUPPORT_OUTPUTDIR)/gensrc/jdk.hotspot.agent/_the.sa.services
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   217
	$(TOUCH) $(SUPPORT_OUTPUTDIR)/gensrc/jdk.hotspot.agent/_the.sa.services
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   218
	$(TOUCH) $@
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   219
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   220
# Declaring this dependency guarantees that _the.sa.services will be rebuilt
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   221
# even if zip is already unpacked.
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   222
$(SUPPORT_OUTPUTDIR)/gensrc/jdk.hotspot.agent/_the.sa.services: $(HOTSPOT_DIST)/lib/sa-jdi.jar
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   223
27953
03e0e3891572 8066589: Make importing sa-jdi.jar optional on its existance
simonis
parents: 27799
diff changeset
   224
# Some platforms don't have the serviceability agent
03e0e3891572 8066589: Make importing sa-jdi.jar optional on its existance
simonis
parents: 27799
diff changeset
   225
ifeq (, $(filter $(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU), aix-ppc64))
03e0e3891572 8066589: Make importing sa-jdi.jar optional on its existance
simonis
parents: 27799
diff changeset
   226
  ifneq ($(JVM_VARIANT_ZERO), true)
03e0e3891572 8066589: Make importing sa-jdi.jar optional on its existance
simonis
parents: 27799
diff changeset
   227
    SA_TARGETS += $(JDK_OUTPUTDIR)/modules/jdk.hotspot.agent/_the.sa.jar.unpacked \
03e0e3891572 8066589: Make importing sa-jdi.jar optional on its existance
simonis
parents: 27799
diff changeset
   228
        $(SUPPORT_OUTPUTDIR)/gensrc/jdk.hotspot.agent/_the.sa.services
03e0e3891572 8066589: Make importing sa-jdi.jar optional on its existance
simonis
parents: 27799
diff changeset
   229
  endif
03e0e3891572 8066589: Make importing sa-jdi.jar optional on its existance
simonis
parents: 27799
diff changeset
   230
endif
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   231
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   232
################################################################################
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   233
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   234
ifeq ($(OPENJDK_TARGET_OS), windows)
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   235
  $(eval $(call SetupCopyFiles,BASE_COPY_LIBS_BIN, \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   236
      SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base, \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   237
      DEST := $(JDK_OUTPUTDIR)/bin, \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   238
      FILES := $(filter-out %.lib, $(BASE_TARGETS))))
15680
d379c4f7bb47 8006651: build-infra: Import.gmk needs to add support for the minimal VM
dholmes
parents: 15139
diff changeset
   239
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   240
  $(eval $(call SetupCopyFiles,BASE_COPY_LIBS_LIB, \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   241
      SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base, \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   242
      DEST := $(JDK_OUTPUTDIR)/lib, \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   243
      FILES := $(filter %.lib, $(BASE_TARGETS))))
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   244
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   245
  $(eval $(call SetupCopyFiles,SA_COPY_LIBS, \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   246
      SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.hotspot.agent, \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   247
      DEST := $(JDK_OUTPUTDIR)/lib, \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   248
      FILES := $(filter $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.hotspot.agent/%, \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   249
          $(SA_TARGETS))))
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   250
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   251
  $(eval $(call SetupCopyFiles,SA_COPY_LIBS, \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   252
      SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.hotspot.agent, \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   253
      DEST := $(JDK_OUTPUTDIR)/bin, \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   254
      FILES := $(filter $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.hotspot.agent/%, \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   255
          $(SA_TARGETS))))
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   256
else
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   257
  $(eval $(call SetupCopyFiles,BASE_COPY_LIBS, \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   258
      SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base, \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   259
      DEST := $(JDK_OUTPUTDIR)/lib, \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   260
      FILES := $(BASE_TARGETS)))
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   261
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   262
  $(eval $(call SetupCopyFiles,SA_COPY_LIBS, \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   263
      SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.hotspot.agent, \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   264
      DEST := $(JDK_OUTPUTDIR)/lib, \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   265
      FILES := $(filter $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.hotspot.agent/%, $(SA_TARGETS))))
20887
e6ca3d58bfe9 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 17957
diff changeset
   266
endif
15680
d379c4f7bb47 8006651: build-infra: Import.gmk needs to add support for the minimal VM
dholmes
parents: 15139
diff changeset
   267
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   268
################################################################################
17957
1a51992c6097 8010785: JDK 8 build on Linux fails with new build mechanism
erikj
parents: 15691
diff changeset
   269
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   270
all: $(BASE_TARGETS) $(SA_TARGETS) \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   271
    $(BASE_COPY_LIBS_BIN) $(BASE_COPY_LIBS_LIB) \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   272
    $(BASE_COPY_LIBS) $(SA_COPY_LIBS)
17957
1a51992c6097 8010785: JDK 8 build on Linux fails with new build mechanism
erikj
parents: 15691
diff changeset
   273
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   274
.PHONY: default all