< prev index next >
make/common/JarArchive.gmk
Print this page
rev 52919 : 8189861: Refactor CacheFind
Reviewed-by: sgehwolf
*** 1,7 ****
#
! # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
# 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
--- 1,7 ----
#
! # Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# 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
*** 120,143 ****
# java compilation, the dependencies need to be found in the filesystem.
$1_ORIG_DEPS := $$($1_DEPENDENCIES)
ifeq ($$($1_DEPENDENCIES), )
# Add all source roots to the find cache since we are likely going to run find
# on these more than once. The cache will only be updated if necessary.
! $$(eval $$(call FillCacheFind, $$($1_FIND_LIST)))
$1_DEPENDENCIES:=$$(filter $$(addprefix %,$$($1_SUFFIXES)), \
! $$(call CacheFind,$$($1_SRCS)))
ifneq (,$$($1_GREP_INCLUDE_PATTERNS))
$1_DEPENDENCIES:=$$(filter $$(addsuffix %,$$($1_GREP_INCLUDE_PATTERNS)),$$($1_DEPENDENCIES))
endif
ifneq (,$$($1_GREP_EXCLUDE_PATTERNS))
$1_DEPENDENCIES:=$$(filter-out $$(addsuffix %,$$($1_GREP_EXCLUDE_PATTERNS)),$$($1_DEPENDENCIES))
endif
# Look for EXTRA_FILES in all SRCS dirs and as absolute paths.
$1_DEPENDENCIES+=$$(wildcard $$(foreach src, $$($1_SRCS), \
$$(addprefix $$(src)/, $$($1_EXTRA_FILES))) $$($1_EXTRA_FILES))
ifeq (,$$($1_SKIP_METAINF))
! $1_DEPENDENCIES+=$$(call CacheFind,$$(wildcard $$(addsuffix /META-INF,$$($1_SRCS))))
endif
endif
# The dependency list should never be empty
ifeq ($$(strip $$($1_DEPENDENCIES)), )
$$(warning No dependencies found for $1)
--- 120,143 ----
# java compilation, the dependencies need to be found in the filesystem.
$1_ORIG_DEPS := $$($1_DEPENDENCIES)
ifeq ($$($1_DEPENDENCIES), )
# Add all source roots to the find cache since we are likely going to run find
# on these more than once. The cache will only be updated if necessary.
! $$(call FillFindCache, $$($1_FIND_LIST))
$1_DEPENDENCIES:=$$(filter $$(addprefix %,$$($1_SUFFIXES)), \
! $$(call FindFiles,$$($1_SRCS)))
ifneq (,$$($1_GREP_INCLUDE_PATTERNS))
$1_DEPENDENCIES:=$$(filter $$(addsuffix %,$$($1_GREP_INCLUDE_PATTERNS)),$$($1_DEPENDENCIES))
endif
ifneq (,$$($1_GREP_EXCLUDE_PATTERNS))
$1_DEPENDENCIES:=$$(filter-out $$(addsuffix %,$$($1_GREP_EXCLUDE_PATTERNS)),$$($1_DEPENDENCIES))
endif
# Look for EXTRA_FILES in all SRCS dirs and as absolute paths.
$1_DEPENDENCIES+=$$(wildcard $$(foreach src, $$($1_SRCS), \
$$(addprefix $$(src)/, $$($1_EXTRA_FILES))) $$($1_EXTRA_FILES))
ifeq (,$$($1_SKIP_METAINF))
! $1_DEPENDENCIES+=$$(call FindFiles,$$(wildcard $$(addsuffix /META-INF,$$($1_SRCS))))
endif
endif
# The dependency list should never be empty
ifeq ($$(strip $$($1_DEPENDENCIES)), )
$$(warning No dependencies found for $1)
< prev index next >