annotate make/CopyImportModules.gmk @ 2450:ef056360ddf3

8172037: Change log message of SetupCopyFiles Reviewed-by: tbell
author erikj
date Mon, 09 Jan 2017 11:55:37 +0100
parents 4353c659dfde
children
rev   line source
alanb@1970 1 #
erikj@2288 2 # Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
alanb@1970 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
alanb@1970 4 #
alanb@1970 5 # This code is free software; you can redistribute it and/or modify it
alanb@1970 6 # under the terms of the GNU General Public License version 2 only, as
alanb@1970 7 # published by the Free Software Foundation. Oracle designates this
alanb@1970 8 # particular file as subject to the "Classpath" exception as provided
alanb@1970 9 # by Oracle in the LICENSE file that accompanied this code.
alanb@1970 10 #
alanb@1970 11 # This code is distributed in the hope that it will be useful, but WITHOUT
alanb@1970 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
alanb@1970 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
alanb@1970 14 # version 2 for more details (a copy is included in the LICENSE file that
alanb@1970 15 # accompanied this code).
alanb@1970 16 #
alanb@1970 17 # You should have received a copy of the GNU General Public License version
alanb@1970 18 # 2 along with this work; if not, write to the Free Software Foundation,
alanb@1970 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
alanb@1970 20 #
alanb@1970 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
alanb@1970 22 # or visit www.oracle.com if you need additional information or have any
alanb@1970 23 # questions.
alanb@1970 24 #
alanb@1970 25
alanb@1970 26 # This makefile is called for every imported module to copy the non class
alanb@1970 27 # contents into the exploded jdk image.
alanb@1970 28
alanb@1970 29 default: all
alanb@1970 30
alanb@1970 31 include $(SPEC)
alanb@1970 32 include MakeBase.gmk
alanb@1970 33
alanb@1970 34 LIBS_DIR := $(wildcard $(addsuffix /$(MODULE), $(IMPORT_MODULES_LIBS)))
alanb@1970 35 CMDS_DIR := $(wildcard $(addsuffix /$(MODULE), $(IMPORT_MODULES_CMDS)))
alanb@1970 36 CONF_DIR := $(wildcard $(addsuffix /$(MODULE), $(IMPORT_MODULES_CONF)))
alanb@1970 37
alanb@1970 38 $(eval $(call FillCacheFind, $(LIBS_DIR) $(CMDS_DIR) $(CONF_DIR)))
alanb@1970 39
alanb@1970 40 ifneq ($(LIBS_DIR), )
alanb@1970 41 ifeq ($(OPENJDK_TARGET_OS), windows)
alanb@1970 42 TO_BIN_FILTER := %$(SHARED_LIBRARY_SUFFIX) %.diz %.pdb %.map
alanb@1970 43
ihse@2305 44 $(eval $(call SetupCopyFiles, COPY_LIBS_TO_BIN, \
alanb@1970 45 SRC := $(LIBS_DIR), \
alanb@1970 46 DEST := $(JDK_OUTPUTDIR)/bin, \
alanb@1970 47 FILES := $(filter $(TO_BIN_FILTER), \
alanb@1970 48 $(call CacheFind, $(LIBS_DIR))) \
alanb@1970 49 ))
alanb@1970 50
ihse@2305 51 $(eval $(call SetupCopyFiles, COPY_LIBS_TO_LIB, \
alanb@1970 52 SRC := $(LIBS_DIR), \
alanb@1970 53 DEST := $(JDK_OUTPUTDIR)/lib, \
alanb@1970 54 FILES := $(filter-out $(TO_BIN_FILTER), \
alanb@1970 55 $(call CacheFind, $(LIBS_DIR))) \
alanb@1970 56 ))
alanb@1970 57 TARGETS += $(COPY_LIBS_TO_BIN) $(COPY_LIBS_TO_LIB)
alanb@1970 58 else
alanb@1970 59 $(eval $(call SetupCopyFiles, COPY_LIBS, \
alanb@1970 60 SRC := $(LIBS_DIR), \
alanb@1970 61 DEST := $(JDK_OUTPUTDIR)/lib, \
erikj@2288 62 FILES := $(filter %$(SHARED_LIBRARY_SUFFIX), $(call CacheFind, $(LIBS_DIR))), \
alanb@1970 63 ))
erikj@2288 64
erikj@2288 65 # Use relative links if the import dir is inside the OUTPUT_ROOT, otherwise
erikj@2288 66 # copy to avoid having automated systems following symlinks when deleting files,
erikj@2288 67 # or risk invalidating the build output from external changes.
erikj@2288 68 ifeq ($(filter $(OUTPUT_ROOT)/%, $(LIBS_DIR)), )
erikj@2288 69 LINK_MACRO := install-file
erikj@2450 70 LOG_ACTION := Copying
erikj@2288 71 else
erikj@2288 72 LINK_MACRO := link-file-relative
erikj@2450 73 LOG_ACTION := Creating symlink
erikj@2288 74 endif
erikj@2288 75 $(eval $(call SetupCopyFiles, LINK_LIBS, \
erikj@2288 76 SRC := $(LIBS_DIR), \
erikj@2288 77 DEST := $(JDK_OUTPUTDIR)/lib, \
erikj@2288 78 FILES := $(filter-out %$(SHARED_LIBRARY_SUFFIX), $(call CacheFind, $(LIBS_DIR))), \
erikj@2288 79 MACRO := $(LINK_MACRO), \
erikj@2450 80 LOG_ACTION := $(LOG_ACTION), \
erikj@2288 81 ))
erikj@2288 82 TARGETS += $(COPY_LIBS) $(LINK_LIBS)
alanb@1970 83 endif
alanb@1970 84 endif
alanb@1970 85
alanb@1970 86 ifneq ($(CMDS_DIR), )
alanb@1970 87 $(eval $(call SetupCopyFiles, COPY_CMDS, \
alanb@1970 88 SRC := $(CMDS_DIR), \
alanb@1970 89 DEST := $(JDK_OUTPUTDIR)/bin, \
alanb@1970 90 FILES := $(call CacheFind, $(CMDS_DIR)), \
alanb@1970 91 ))
alanb@1970 92 TARGETS += $(COPY_CMDS)
alanb@1970 93 endif
alanb@1970 94
alanb@1970 95 ifneq ($(CONF_DIR), )
alanb@1970 96 $(eval $(call SetupCopyFiles, COPY_CONF, \
alanb@1970 97 SRC := $(CONF_DIR), \
alanb@1970 98 DEST := $(JDK_OUTPUTDIR)/lib, \
alanb@1970 99 FILES := $(call CacheFind, $(CONF_DIR)), \
alanb@1970 100 ))
alanb@1970 101 TARGETS += $(COPY_CONF)
alanb@1970 102 endif
alanb@1970 103
alanb@1970 104 all: $(TARGETS)