make/ModuleWrapper.gmk
changeset 41260 4f71f07b30d1
parent 28356 3b985eeacb08
child 42983 7bf4468cdbc4
equal deleted inserted replaced
41257:65477538bec3 41260:4f71f07b30d1
     1 #
     1 #
     2 # Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
     2 # Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
     3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4 #
     4 #
     5 # This code is free software; you can redistribute it and/or modify it
     5 # This code is free software; you can redistribute it and/or modify it
     6 # under the terms of the GNU General Public License version 2 only, as
     6 # under the terms of the GNU General Public License version 2 only, as
     7 # published by the Free Software Foundation.  Oracle designates this
     7 # published by the Free Software Foundation.  Oracle designates this
    43 
    43 
    44 # Setup copy rules from the modules directories to the jdk image directory.
    44 # Setup copy rules from the modules directories to the jdk image directory.
    45 ifeq ($(OPENJDK_TARGET_OS), windows)
    45 ifeq ($(OPENJDK_TARGET_OS), windows)
    46   TO_BIN_FILTER := %$(SHARED_LIBRARY_SUFFIX) %.diz %.pdb %.map
    46   TO_BIN_FILTER := %$(SHARED_LIBRARY_SUFFIX) %.diz %.pdb %.map
    47 
    47 
    48   $(eval $(call SetupCopyFiles,COPY_LIBS_TO_BIN, \
    48   $(eval $(call SetupCopyFiles, COPY_LIBS_TO_BIN, \
    49       SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \
    49       SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \
    50       DEST := $(JDK_OUTPUTDIR)/bin, \
    50       DEST := $(JDK_OUTPUTDIR)/bin, \
    51       FILES := $(filter $(TO_BIN_FILTER), \
    51       FILES := $(filter $(TO_BIN_FILTER), \
    52           $(filter $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)/%, \
    52           $(filter $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)/%, \
    53           $(TARGETS)))))
    53           $(TARGETS))), \
       
    54   ))
    54 
    55 
    55   $(eval $(call SetupCopyFiles,COPY_LIBS_TO_LIB, \
    56   $(eval $(call SetupCopyFiles, COPY_LIBS_TO_LIB, \
    56       SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \
    57       SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \
    57       DEST := $(JDK_OUTPUTDIR)/lib, \
    58       DEST := $(JDK_OUTPUTDIR)/lib, \
    58       FILES := $(filter-out $(TO_BIN_FILTER), \
    59       FILES := $(filter-out $(TO_BIN_FILTER), \
    59           $(filter $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)/%, \
    60           $(filter $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)/%, \
    60           $(TARGETS)))))
    61           $(TARGETS))), \
       
    62   ))
    61 
    63 
    62 else
    64 else
    63   $(eval $(call SetupCopyFiles,COPY_LIBS_TO_LIB, \
    65   $(eval $(call SetupCopyFiles, COPY_LIBS_TO_LIB, \
    64       SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \
    66       SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \
    65       DEST := $(JDK_OUTPUTDIR)/lib, \
    67       DEST := $(JDK_OUTPUTDIR)/lib, \
    66       FILES := $(filter $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)/%, \
    68       FILES := $(filter %$(SHARED_LIBRARY_SUFFIX), \
    67           $(TARGETS))))
    69           $(filter $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)/%, \
       
    70           $(TARGETS))), \
       
    71   ))
       
    72   $(eval $(call SetupCopyFiles, LINK_LIBS_TO_LIB, \
       
    73       SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \
       
    74       DEST := $(JDK_OUTPUTDIR)/lib, \
       
    75       FILES := $(filter-out %$(SHARED_LIBRARY_SUFFIX), \
       
    76           $(filter $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)/%, \
       
    77           $(TARGETS))), \
       
    78       MACRO := link-file-relative, \
       
    79   ))
    68 endif
    80 endif
    69 
    81 
    70 $(eval $(call SetupCopyFiles,COPY_INCLUDE, \
    82 $(eval $(call SetupCopyFiles, COPY_INCLUDE, \
    71     SRC := $(SUPPORT_OUTPUTDIR)/modules_include/$(MODULE), \
    83     SRC := $(SUPPORT_OUTPUTDIR)/modules_include/$(MODULE), \
    72     DEST := $(JDK_OUTPUTDIR)/include, \
    84     DEST := $(JDK_OUTPUTDIR)/include, \
    73     FILES := $(filter $(SUPPORT_OUTPUTDIR)/modules_include/$(MODULE)/%, \
    85     FILES := $(filter $(SUPPORT_OUTPUTDIR)/modules_include/$(MODULE)/%, \
    74           $(TARGETS))))
    86         $(TARGETS)), \
       
    87 ))
    75 
    88 
    76 $(eval $(call SetupCopyFiles,COPY_CMDS, \
    89 $(eval $(call SetupCopyFiles, COPY_CMDS, \
    77     SRC := $(SUPPORT_OUTPUTDIR)/modules_cmds/$(MODULE), \
    90     SRC := $(SUPPORT_OUTPUTDIR)/modules_cmds/$(MODULE), \
    78     DEST := $(JDK_OUTPUTDIR)/bin, \
    91     DEST := $(JDK_OUTPUTDIR)/bin, \
    79     FILES := $(filter $(SUPPORT_OUTPUTDIR)/modules_cmds/$(MODULE)/%, $(TARGETS))))
    92     FILES := $(filter $(SUPPORT_OUTPUTDIR)/modules_cmds/$(MODULE)/%, $(TARGETS)), \
       
    93 ))
    80 
    94 
    81 $(eval $(call SetupCopyFiles,COPY_CONF, \
    95 $(eval $(call SetupCopyFiles, COPY_CONF, \
    82     SRC := $(SUPPORT_OUTPUTDIR)/modules_conf/$(MODULE), \
    96     SRC := $(SUPPORT_OUTPUTDIR)/modules_conf/$(MODULE), \
    83     DEST := $(JDK_OUTPUTDIR)/conf, \
    97     DEST := $(JDK_OUTPUTDIR)/conf, \
    84     FILES := $(filter $(SUPPORT_OUTPUTDIR)/modules_conf/$(MODULE)/%, \
    98     FILES := $(filter $(SUPPORT_OUTPUTDIR)/modules_conf/$(MODULE)/%, \
    85           $(TARGETS))))
    99         $(TARGETS)), \
       
   100 ))
    86 
   101 
    87 all: $(TARGETS) $(COPY_LIBS_TO_BIN) $(COPY_LIBS_TO_LIB) \
   102 all: $(TARGETS) $(COPY_LIBS_TO_BIN) $(COPY_LIBS_TO_LIB) \
    88     $(COPY_INCLUDE) $(COPY_CMDS) $(COPY_CONF)
   103     $(COPY_INCLUDE) $(COPY_CMDS) $(COPY_CONF) $(LINK_LIBS_TO_LIB)