make/common/JavaCompilation.gmk
changeset 54380 e297c7bb6469
parent 52804 28094715ae71
child 58549 9d9317fad3fe
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
   220         $$(error SRC specified to SetupJavaCompilation $1 contains missing directory >$$d<) \
   220         $$(error SRC specified to SetupJavaCompilation $1 contains missing directory >$$d<) \
   221       ) \
   221       ) \
   222     ) \
   222     ) \
   223   )
   223   )
   224   $$(call MakeDir,$$($1_BIN))
   224   $$(call MakeDir,$$($1_BIN))
   225   # Add all source roots to the find cache since we are likely going to run find
   225   # Order src files according to the order of the src dirs. Correct odering is
   226   # on these more than once. The cache will only be updated if necessary.
   226   # needed for correct overriding between different source roots.
   227   $$(eval $$(call FillCacheFind, $$($1_SRC)))
   227   $1_ALL_SRC_RAW := $$(call FindFiles, $$($1_SRC))
   228   # Find all files in the source trees. Preserve order of source roots so that
   228   $1_ALL_SRCS := $$($1_EXTRA_FILES) \
   229   # the first version in case of multiple instances of the same file is selected.
   229       $$(foreach d, $$($1_SRC), $$(filter $$d%, $$($1_ALL_SRC_RAW)))
   230   # CacheFind does not preserve order so need to call it for each root.
   230 
   231   $1_ALL_SRCS += $$($1_EXTRA_FILES) $$(foreach s, $$($1_SRC), $$(call CacheFind, $$s))
       
   232   # Extract the java files.
   231   # Extract the java files.
   233   $1_SRCS := $$(filter %.java, $$($1_ALL_SRCS))
   232   $1_SRCS := $$(filter %.java, $$($1_ALL_SRCS))
   234 
   233 
   235   # Translate include/exclude into patterns
   234   # Translate include/exclude into patterns
   236   ifneq ($$($1_EXCLUDE_FILES), )
   235   ifneq ($$($1_EXCLUDE_FILES), )