make/common/JarArchive.gmk
changeset 54380 e297c7bb6469
parent 52804 28094715ae71
equal deleted inserted replaced
54379:40a7e2fc9beb 54380:e297c7bb6469
     1 #
     1 #
     2 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
     2 # Copyright (c) 2011, 2019, 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
   122   # java compilation, the dependencies need to be found in the filesystem.
   122   # java compilation, the dependencies need to be found in the filesystem.
   123   $1_ORIG_DEPS := $$($1_DEPENDENCIES)
   123   $1_ORIG_DEPS := $$($1_DEPENDENCIES)
   124   ifeq ($$($1_DEPENDENCIES), )
   124   ifeq ($$($1_DEPENDENCIES), )
   125     # Add all source roots to the find cache since we are likely going to run find
   125     # Add all source roots to the find cache since we are likely going to run find
   126     # on these more than once. The cache will only be updated if necessary.
   126     # on these more than once. The cache will only be updated if necessary.
   127     $$(eval $$(call FillCacheFind, $$($1_FIND_LIST)))
   127     $$(call FillFindCache, $$($1_FIND_LIST))
   128     $1_DEPENDENCIES:=$$(filter $$(addprefix %,$$($1_SUFFIXES)), \
   128     $1_DEPENDENCIES:=$$(filter $$(addprefix %,$$($1_SUFFIXES)), \
   129         $$(call CacheFind,$$($1_SRCS)))
   129         $$(call FindFiles,$$($1_SRCS)))
   130     ifneq (,$$($1_GREP_INCLUDE_PATTERNS))
   130     ifneq (,$$($1_GREP_INCLUDE_PATTERNS))
   131       $1_DEPENDENCIES:=$$(filter $$(addsuffix %,$$($1_GREP_INCLUDE_PATTERNS)),$$($1_DEPENDENCIES))
   131       $1_DEPENDENCIES:=$$(filter $$(addsuffix %,$$($1_GREP_INCLUDE_PATTERNS)),$$($1_DEPENDENCIES))
   132     endif
   132     endif
   133     ifneq (,$$($1_GREP_EXCLUDE_PATTERNS))
   133     ifneq (,$$($1_GREP_EXCLUDE_PATTERNS))
   134       $1_DEPENDENCIES:=$$(filter-out $$(addsuffix %,$$($1_GREP_EXCLUDE_PATTERNS)),$$($1_DEPENDENCIES))
   134       $1_DEPENDENCIES:=$$(filter-out $$(addsuffix %,$$($1_GREP_EXCLUDE_PATTERNS)),$$($1_DEPENDENCIES))
   135     endif
   135     endif
   136     # Look for EXTRA_FILES in all SRCS dirs and as absolute paths.
   136     # Look for EXTRA_FILES in all SRCS dirs and as absolute paths.
   137     $1_DEPENDENCIES+=$$(wildcard $$(foreach src, $$($1_SRCS), \
   137     $1_DEPENDENCIES+=$$(wildcard $$(foreach src, $$($1_SRCS), \
   138         $$(addprefix $$(src)/, $$($1_EXTRA_FILES))) $$($1_EXTRA_FILES))
   138         $$(addprefix $$(src)/, $$($1_EXTRA_FILES))) $$($1_EXTRA_FILES))
   139     ifeq (,$$($1_SKIP_METAINF))
   139     ifeq (,$$($1_SKIP_METAINF))
   140       $1_DEPENDENCIES+=$$(call CacheFind,$$(wildcard $$(addsuffix /META-INF,$$($1_SRCS))))
   140       $1_DEPENDENCIES+=$$(call FindFiles,$$(wildcard $$(addsuffix /META-INF,$$($1_SRCS))))
   141     endif
   141     endif
   142   endif
   142   endif
   143   # The dependency list should never be empty
   143   # The dependency list should never be empty
   144   ifeq ($$(strip $$($1_DEPENDENCIES)), )
   144   ifeq ($$(strip $$($1_DEPENDENCIES)), )
   145     $$(warning No dependencies found for $1)
   145     $$(warning No dependencies found for $1)