2016-03-17 19:03:53 +00:00
|
|
|
#
|
2017-10-24 08:41:45 +00:00
|
|
|
# Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
|
2016-03-17 19:03:53 +00:00
|
|
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
#
|
|
|
|
# This code is free software; you can redistribute it and/or modify it
|
|
|
|
# under the terms of the GNU General Public License version 2 only, as
|
|
|
|
# published by the Free Software Foundation. Oracle designates this
|
|
|
|
# particular file as subject to the "Classpath" exception as provided
|
|
|
|
# by Oracle in the LICENSE file that accompanied this code.
|
|
|
|
#
|
|
|
|
# This code is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
# version 2 for more details (a copy is included in the LICENSE file that
|
|
|
|
# accompanied this code).
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License version
|
|
|
|
# 2 along with this work; if not, write to the Free Software Foundation,
|
|
|
|
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
#
|
|
|
|
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
|
|
# or visit www.oracle.com if you need additional information or have any
|
|
|
|
# questions.
|
|
|
|
#
|
|
|
|
|
|
|
|
# This makefile is called for every imported module to copy the non class
|
|
|
|
# contents into the exploded jdk image.
|
|
|
|
|
|
|
|
default: all
|
|
|
|
|
|
|
|
include $(SPEC)
|
|
|
|
include MakeBase.gmk
|
|
|
|
|
2024-04-11 14:15:34 +00:00
|
|
|
include CopyFiles.gmk
|
|
|
|
|
2016-03-17 19:03:53 +00:00
|
|
|
LIBS_DIR := $(wildcard $(addsuffix /$(MODULE), $(IMPORT_MODULES_LIBS)))
|
|
|
|
CMDS_DIR := $(wildcard $(addsuffix /$(MODULE), $(IMPORT_MODULES_CMDS)))
|
|
|
|
CONF_DIR := $(wildcard $(addsuffix /$(MODULE), $(IMPORT_MODULES_CONF)))
|
|
|
|
|
2017-10-24 08:41:45 +00:00
|
|
|
$(call FillFindCache, $(LIBS_DIR) $(CMDS_DIR) $(CONF_DIR))
|
2016-03-17 19:03:53 +00:00
|
|
|
|
|
|
|
ifneq ($(LIBS_DIR), )
|
2019-02-07 11:35:45 +00:00
|
|
|
ifeq ($(call isTargetOs, windows), true)
|
2016-03-17 19:03:53 +00:00
|
|
|
TO_BIN_FILTER := %$(SHARED_LIBRARY_SUFFIX) %.diz %.pdb %.map
|
|
|
|
|
2016-10-11 07:49:31 +00:00
|
|
|
$(eval $(call SetupCopyFiles, COPY_LIBS_TO_BIN, \
|
2016-03-17 19:03:53 +00:00
|
|
|
SRC := $(LIBS_DIR), \
|
|
|
|
DEST := $(JDK_OUTPUTDIR)/bin, \
|
|
|
|
FILES := $(filter $(TO_BIN_FILTER), \
|
2017-10-24 08:41:45 +00:00
|
|
|
$(call FindFiles, $(LIBS_DIR))) \
|
2016-03-17 19:03:53 +00:00
|
|
|
))
|
|
|
|
|
2016-10-11 07:49:31 +00:00
|
|
|
$(eval $(call SetupCopyFiles, COPY_LIBS_TO_LIB, \
|
2016-03-17 19:03:53 +00:00
|
|
|
SRC := $(LIBS_DIR), \
|
|
|
|
DEST := $(JDK_OUTPUTDIR)/lib, \
|
|
|
|
FILES := $(filter-out $(TO_BIN_FILTER), \
|
2017-10-24 08:41:45 +00:00
|
|
|
$(call FindFiles, $(LIBS_DIR))) \
|
2016-03-17 19:03:53 +00:00
|
|
|
))
|
|
|
|
TARGETS += $(COPY_LIBS_TO_BIN) $(COPY_LIBS_TO_LIB)
|
|
|
|
else
|
|
|
|
$(eval $(call SetupCopyFiles, COPY_LIBS, \
|
|
|
|
SRC := $(LIBS_DIR), \
|
|
|
|
DEST := $(JDK_OUTPUTDIR)/lib, \
|
2017-10-24 08:41:45 +00:00
|
|
|
FILES := $(filter %$(SHARED_LIBRARY_SUFFIX), $(call FindFiles, $(LIBS_DIR))), \
|
2016-03-17 19:03:53 +00:00
|
|
|
))
|
2016-10-05 08:49:21 +00:00
|
|
|
|
2017-09-25 08:32:00 +00:00
|
|
|
# Use relative links if the import dir is inside the OUTPUTDIR, otherwise
|
2016-10-05 08:49:21 +00:00
|
|
|
# copy to avoid having automated systems following symlinks when deleting files,
|
|
|
|
# or risk invalidating the build output from external changes.
|
2017-09-25 08:32:00 +00:00
|
|
|
ifeq ($(filter $(OUTPUTDIR)/%, $(LIBS_DIR)), )
|
2016-10-05 08:49:21 +00:00
|
|
|
LINK_MACRO := install-file
|
2017-01-09 10:55:37 +00:00
|
|
|
LOG_ACTION := Copying
|
2016-10-05 08:49:21 +00:00
|
|
|
else
|
|
|
|
LINK_MACRO := link-file-relative
|
2017-01-09 10:55:37 +00:00
|
|
|
LOG_ACTION := Creating symlink
|
2016-10-05 08:49:21 +00:00
|
|
|
endif
|
|
|
|
$(eval $(call SetupCopyFiles, LINK_LIBS, \
|
|
|
|
SRC := $(LIBS_DIR), \
|
|
|
|
DEST := $(JDK_OUTPUTDIR)/lib, \
|
2017-10-24 08:41:45 +00:00
|
|
|
FILES := $(filter-out %$(SHARED_LIBRARY_SUFFIX), $(call FindFiles, $(LIBS_DIR))), \
|
2016-10-05 08:49:21 +00:00
|
|
|
MACRO := $(LINK_MACRO), \
|
2017-01-09 10:55:37 +00:00
|
|
|
LOG_ACTION := $(LOG_ACTION), \
|
2016-10-05 08:49:21 +00:00
|
|
|
))
|
|
|
|
TARGETS += $(COPY_LIBS) $(LINK_LIBS)
|
2016-03-17 19:03:53 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(CMDS_DIR), )
|
|
|
|
$(eval $(call SetupCopyFiles, COPY_CMDS, \
|
|
|
|
SRC := $(CMDS_DIR), \
|
|
|
|
DEST := $(JDK_OUTPUTDIR)/bin, \
|
2017-10-24 08:41:45 +00:00
|
|
|
FILES := $(call FindFiles, $(CMDS_DIR)), \
|
2016-03-17 19:03:53 +00:00
|
|
|
))
|
|
|
|
TARGETS += $(COPY_CMDS)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(CONF_DIR), )
|
|
|
|
$(eval $(call SetupCopyFiles, COPY_CONF, \
|
|
|
|
SRC := $(CONF_DIR), \
|
|
|
|
DEST := $(JDK_OUTPUTDIR)/lib, \
|
2017-10-24 08:41:45 +00:00
|
|
|
FILES := $(call FindFiles, $(CONF_DIR)), \
|
2016-03-17 19:03:53 +00:00
|
|
|
))
|
|
|
|
TARGETS += $(COPY_CONF)
|
|
|
|
endif
|
|
|
|
|
|
|
|
all: $(TARGETS)
|