autoconfiscate.diff 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427
  1. diff --git a/Demo/Makefile.am b/Demo/Makefile.am
  2. new file mode 100644
  3. --- /dev/null
  4. +++ b/Demo/Makefile.am
  5. @@ -0,0 +1,30 @@
  6. +AM_CPPFLAGS = -I$(top_srcdir)/Include $(SUITESPARSECONFIG_CFLAGS)
  7. +LDADD = $(top_builddir)/Source/libccolamd.la
  8. +
  9. +EXTRA_DIST = \
  10. + ccolamd_example.out \
  11. + ccolamd_l_example.out
  12. +
  13. +# Disable the .out implicit pattern rule. Prevents GNU make from
  14. +# adding bogus dependencies for the .out files listed above.
  15. +%.out: %
  16. +
  17. +check_PROGRAMS = \
  18. + ccolamd_example \
  19. + ccolamd_l_example
  20. +
  21. +ccolamd_example_SOURCES = ccolamd_example.c
  22. +ccolamd_l_example_SOURCES = ccolamd_l_example.c
  23. +
  24. +check-local: $(check_PROGRAMS) $(check_PROGRAMS:=.out)
  25. + @for i in $(check_PROGRAMS); do \
  26. + echo "Testing $$i"; \
  27. + ./$$i$(EXEEXT) > my_$$i.out; \
  28. + if diff -u $(srcdir)/$$i.out my_$$i.out; then \
  29. + echo "Test $$i PASSED."; \
  30. + else \
  31. + echo "Test $$i FAILED."; \
  32. + fi; \
  33. + done
  34. +
  35. +CLEANFILES = my_*.out
  36. diff --git a/Include/Makefile.am b/Include/Makefile.am
  37. new file mode 100644
  38. --- /dev/null
  39. +++ b/Include/Makefile.am
  40. @@ -0,0 +1 @@
  41. +pkginclude_HEADERS = ccolamd.h
  42. diff --git a/Makefile.am b/Makefile.am
  43. new file mode 100644
  44. --- /dev/null
  45. +++ b/Makefile.am
  46. @@ -0,0 +1,9 @@
  47. +ACLOCAL_AMFLAGS = -I m4
  48. +
  49. +SUBDIRS = Include Source Demo
  50. +EXTRA_DIST = README.txt Doc/ChangeLog Doc/License.txt Doc/lesser.txt
  51. +
  52. +pkgconfig_DATA = ccolamd.pc
  53. +
  54. +CODE_COVERAGE_BRANCH_COVERAGE = 1
  55. +@CODE_COVERAGE_RULES@
  56. diff --git a/Source/Makefile.am b/Source/Makefile.am
  57. new file mode 100644
  58. --- /dev/null
  59. +++ b/Source/Makefile.am
  60. @@ -0,0 +1,21 @@
  61. +AM_CPPFLAGS = -I$(top_srcdir)/Include $(SUITESPARSECONFIG_CFLAGS)
  62. +
  63. +CCOLAMDSRC = \
  64. + ccolamd.c
  65. +
  66. +lib_LTLIBRARIES = libccolamd.la
  67. +noinst_LTLIBRARIES = libccolamdl.la libccolamdi.la
  68. +
  69. +libccolamdi_la_SOURCES = $(CCOLAMDSRC)
  70. +libccolamdi_la_LIBADD = $(SUITESPARSECONFIG_LIBS) -lm $(CODE_COVERAGE_LIBS)
  71. +libccolamdi_la_CPPFLAGS = $(AM_CPPFLAGS) $(CODE_COVERAGE_CPPFLAGS)
  72. +libccolamdi_la_CFLAGS = $(AM_CFLAGS) $(CODE_COVERAGE_CFLAGS)
  73. +
  74. +libccolamdl_la_SOURCES = $(CCOLAMDSRC)
  75. +libccolamdl_la_LIBADD = $(SUITESPARSECONFIG_LIBS) -lm $(CODE_COVERAGE_LIBS)
  76. +libccolamdl_la_CPPFLAGS = $(AM_CPPFLAGS) $(CODE_COVERAGE_CPPFLAGS) -DDLONG
  77. +libccolamdl_la_CFLAGS = $(AM_CFLAGS) $(CODE_COVERAGE_CFLAGS)
  78. +
  79. +libccolamd_la_SOURCES =
  80. +libccolamd_la_LIBADD = libccolamdi.la libccolamdl.la
  81. +libccolamd_la_LDFLAGS = -no-undefined -release $(PACKAGE_VERSION)
  82. diff --git a/ccolamd.pc.in b/ccolamd.pc.in
  83. new file mode 100644
  84. --- /dev/null
  85. +++ b/ccolamd.pc.in
  86. @@ -0,0 +1,13 @@
  87. +prefix=@prefix@
  88. +exec_prefix=@exec_prefix@
  89. +libdir=@libdir@
  90. +includedir=@includedir@
  91. +
  92. +Name: @PACKAGE_NAME@
  93. +Description: Constrained column approximate minimum degree ordering
  94. +Version: @PACKAGE_VERSION@
  95. +URL: @PACKAGE_URL@
  96. +Requires.private: suitesparseconfig
  97. +Libs: -L${libdir} -lccolamd
  98. +Libs.private: -lm
  99. +Cflags: -I${includedir}/ccolamd
  100. diff --git a/configure.ac b/configure.ac
  101. new file mode 100644
  102. --- /dev/null
  103. +++ b/configure.ac
  104. @@ -0,0 +1,46 @@
  105. +# -*- Autoconf -*-
  106. +# Process this file with autoconf to produce a configure script.
  107. +
  108. +AC_PREREQ([2.69])
  109. +AC_INIT([CCOLAMD],[2.9.6],[https://github.com/DrTimothyAldenDavis/SuiteSparse],[ccolamd],[http://www.suitesparse.com/])
  110. +AC_CONFIG_SRCDIR([Source/ccolamd.c])
  111. +AC_CONFIG_AUX_DIR([build-aux])
  112. +AC_CONFIG_MACRO_DIR([m4])
  113. +AC_CONFIG_HEADERS([config.h])
  114. +AM_INIT_AUTOMAKE([foreign])
  115. +AM_SILENT_RULES([yes])
  116. +LT_INIT([disable-static])
  117. +
  118. +# Checks for programs.
  119. +PKG_PROG_PKG_CONFIG
  120. +AC_PROG_INSTALL
  121. +AC_PROG_CC
  122. +AX_CODE_COVERAGE
  123. +
  124. +AS_VAR_SET([LIBS_SAVED], [$LIBS])
  125. +
  126. +# Checks for libraries.
  127. +AC_CHECK_LIB([m], [sqrt])
  128. +
  129. +PKG_CHECK_MODULES([SUITESPARSECONFIG], [suitesparseconfig])
  130. +
  131. +# Checks for header files.
  132. +AC_CHECK_HEADERS([limits.h stdlib.h])
  133. +
  134. +# Checks for typedefs, structures, and compiler characteristics.
  135. +AC_TYPE_SIZE_T
  136. +
  137. +# Checks for library functions.
  138. +AC_CHECK_FUNCS([sqrt])
  139. +
  140. +AS_VAR_SET([LIBS], [$LIBS_SAVED])
  141. +
  142. +m4_ifdef([PKG_INSTALLDIR], [PKG_INSTALLDIR], [AC_SUBST([pkgconfigdir], [${libdir}/pkgconfig])])
  143. +AC_CONFIG_FILES([
  144. + ccolamd.pc
  145. + Makefile
  146. + Demo/Makefile
  147. + Include/Makefile
  148. + Source/Makefile
  149. +])
  150. +AC_OUTPUT
  151. diff --git a/m4/ax_code_coverage.m4 b/m4/ax_code_coverage.m4
  152. new file mode 100644
  153. --- /dev/null
  154. +++ b/m4/ax_code_coverage.m4
  155. @@ -0,0 +1,271 @@
  156. +# ===========================================================================
  157. +# https://www.gnu.org/software/autoconf-archive/ax_code_coverage.html
  158. +# ===========================================================================
  159. +#
  160. +# SYNOPSIS
  161. +#
  162. +# AX_CODE_COVERAGE()
  163. +#
  164. +# DESCRIPTION
  165. +#
  166. +# Defines CODE_COVERAGE_CPPFLAGS, CODE_COVERAGE_CFLAGS,
  167. +# CODE_COVERAGE_CXXFLAGS and CODE_COVERAGE_LIBS which should be included
  168. +# in the CPPFLAGS, CFLAGS CXXFLAGS and LIBS/LIBADD variables of every
  169. +# build target (program or library) which should be built with code
  170. +# coverage support. Also defines CODE_COVERAGE_RULES which should be
  171. +# substituted in your Makefile; and $enable_code_coverage which can be
  172. +# used in subsequent configure output. CODE_COVERAGE_ENABLED is defined
  173. +# and substituted, and corresponds to the value of the
  174. +# --enable-code-coverage option, which defaults to being disabled.
  175. +#
  176. +# Test also for gcov program and create GCOV variable that could be
  177. +# substituted.
  178. +#
  179. +# Note that all optimization flags in CFLAGS must be disabled when code
  180. +# coverage is enabled.
  181. +#
  182. +# Usage example:
  183. +#
  184. +# configure.ac:
  185. +#
  186. +# AX_CODE_COVERAGE
  187. +#
  188. +# Makefile.am:
  189. +#
  190. +# @CODE_COVERAGE_RULES@
  191. +# my_program_LIBS = ... $(CODE_COVERAGE_LIBS) ...
  192. +# my_program_CPPFLAGS = ... $(CODE_COVERAGE_CPPFLAGS) ...
  193. +# my_program_CFLAGS = ... $(CODE_COVERAGE_CFLAGS) ...
  194. +# my_program_CXXFLAGS = ... $(CODE_COVERAGE_CXXFLAGS) ...
  195. +#
  196. +# This results in a "check-code-coverage" rule being added to any
  197. +# Makefile.am which includes "@CODE_COVERAGE_RULES@" (assuming the module
  198. +# has been configured with --enable-code-coverage). Running `make
  199. +# check-code-coverage` in that directory will run the module's test suite
  200. +# (`make check`) and build a code coverage report detailing the code which
  201. +# was touched, then print the URI for the report.
  202. +#
  203. +# In earlier versions of this macro, CODE_COVERAGE_LDFLAGS was defined
  204. +# instead of CODE_COVERAGE_LIBS. They are both still defined, but use of
  205. +# CODE_COVERAGE_LIBS is preferred for clarity; CODE_COVERAGE_LDFLAGS is
  206. +# deprecated. They have the same value.
  207. +#
  208. +# This code was derived from Makefile.decl in GLib, originally licenced
  209. +# under LGPLv2.1+.
  210. +#
  211. +# LICENSE
  212. +#
  213. +# Copyright (c) 2012, 2016 Philip Withnall
  214. +# Copyright (c) 2012 Xan Lopez
  215. +# Copyright (c) 2012 Christian Persch
  216. +# Copyright (c) 2012 Paolo Borelli
  217. +# Copyright (c) 2012 Dan Winship
  218. +# Copyright (c) 2015 Bastien ROUCARIES
  219. +#
  220. +# This library is free software; you can redistribute it and/or modify it
  221. +# under the terms of the GNU Lesser General Public License as published by
  222. +# the Free Software Foundation; either version 2.1 of the License, or (at
  223. +# your option) any later version.
  224. +#
  225. +# This library is distributed in the hope that it will be useful, but
  226. +# WITHOUT ANY WARRANTY; without even the implied warranty of
  227. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
  228. +# General Public License for more details.
  229. +#
  230. +# You should have received a copy of the GNU Lesser General Public License
  231. +# along with this program. If not, see <https://www.gnu.org/licenses/>.
  232. +
  233. +#serial 27
  234. +
  235. +AC_DEFUN([_AX_CODE_COVERAGE_ENABLED],[
  236. + # check for gcov
  237. + AC_CHECK_TOOL([GCOV],
  238. + [$_AX_CODE_COVERAGE_GCOV_PROG_WITH],
  239. + [:])
  240. + AS_IF([test "X$GCOV" = "X:"],
  241. + [AC_MSG_ERROR([gcov is needed to do coverage])])
  242. + AC_SUBST([GCOV])
  243. +
  244. + dnl Check if gcc is being used
  245. + AS_IF([ test "$GCC" = "no" ], [
  246. + AC_MSG_ERROR([not compiling with gcc, which is required for gcov code coverage])
  247. + ])
  248. +
  249. + AC_CHECK_PROG([LCOV], [lcov], [lcov])
  250. + AC_CHECK_PROG([GENHTML], [genhtml], [genhtml])
  251. +
  252. + AS_IF([ test x"$LCOV" = x ], [
  253. + AC_MSG_ERROR([To enable code coverage reporting you must have lcov installed])
  254. + ])
  255. +
  256. + AS_IF([ test x"$GENHTML" = x ], [
  257. + AC_MSG_ERROR([Could not find genhtml from the lcov package])
  258. + ])
  259. +
  260. + dnl Build the code coverage flags
  261. + dnl Define CODE_COVERAGE_LDFLAGS for backwards compatibility
  262. + CODE_COVERAGE_CPPFLAGS="-DNDEBUG"
  263. + CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage"
  264. + CODE_COVERAGE_CXXFLAGS="-O0 -g -fprofile-arcs -ftest-coverage"
  265. + CODE_COVERAGE_LIBS="-lgcov"
  266. + CODE_COVERAGE_LDFLAGS="$CODE_COVERAGE_LIBS"
  267. +
  268. + AC_SUBST([CODE_COVERAGE_CPPFLAGS])
  269. + AC_SUBST([CODE_COVERAGE_CFLAGS])
  270. + AC_SUBST([CODE_COVERAGE_CXXFLAGS])
  271. + AC_SUBST([CODE_COVERAGE_LIBS])
  272. + AC_SUBST([CODE_COVERAGE_LDFLAGS])
  273. +
  274. + [CODE_COVERAGE_RULES_CHECK='
  275. + -$(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) -k check
  276. + $(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) code-coverage-capture
  277. +']
  278. + [CODE_COVERAGE_RULES_CAPTURE='
  279. + $(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)
  280. + $(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)
  281. + -@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp
  282. + $(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)
  283. + @echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html"
  284. +']
  285. + [CODE_COVERAGE_RULES_CLEAN='
  286. +clean: code-coverage-clean
  287. +distclean: code-coverage-clean
  288. +code-coverage-clean:
  289. + -$(LCOV) --directory $(top_builddir) -z
  290. + -rm -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY)
  291. + -find . \( -name "*.gcda" -o -name "*.gcno" -o -name "*.gcov" \) -delete
  292. +']
  293. +])
  294. +
  295. +AC_DEFUN([_AX_CODE_COVERAGE_DISABLED],[
  296. + [CODE_COVERAGE_RULES_CHECK='
  297. + @echo "Need to reconfigure with --enable-code-coverage"
  298. + ']
  299. + CODE_COVERAGE_RULES_CAPTURE="$CODE_COVERAGE_RULES_CHECK"
  300. + CODE_COVERAGE_RULES_CLEAN=''
  301. +])
  302. +
  303. +AC_DEFUN([AX_CODE_COVERAGE],[
  304. + dnl Check for --enable-code-coverage
  305. +
  306. + # allow to override gcov location
  307. + AC_ARG_WITH([gcov],
  308. + [AS_HELP_STRING([--with-gcov[=GCOV]], [use given GCOV for coverage (GCOV=gcov).])],
  309. + [_AX_CODE_COVERAGE_GCOV_PROG_WITH=$with_gcov],
  310. + [_AX_CODE_COVERAGE_GCOV_PROG_WITH=gcov])
  311. +
  312. + AC_MSG_CHECKING([whether to build with code coverage support])
  313. + AC_ARG_ENABLE([code-coverage],
  314. + AS_HELP_STRING([--enable-code-coverage],
  315. + [Whether to enable code coverage support]),,
  316. + enable_code_coverage=no)
  317. +
  318. + AM_CONDITIONAL([CODE_COVERAGE_ENABLED], [test "x$enable_code_coverage" = xyes])
  319. + AC_SUBST([CODE_COVERAGE_ENABLED], [$enable_code_coverage])
  320. + AC_MSG_RESULT($enable_code_coverage)
  321. +
  322. + AS_IF([ test "x$enable_code_coverage" = xyes ], [
  323. + _AX_CODE_COVERAGE_ENABLED
  324. + ], [
  325. + _AX_CODE_COVERAGE_DISABLED
  326. + ])
  327. +
  328. +[CODE_COVERAGE_RULES='
  329. +# Code coverage
  330. +#
  331. +# Optional:
  332. +# - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting.
  333. +# Multiple directories may be specified, separated by whitespace.
  334. +# (Default: $(top_builddir))
  335. +# - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated
  336. +# by lcov for code coverage. (Default:
  337. +# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info)
  338. +# - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage
  339. +# reports to be created. (Default:
  340. +# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage)
  341. +# - CODE_COVERAGE_BRANCH_COVERAGE: Set to 1 to enforce branch coverage,
  342. +# set to 0 to disable it and leave empty to stay with the default.
  343. +# (Default: empty)
  344. +# - CODE_COVERAGE_LCOV_SHOPTS_DEFAULT: Extra options shared between both lcov
  345. +# instances. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE)
  346. +# - CODE_COVERAGE_LCOV_SHOPTS: Extra options to shared between both lcov
  347. +# instances. (Default: $CODE_COVERAGE_LCOV_SHOPTS_DEFAULT)
  348. +# - CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH: --gcov-tool pathtogcov
  349. +# - CODE_COVERAGE_LCOV_OPTIONS_DEFAULT: Extra options to pass to the
  350. +# collecting lcov instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH)
  351. +# - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the collecting lcov
  352. +# instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_DEFAULT)
  353. +# - CODE_COVERAGE_LCOV_RMOPTS_DEFAULT: Extra options to pass to the filtering
  354. +# lcov instance. (Default: empty)
  355. +# - CODE_COVERAGE_LCOV_RMOPTS: Extra options to pass to the filtering lcov
  356. +# instance. (Default: $CODE_COVERAGE_LCOV_RMOPTS_DEFAULT)
  357. +# - CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT: Extra options to pass to the
  358. +# genhtml instance. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE)
  359. +# - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml
  360. +# instance. (Default: $CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT)
  361. +# - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore
  362. +#
  363. +# The generated report will be titled using the $(PACKAGE_NAME) and
  364. +# $(PACKAGE_VERSION). In order to add the current git hash to the title,
  365. +# use the git-version-gen script, available online.
  366. +
  367. +# Optional variables
  368. +CODE_COVERAGE_DIRECTORY ?= $(top_builddir)
  369. +CODE_COVERAGE_OUTPUT_FILE ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info
  370. +CODE_COVERAGE_OUTPUT_DIRECTORY ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage
  371. +CODE_COVERAGE_BRANCH_COVERAGE ?=
  372. +CODE_COVERAGE_LCOV_SHOPTS_DEFAULT ?= $(if $(CODE_COVERAGE_BRANCH_COVERAGE),\
  373. +--rc lcov_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE))
  374. +CODE_COVERAGE_LCOV_SHOPTS ?= $(CODE_COVERAGE_LCOV_SHOPTS_DEFAULT)
  375. +CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH ?= --gcov-tool "$(GCOV)"
  376. +CODE_COVERAGE_LCOV_OPTIONS_DEFAULT ?= $(CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH)
  377. +CODE_COVERAGE_LCOV_OPTIONS ?= $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT)
  378. +CODE_COVERAGE_LCOV_RMOPTS_DEFAULT ?=
  379. +CODE_COVERAGE_LCOV_RMOPTS ?= $(CODE_COVERAGE_LCOV_RMOPTS_DEFAULT)
  380. +CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT ?=\
  381. +$(if $(CODE_COVERAGE_BRANCH_COVERAGE),\
  382. +--rc genhtml_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE))
  383. +CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT)
  384. +CODE_COVERAGE_IGNORE_PATTERN ?=
  385. +
  386. +GITIGNOREFILES ?=
  387. +GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY)
  388. +
  389. +code_coverage_v_lcov_cap = $(code_coverage_v_lcov_cap_$(V))
  390. +code_coverage_v_lcov_cap_ = $(code_coverage_v_lcov_cap_$(AM_DEFAULT_VERBOSITY))
  391. +code_coverage_v_lcov_cap_0 = @echo " LCOV --capture"\
  392. + $(CODE_COVERAGE_OUTPUT_FILE);
  393. +code_coverage_v_lcov_ign = $(code_coverage_v_lcov_ign_$(V))
  394. +code_coverage_v_lcov_ign_ = $(code_coverage_v_lcov_ign_$(AM_DEFAULT_VERBOSITY))
  395. +code_coverage_v_lcov_ign_0 = @echo " LCOV --remove /tmp/*"\
  396. + $(CODE_COVERAGE_IGNORE_PATTERN);
  397. +code_coverage_v_genhtml = $(code_coverage_v_genhtml_$(V))
  398. +code_coverage_v_genhtml_ = $(code_coverage_v_genhtml_$(AM_DEFAULT_VERBOSITY))
  399. +code_coverage_v_genhtml_0 = @echo " GEN " $(CODE_COVERAGE_OUTPUT_DIRECTORY);
  400. +code_coverage_quiet = $(code_coverage_quiet_$(V))
  401. +code_coverage_quiet_ = $(code_coverage_quiet_$(AM_DEFAULT_VERBOSITY))
  402. +code_coverage_quiet_0 = --quiet
  403. +
  404. +# sanitizes the test-name: replaces with underscores: dashes and dots
  405. +code_coverage_sanitize = $(subst -,_,$(subst .,_,$(1)))
  406. +
  407. +# Use recursive makes in order to ignore errors during check
  408. +check-code-coverage:'"$CODE_COVERAGE_RULES_CHECK"'
  409. +
  410. +# Capture code coverage data
  411. +code-coverage-capture: code-coverage-capture-hook'"$CODE_COVERAGE_RULES_CAPTURE"'
  412. +
  413. +# Hook rule executed before code-coverage-capture, overridable by the user
  414. +code-coverage-capture-hook:
  415. +
  416. +'"$CODE_COVERAGE_RULES_CLEAN"'
  417. +
  418. +A''M_DISTCHECK_CONFIGURE_FLAGS ?=
  419. +A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage
  420. +
  421. +.PHONY: check-code-coverage code-coverage-capture code-coverage-capture-hook code-coverage-clean
  422. +']
  423. +
  424. + AC_SUBST([CODE_COVERAGE_RULES])
  425. + m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([CODE_COVERAGE_RULES])])
  426. +])