Upgrade to 1.18.1
[platform/upstream/c-ares.git] / aminclude_static.am
1
2 # aminclude_static.am generated automatically by Autoconf
3 # from AX_AM_MACROS_STATIC on Wed Oct 27 08:06:13 CEST 2021
4
5
6 # Code coverage
7 #
8 # Optional:
9 #  - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting.
10 #    Multiple directories may be specified, separated by whitespace.
11 #    (Default: $(top_builddir))
12 #  - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated
13 #    by lcov for code coverage. (Default:
14 #    $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info)
15 #  - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage
16 #    reports to be created. (Default:
17 #    $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage)
18 #  - CODE_COVERAGE_BRANCH_COVERAGE: Set to 1 to enforce branch coverage,
19 #    set to 0 to disable it and leave empty to stay with the default.
20 #    (Default: empty)
21 #  - CODE_COVERAGE_LCOV_SHOPTS_DEFAULT: Extra options shared between both lcov
22 #    instances. (Default: based on )
23 #  - CODE_COVERAGE_LCOV_SHOPTS: Extra options to shared between both lcov
24 #    instances. (Default: )
25 #  - CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH: --gcov-tool pathtogcov
26 #  - CODE_COVERAGE_LCOV_OPTIONS_DEFAULT: Extra options to pass to the
27 #    collecting lcov instance. (Default: )
28 #  - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the collecting lcov
29 #    instance. (Default: )
30 #  - CODE_COVERAGE_LCOV_RMOPTS_DEFAULT: Extra options to pass to the filtering
31 #    lcov instance. (Default: empty)
32 #  - CODE_COVERAGE_LCOV_RMOPTS: Extra options to pass to the filtering lcov
33 #    instance. (Default: )
34 #  - CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT: Extra options to pass to the
35 #    genhtml instance. (Default: based on )
36 #  - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml
37 #    instance. (Default: )
38 #  - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore
39 #
40 # The generated report will be titled using the $(PACKAGE_NAME) and
41 # $(PACKAGE_VERSION). In order to add the current git hash to the title,
42 # use the git-version-gen script, available online.
43 # Optional variables
44 # run only on top dir
45 if CODE_COVERAGE_ENABLED
46  ifeq ($(abs_builddir), $(abs_top_builddir))
47 CODE_COVERAGE_DIRECTORY ?= $(top_builddir)
48 CODE_COVERAGE_OUTPUT_FILE ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info
49 CODE_COVERAGE_OUTPUT_DIRECTORY ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage
50
51 CODE_COVERAGE_BRANCH_COVERAGE ?=
52 CODE_COVERAGE_LCOV_SHOPTS_DEFAULT ?= $(if $(CODE_COVERAGE_BRANCH_COVERAGE),--rc lcov_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE))
53 CODE_COVERAGE_LCOV_SHOPTS ?= $(CODE_COVERAGE_LCOV_SHOPTS_DEFAULT)
54 CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH ?= --gcov-tool "$(GCOV)"
55 CODE_COVERAGE_LCOV_OPTIONS_DEFAULT ?= $(CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH)
56 CODE_COVERAGE_LCOV_OPTIONS ?= $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT)
57 CODE_COVERAGE_LCOV_RMOPTS_DEFAULT ?=
58 CODE_COVERAGE_LCOV_RMOPTS ?= $(CODE_COVERAGE_LCOV_RMOPTS_DEFAULT)
59 CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT ?=$(if $(CODE_COVERAGE_BRANCH_COVERAGE),--rc genhtml_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE))
60 CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT)
61 CODE_COVERAGE_IGNORE_PATTERN ?=
62
63 GITIGNOREFILES := $(GITIGNOREFILES) $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY)
64 code_coverage_v_lcov_cap = $(code_coverage_v_lcov_cap_$(V))
65 code_coverage_v_lcov_cap_ = $(code_coverage_v_lcov_cap_$(AM_DEFAULT_VERBOSITY))
66 code_coverage_v_lcov_cap_0 = @echo "  LCOV   --capture" $(CODE_COVERAGE_OUTPUT_FILE);
67 code_coverage_v_lcov_ign = $(code_coverage_v_lcov_ign_$(V))
68 code_coverage_v_lcov_ign_ = $(code_coverage_v_lcov_ign_$(AM_DEFAULT_VERBOSITY))
69 code_coverage_v_lcov_ign_0 = @echo "  LCOV   --remove /tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN);
70 code_coverage_v_genhtml = $(code_coverage_v_genhtml_$(V))
71 code_coverage_v_genhtml_ = $(code_coverage_v_genhtml_$(AM_DEFAULT_VERBOSITY))
72 code_coverage_v_genhtml_0 = @echo "  GEN   " "$(CODE_COVERAGE_OUTPUT_DIRECTORY)";
73 code_coverage_quiet = $(code_coverage_quiet_$(V))
74 code_coverage_quiet_ = $(code_coverage_quiet_$(AM_DEFAULT_VERBOSITY))
75 code_coverage_quiet_0 = --quiet
76
77 # sanitizes the test-name: replaces with underscores: dashes and dots
78 code_coverage_sanitize = $(subst -,_,$(subst .,_,$(1)))
79
80 # Use recursive makes in order to ignore errors during check
81 check-code-coverage:
82         -$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -k check
83         $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) code-coverage-capture
84
85 # Capture code coverage data
86 code-coverage-capture: code-coverage-capture-hook
87         $(code_coverage_v_lcov_cap)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(call code_coverage_sanitize,$(PACKAGE_NAME)-$(PACKAGE_VERSION))" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_OPTIONS)
88         $(code_coverage_v_lcov_ign)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_RMOPTS)
89         -@rm -f "$(CODE_COVERAGE_OUTPUT_FILE).tmp"
90         $(code_coverage_v_genhtml)LANG=C $(GENHTML) $(code_coverage_quiet) $(addprefix --prefix ,$(CODE_COVERAGE_DIRECTORY)) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS)
91         @echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html"
92
93 code-coverage-clean:
94         -$(LCOV) --directory $(top_builddir) -z
95         -rm -rf "$(CODE_COVERAGE_OUTPUT_FILE)" "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "$(CODE_COVERAGE_OUTPUT_DIRECTORY)"
96         -find . \( -name "*.gcda" -o -name "*.gcno" -o -name "*.gcov" \) -delete
97
98 code-coverage-dist-clean:
99
100 AM_DISTCHECK_CONFIGURE_FLAGS := $(AM_DISTCHECK_CONFIGURE_FLAGS) --disable-code-coverage
101  else # ifneq ($(abs_builddir), $(abs_top_builddir))
102 check-code-coverage:
103
104 code-coverage-capture: code-coverage-capture-hook
105
106 code-coverage-clean:
107
108 code-coverage-dist-clean:
109  endif # ifeq ($(abs_builddir), $(abs_top_builddir))
110 else #! CODE_COVERAGE_ENABLED
111 # Use recursive makes in order to ignore errors during check
112 check-code-coverage:
113         @echo "Need to reconfigure with --enable-code-coverage"
114 # Capture code coverage data
115 code-coverage-capture: code-coverage-capture-hook
116         @echo "Need to reconfigure with --enable-code-coverage"
117
118 code-coverage-clean:
119
120 code-coverage-dist-clean:
121
122 endif #CODE_COVERAGE_ENABLED
123 # Hook rule executed before code-coverage-capture, overridable by the user
124 code-coverage-capture-hook:
125
126 .PHONY: check-code-coverage code-coverage-capture code-coverage-dist-clean code-coverage-clean code-coverage-capture-hook