comparison make/common/TestFilesCompilation.gmk @ 51872:0ce279d8c9cd

8207941: javax/swing/plaf/basic/BasicGraphicsUtils/8132119/bug8132119.java fails on machines without Arial font [testbug] Reviewed-by: goetz, psadhukhan
author mbaesken
date Tue, 24 Jul 2018 09:27:42 +0200
parents 995a5556edfa
children 2e98c7737d8f
comparison
equal deleted inserted replaced
10:bbd70903aa17 11:9cffa96946ae
42 # 42 #
43 # Remaining parameters are named arguments. These include: 43 # Remaining parameters are named arguments. These include:
44 # TYPE Must be either PROGRAM or LIBRARY. 44 # TYPE Must be either PROGRAM or LIBRARY.
45 # SOURCE_DIRS A list of source directories to search 45 # SOURCE_DIRS A list of source directories to search
46 # OUTPUT_DIR Where to put the resulting files 46 # OUTPUT_DIR Where to put the resulting files
47 # EXCLUDE A list of filenames to exclude from compilation
47 SetupTestFilesCompilation = $(NamedParamsMacroTemplate) 48 SetupTestFilesCompilation = $(NamedParamsMacroTemplate)
48 define SetupTestFilesCompilationBody 49 define SetupTestFilesCompilationBody
49 50
50 # Check for duplicate base file names. That would have failed later anyhow, but 51 # Check for duplicate base file names. That would have failed later anyhow, but
51 # this gives a better error message. 52 # this gives a better error message.
74 75
75 # Locate all files with the matching prefix 76 # Locate all files with the matching prefix
76 $1_FILE_LIST := \ 77 $1_FILE_LIST := \
77 $$(shell $$(FIND) $$($1_SOURCE_DIRS) -type f -name "$$($1_PREFIX)*.c") 78 $$(shell $$(FIND) $$($1_SOURCE_DIRS) -type f -name "$$($1_PREFIX)*.c")
78 79
80 $1_EXCLUDE_PATTERN := $$(addprefix %/, $$($1_EXCLUDE))
81 $1_FILTERED_FILE_LIST := $$(filter-out $$($1_EXCLUDE_PATTERN), $$($1_FILE_LIST))
82
79 # Setup a compilation for each and every one of them 83 # Setup a compilation for each and every one of them
80 $$(foreach file, $$($1_FILE_LIST),\ 84 $$(foreach file, $$($1_FILTERED_FILE_LIST),\
81 $$(eval name := $$(strip $$(patsubst $$($1_PREFIX)%, %, $$(basename $$(notdir $$(file)))))) \ 85 $$(eval name := $$(strip $$(basename $$(notdir $$(file))))) \
86 $$(eval unprefixed_name := $$(patsubst $$($1_PREFIX)%, %, $$(name))) \
82 $$(eval $$(call SetupNativeCompilation, BUILD_TEST_$$(name), \ 87 $$(eval $$(call SetupNativeCompilation, BUILD_TEST_$$(name), \
83 NAME := $$(name), \ 88 NAME := $$(unprefixed_name), \
84 TYPE := $$($1_COMPILATION_TYPE), \ 89 TYPE := $$($1_COMPILATION_TYPE), \
85 SRC := $$(patsubst %/,%,$$(dir $$(file))), \ 90 SRC := $$(patsubst %/,%,$$(dir $$(file))), \
86 INCLUDE_FILES := $$(notdir $$(file)), \ 91 INCLUDE_FILES := $$(notdir $$(file)), \
87 OBJECT_DIR := $$($1_OUTPUT_DIR)/support/$$($1_PREFIX)$$(name), \ 92 OBJECT_DIR := $$($1_OUTPUT_DIR)/support/$$(name), \
88 OUTPUT_DIR := $$($1_OUTPUT_DIR)/$$($1_OUTPUT_SUBDIR), \ 93 OUTPUT_DIR := $$($1_OUTPUT_DIR)/$$($1_OUTPUT_SUBDIR), \
89 CFLAGS := $$($1_CFLAGS) $$($1_CFLAGS_$$($1_PREFIX)$$(name)), \ 94 CFLAGS := $$($1_CFLAGS) $$($1_CFLAGS_$$(name)), \
90 LDFLAGS := $$($1_LDFLAGS) $$($1_LDFLAGS_$$($1_PREFIX)$$(name)), \ 95 LDFLAGS := $$($1_LDFLAGS) $$($1_LDFLAGS_$$(name)), \
91 LIBS := $$($1_LIBS_$$($1_PREFIX)$$(name)), \ 96 LIBS := $$($1_LIBS_$$(name)), \
92 OPTIMIZATION := LOW, \ 97 OPTIMIZATION := LOW, \
93 COPY_DEBUG_SYMBOLS := false, \ 98 COPY_DEBUG_SYMBOLS := false, \
94 STRIP_SYMBOLS := false, \ 99 STRIP_SYMBOLS := false, \
95 )) \ 100 )) \
96 $$(eval $1 += $$(BUILD_TEST_$$(name)) ) \ 101 $$(eval $1 += $$(BUILD_TEST_$$(name)) ) \