< prev index next >
make/common/ZipArchive.gmk
Print this page
rev 52919 : 8189861: Refactor CacheFind
Reviewed-by: sgehwolf
@@ -1,7 +1,7 @@
#
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# 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
@@ -46,10 +46,12 @@
# and not directories.
# EXCLUDE_PATTERNS_$dir - Exclude patterns just like above but specific to one
# src dir
# SUFFIXES
# EXTRA_DEPS
+# FOLLOW_SYMLINKS - Set to explicitly follow symlinks. Affects performance of
+# finding files.
# ZIP_OPTIONS extra options to pass to zip
SetupZipArchive = $(NamedParamsMacroTemplate)
define SetupZipArchiveBody
# To avoid running find over too large sets of files, which causes make to crash
@@ -61,11 +63,17 @@
else
$1_FIND_LIST := $$($1_SRC)
endif
# Find all files in the source tree.
- $1_ALL_SRCS := $$(call not-containing,_the.,$$(call CacheFind,$$($1_FIND_LIST)))
+ # If asked to, follow symlinks in this find since that is what zip does. To do
+ # this, we need to call ShellFindFiles directly.
+ ifeq ($$($1_FOLLOW_SYMLINKS), true)
+ $1_ALL_SRCS := $$(call not-containing,_the.,$$(call ShellFindFiles,$$($1_FIND_LIST), , -L))
+ else
+ $1_ALL_SRCS := $$(call not-containing,_the.,$$(call FindFiles,$$($1_FIND_LIST)))
+ endif
# Filter on suffixes if set
ifneq ($$($1_SUFFIXES),)
$1_ALL_SRCS := $$(filter $$(addprefix %, $$($1_SUFFIXES)), $$($1_ALL_SRCS))
endif
< prev index next >