Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 1 | ## Process this file with automake to produce Makefile.in. |
| 2 | |
| 3 | AUTOMAKE_OPTIONS = subdir-objects |
| 4 | ACLOCAL_AMFLAGS = -I m4 |
Elliott Hughes | 9bc971b | 2018-07-27 13:23:14 -0700 | [diff] [blame] | 5 | |
| 6 | ## This seems to have become necessary for building in non-source directory. |
| 7 | |
| 8 | AM_CPPFLAGS="-I$(srcdir)/src" |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 9 | |
| 10 | ## Specify the documentation files that are distributed. |
| 11 | |
| 12 | dist_doc_DATA = \ |
| 13 | AUTHORS \ |
| 14 | COPYING \ |
| 15 | ChangeLog \ |
| 16 | LICENCE \ |
| 17 | NEWS \ |
| 18 | README \ |
| 19 | doc/pcre2.txt \ |
| 20 | doc/pcre2-config.txt \ |
| 21 | doc/pcre2grep.txt \ |
| 22 | doc/pcre2test.txt |
| 23 | |
| 24 | dist_html_DATA = \ |
| 25 | doc/html/NON-AUTOTOOLS-BUILD.txt \ |
| 26 | doc/html/README.txt \ |
| 27 | doc/html/index.html \ |
| 28 | doc/html/pcre2-config.html \ |
| 29 | doc/html/pcre2.html \ |
| 30 | doc/html/pcre2_callout_enumerate.html \ |
Janis Danisevskis | 8b979b2 | 2016-08-15 16:09:16 +0100 | [diff] [blame] | 31 | doc/html/pcre2_code_copy.html \ |
Elliott Hughes | 9bc971b | 2018-07-27 13:23:14 -0700 | [diff] [blame] | 32 | doc/html/pcre2_code_copy_with_tables.html \ |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 33 | doc/html/pcre2_code_free.html \ |
| 34 | doc/html/pcre2_compile.html \ |
| 35 | doc/html/pcre2_compile_context_copy.html \ |
| 36 | doc/html/pcre2_compile_context_create.html \ |
| 37 | doc/html/pcre2_compile_context_free.html \ |
| 38 | doc/html/pcre2_config.html \ |
Elliott Hughes | 9bc971b | 2018-07-27 13:23:14 -0700 | [diff] [blame] | 39 | doc/html/pcre2_convert_context_copy.html \ |
| 40 | doc/html/pcre2_convert_context_create.html \ |
| 41 | doc/html/pcre2_convert_context_free.html \ |
| 42 | doc/html/pcre2_converted_pattern_free.html \ |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 43 | doc/html/pcre2_dfa_match.html \ |
| 44 | doc/html/pcre2_general_context_copy.html \ |
| 45 | doc/html/pcre2_general_context_create.html \ |
| 46 | doc/html/pcre2_general_context_free.html \ |
| 47 | doc/html/pcre2_get_error_message.html \ |
| 48 | doc/html/pcre2_get_mark.html \ |
| 49 | doc/html/pcre2_get_ovector_count.html \ |
| 50 | doc/html/pcre2_get_ovector_pointer.html \ |
| 51 | doc/html/pcre2_get_startchar.html \ |
| 52 | doc/html/pcre2_jit_compile.html \ |
| 53 | doc/html/pcre2_jit_free_unused_memory.html \ |
| 54 | doc/html/pcre2_jit_match.html \ |
| 55 | doc/html/pcre2_jit_stack_assign.html \ |
| 56 | doc/html/pcre2_jit_stack_create.html \ |
| 57 | doc/html/pcre2_jit_stack_free.html \ |
| 58 | doc/html/pcre2_maketables.html \ |
| 59 | doc/html/pcre2_match.html \ |
| 60 | doc/html/pcre2_match_context_copy.html \ |
| 61 | doc/html/pcre2_match_context_create.html \ |
| 62 | doc/html/pcre2_match_context_free.html \ |
| 63 | doc/html/pcre2_match_data_create.html \ |
| 64 | doc/html/pcre2_match_data_create_from_pattern.html \ |
| 65 | doc/html/pcre2_match_data_free.html \ |
Elliott Hughes | 9bc971b | 2018-07-27 13:23:14 -0700 | [diff] [blame] | 66 | doc/html/pcre2_pattern_convert.html \ |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 67 | doc/html/pcre2_pattern_info.html \ |
| 68 | doc/html/pcre2_serialize_decode.html \ |
| 69 | doc/html/pcre2_serialize_encode.html \ |
| 70 | doc/html/pcre2_serialize_free.html \ |
| 71 | doc/html/pcre2_serialize_get_number_of_codes.html \ |
| 72 | doc/html/pcre2_set_bsr.html \ |
| 73 | doc/html/pcre2_set_callout.html \ |
| 74 | doc/html/pcre2_set_character_tables.html \ |
Elliott Hughes | 9bc971b | 2018-07-27 13:23:14 -0700 | [diff] [blame] | 75 | doc/html/pcre2_set_compile_extra_options.html \ |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 76 | doc/html/pcre2_set_compile_recursion_guard.html \ |
Elliott Hughes | 9bc971b | 2018-07-27 13:23:14 -0700 | [diff] [blame] | 77 | doc/html/pcre2_set_depth_limit.html \ |
| 78 | doc/html/pcre2_set_glob_escape.html \ |
| 79 | doc/html/pcre2_set_glob_separator.html \ |
| 80 | doc/html/pcre2_set_heap_limit.html \ |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 81 | doc/html/pcre2_set_match_limit.html \ |
Elliott Hughes | 9bc971b | 2018-07-27 13:23:14 -0700 | [diff] [blame] | 82 | doc/html/pcre2_set_max_pattern_length.html \ |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 83 | doc/html/pcre2_set_offset_limit.html \ |
| 84 | doc/html/pcre2_set_newline.html \ |
| 85 | doc/html/pcre2_set_parens_nest_limit.html \ |
| 86 | doc/html/pcre2_set_recursion_limit.html \ |
| 87 | doc/html/pcre2_set_recursion_memory_management.html \ |
Elliott Hughes | 0c26e19 | 2019-08-07 12:24:46 -0700 | [diff] [blame] | 88 | doc/html/pcre2_set_substitute_callout.html \ |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 89 | doc/html/pcre2_substitute.html \ |
| 90 | doc/html/pcre2_substring_copy_byname.html \ |
| 91 | doc/html/pcre2_substring_copy_bynumber.html \ |
| 92 | doc/html/pcre2_substring_free.html \ |
| 93 | doc/html/pcre2_substring_get_byname.html \ |
| 94 | doc/html/pcre2_substring_get_bynumber.html \ |
| 95 | doc/html/pcre2_substring_length_byname.html \ |
| 96 | doc/html/pcre2_substring_length_bynumber.html \ |
| 97 | doc/html/pcre2_substring_list_free.html \ |
| 98 | doc/html/pcre2_substring_list_get.html \ |
| 99 | doc/html/pcre2_substring_nametable_scan.html \ |
| 100 | doc/html/pcre2_substring_number_from_name.html \ |
| 101 | doc/html/pcre2api.html \ |
| 102 | doc/html/pcre2build.html \ |
| 103 | doc/html/pcre2callout.html \ |
| 104 | doc/html/pcre2compat.html \ |
Elliott Hughes | 9bc971b | 2018-07-27 13:23:14 -0700 | [diff] [blame] | 105 | doc/html/pcre2convert.html \ |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 106 | doc/html/pcre2demo.html \ |
| 107 | doc/html/pcre2grep.html \ |
| 108 | doc/html/pcre2jit.html \ |
| 109 | doc/html/pcre2limits.html \ |
| 110 | doc/html/pcre2matching.html \ |
| 111 | doc/html/pcre2partial.html \ |
| 112 | doc/html/pcre2pattern.html \ |
| 113 | doc/html/pcre2perform.html \ |
| 114 | doc/html/pcre2posix.html \ |
| 115 | doc/html/pcre2sample.html \ |
| 116 | doc/html/pcre2serialize.html \ |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 117 | doc/html/pcre2syntax.html \ |
| 118 | doc/html/pcre2test.html \ |
| 119 | doc/html/pcre2unicode.html |
| 120 | |
| 121 | dist_man_MANS = \ |
| 122 | doc/pcre2-config.1 \ |
| 123 | doc/pcre2.3 \ |
| 124 | doc/pcre2_callout_enumerate.3 \ |
Janis Danisevskis | 8b979b2 | 2016-08-15 16:09:16 +0100 | [diff] [blame] | 125 | doc/pcre2_code_copy.3 \ |
Elliott Hughes | 9bc971b | 2018-07-27 13:23:14 -0700 | [diff] [blame] | 126 | doc/pcre2_code_copy_with_tables.3 \ |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 127 | doc/pcre2_code_free.3 \ |
| 128 | doc/pcre2_compile.3 \ |
| 129 | doc/pcre2_compile_context_copy.3 \ |
| 130 | doc/pcre2_compile_context_create.3 \ |
| 131 | doc/pcre2_compile_context_free.3 \ |
| 132 | doc/pcre2_config.3 \ |
Elliott Hughes | 9bc971b | 2018-07-27 13:23:14 -0700 | [diff] [blame] | 133 | doc/pcre2_convert_context_copy.3 \ |
| 134 | doc/pcre2_convert_context_create.3 \ |
| 135 | doc/pcre2_convert_context_free.3 \ |
| 136 | doc/pcre2_converted_pattern_free.3 \ |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 137 | doc/pcre2_dfa_match.3 \ |
| 138 | doc/pcre2_general_context_copy.3 \ |
| 139 | doc/pcre2_general_context_create.3 \ |
| 140 | doc/pcre2_general_context_free.3 \ |
| 141 | doc/pcre2_get_error_message.3 \ |
| 142 | doc/pcre2_get_mark.3 \ |
| 143 | doc/pcre2_get_ovector_count.3 \ |
| 144 | doc/pcre2_get_ovector_pointer.3 \ |
| 145 | doc/pcre2_get_startchar.3 \ |
| 146 | doc/pcre2_jit_compile.3 \ |
| 147 | doc/pcre2_jit_free_unused_memory.3 \ |
| 148 | doc/pcre2_jit_match.3 \ |
| 149 | doc/pcre2_jit_stack_assign.3 \ |
| 150 | doc/pcre2_jit_stack_create.3 \ |
| 151 | doc/pcre2_jit_stack_free.3 \ |
| 152 | doc/pcre2_maketables.3 \ |
| 153 | doc/pcre2_match.3 \ |
| 154 | doc/pcre2_match_context_copy.3 \ |
| 155 | doc/pcre2_match_context_create.3 \ |
| 156 | doc/pcre2_match_context_free.3 \ |
| 157 | doc/pcre2_match_data_create.3 \ |
| 158 | doc/pcre2_match_data_create_from_pattern.3 \ |
| 159 | doc/pcre2_match_data_free.3 \ |
Elliott Hughes | 9bc971b | 2018-07-27 13:23:14 -0700 | [diff] [blame] | 160 | doc/pcre2_pattern_convert.3 \ |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 161 | doc/pcre2_pattern_info.3 \ |
| 162 | doc/pcre2_serialize_decode.3 \ |
| 163 | doc/pcre2_serialize_encode.3 \ |
| 164 | doc/pcre2_serialize_free.3 \ |
| 165 | doc/pcre2_serialize_get_number_of_codes.3 \ |
| 166 | doc/pcre2_set_bsr.3 \ |
| 167 | doc/pcre2_set_callout.3 \ |
| 168 | doc/pcre2_set_character_tables.3 \ |
Elliott Hughes | 9bc971b | 2018-07-27 13:23:14 -0700 | [diff] [blame] | 169 | doc/pcre2_set_compile_extra_options.3 \ |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 170 | doc/pcre2_set_compile_recursion_guard.3 \ |
Elliott Hughes | 9bc971b | 2018-07-27 13:23:14 -0700 | [diff] [blame] | 171 | doc/pcre2_set_depth_limit.3 \ |
| 172 | doc/pcre2_set_glob_escape.3 \ |
| 173 | doc/pcre2_set_glob_separator.3 \ |
| 174 | doc/pcre2_set_heap_limit.3 \ |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 175 | doc/pcre2_set_match_limit.3 \ |
Elliott Hughes | 9bc971b | 2018-07-27 13:23:14 -0700 | [diff] [blame] | 176 | doc/pcre2_set_max_pattern_length.3 \ |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 177 | doc/pcre2_set_offset_limit.3 \ |
| 178 | doc/pcre2_set_newline.3 \ |
| 179 | doc/pcre2_set_parens_nest_limit.3 \ |
| 180 | doc/pcre2_set_recursion_limit.3 \ |
| 181 | doc/pcre2_set_recursion_memory_management.3 \ |
Elliott Hughes | 0c26e19 | 2019-08-07 12:24:46 -0700 | [diff] [blame] | 182 | doc/pcre2_set_substitute_callout.3 \ |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 183 | doc/pcre2_substitute.3 \ |
| 184 | doc/pcre2_substring_copy_byname.3 \ |
| 185 | doc/pcre2_substring_copy_bynumber.3 \ |
| 186 | doc/pcre2_substring_free.3 \ |
| 187 | doc/pcre2_substring_get_byname.3 \ |
| 188 | doc/pcre2_substring_get_bynumber.3 \ |
| 189 | doc/pcre2_substring_length_byname.3 \ |
| 190 | doc/pcre2_substring_length_bynumber.3 \ |
| 191 | doc/pcre2_substring_list_free.3 \ |
| 192 | doc/pcre2_substring_list_get.3 \ |
| 193 | doc/pcre2_substring_nametable_scan.3 \ |
| 194 | doc/pcre2_substring_number_from_name.3 \ |
| 195 | doc/pcre2api.3 \ |
| 196 | doc/pcre2build.3 \ |
| 197 | doc/pcre2callout.3 \ |
| 198 | doc/pcre2compat.3 \ |
Elliott Hughes | 9bc971b | 2018-07-27 13:23:14 -0700 | [diff] [blame] | 199 | doc/pcre2convert.3 \ |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 200 | doc/pcre2demo.3 \ |
| 201 | doc/pcre2grep.1 \ |
| 202 | doc/pcre2jit.3 \ |
| 203 | doc/pcre2limits.3 \ |
| 204 | doc/pcre2matching.3 \ |
| 205 | doc/pcre2partial.3 \ |
| 206 | doc/pcre2pattern.3 \ |
| 207 | doc/pcre2perform.3 \ |
| 208 | doc/pcre2posix.3 \ |
| 209 | doc/pcre2sample.3 \ |
| 210 | doc/pcre2serialize.3 \ |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 211 | doc/pcre2syntax.3 \ |
| 212 | doc/pcre2test.1 \ |
| 213 | doc/pcre2unicode.3 |
| 214 | |
| 215 | # The Libtool libraries to install. We'll add to this later. |
| 216 | |
| 217 | lib_LTLIBRARIES = |
| 218 | |
| 219 | # Unit tests you want to run when people type 'make check'. |
| 220 | # TESTS is for binary unit tests, check_SCRIPTS for script-based tests |
| 221 | |
| 222 | TESTS = |
| 223 | check_SCRIPTS = |
| 224 | dist_noinst_SCRIPTS = |
| 225 | |
| 226 | # Some of the binaries we make are to be installed, and others are |
| 227 | # (non-user-visible) helper programs needed to build the libraries. |
| 228 | |
| 229 | bin_PROGRAMS = |
| 230 | noinst_PROGRAMS = |
| 231 | |
| 232 | # Additional files to delete on 'make clean', 'make distclean', |
| 233 | # and 'make maintainer-clean'. |
| 234 | |
| 235 | CLEANFILES = |
Elliott Hughes | 0c26e19 | 2019-08-07 12:24:46 -0700 | [diff] [blame] | 236 | DISTCLEANFILES = src/config.h.in~ |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 237 | MAINTAINERCLEANFILES = |
| 238 | |
| 239 | # Additional files to bundle with the distribution, over and above what |
| 240 | # the Autotools include by default. |
| 241 | |
| 242 | EXTRA_DIST = |
| 243 | |
| 244 | # These files contain additional m4 macros that are used by autoconf. |
| 245 | |
| 246 | EXTRA_DIST += \ |
| 247 | m4/ax_pthread.m4 m4/pcre2_visibility.m4 |
| 248 | |
| 249 | # These files contain maintenance information |
| 250 | |
| 251 | EXTRA_DIST += \ |
| 252 | NON-AUTOTOOLS-BUILD \ |
| 253 | HACKING |
| 254 | |
| 255 | # These files are used in the preparation of a release |
| 256 | |
| 257 | EXTRA_DIST += \ |
| 258 | PrepareRelease \ |
| 259 | CheckMan \ |
| 260 | CleanTxt \ |
| 261 | Detrail \ |
| 262 | 132html \ |
| 263 | doc/index.html.src |
| 264 | |
| 265 | # These files are usable versions of pcre2.h and config.h that are distributed |
| 266 | # for the benefit of people who are building PCRE2 manually, without the |
| 267 | # Autotools support. |
| 268 | |
| 269 | EXTRA_DIST += \ |
| 270 | src/pcre2.h.generic \ |
| 271 | src/config.h.generic |
| 272 | |
| 273 | # The only difference between pcre2.h.in and pcre2.h is the setting of the PCRE |
| 274 | # version number. Therefore, we can create the generic version just by copying. |
| 275 | |
| 276 | src/pcre2.h.generic: src/pcre2.h.in configure.ac |
| 277 | rm -f $@ |
| 278 | cp -p src/pcre2.h $@ |
| 279 | |
| 280 | # It is more complicated for config.h.generic. We need the version that results |
| 281 | # from a default configuration so as to get all the default values for PCRE |
| 282 | # configuration macros such as MATCH_LIMIT and NEWLINE. We can get this by |
| 283 | # doing a configure in a temporary directory. However, some trickery is needed, |
| 284 | # because the source directory may already be configured. If you just try |
| 285 | # running configure in a new directory, it complains. For this reason, we move |
| 286 | # config.status out of the way while doing the default configuration. The |
| 287 | # resulting config.h is munged by perl to put #ifdefs round any #defines for |
| 288 | # macros with values, and to #undef all boolean macros such as HAVE_xxx and |
| 289 | # SUPPORT_xxx. We also get rid of any gcc-specific visibility settings. Make |
| 290 | # sure that PCRE2_EXP_DEFN is unset (in case it has visibility settings). |
| 291 | |
| 292 | src/config.h.generic: configure.ac |
| 293 | rm -rf $@ _generic |
| 294 | mkdir _generic |
| 295 | cs=$(srcdir)/config.status; test ! -f $$cs || mv -f $$cs $$cs.aside |
| 296 | cd _generic && $(abs_top_srcdir)/configure || : |
| 297 | cs=$(srcdir)/config.status; test ! -f $$cs.aside || mv -f $$cs.aside $$cs |
| 298 | test -f _generic/src/config.h |
| 299 | perl -n \ |
| 300 | -e 'BEGIN{$$blank=0;}' \ |
| 301 | -e 'if(/PCRE2_EXP_DEFN/){print"/* #undef PCRE2_EXP_DEFN */\n";$$blank=0;next;}' \ |
| 302 | -e 'if(/to make a symbol visible/){next;}' \ |
| 303 | -e 'if(/__attribute__ \(\(visibility/){next;}' \ |
| 304 | -e 'if(/LT_OBJDIR/){print"/* This is ignored unless you are using libtool. */\n";}' \ |
| 305 | -e 'if(/^#define\s((?:HAVE|SUPPORT|STDC)_\w+)/){print"/* #undef $$1 */\n";$$blank=0;next;}' \ |
| 306 | -e 'if(/^#define\s(?!PACKAGE|VERSION)(\w+)/){print"#ifndef $$1\n$$_#endif\n";$$blank=0;next;}' \ |
| 307 | -e 'if(/^\s*$$/){print unless $$blank; $$blank=1;} else{print;$$blank=0;}' \ |
| 308 | _generic/src/config.h >$@ |
| 309 | rm -rf _generic |
| 310 | |
| 311 | MAINTAINERCLEANFILES += src/pcre2.h.generic src/config.h.generic |
| 312 | |
| 313 | # These are the header files we'll install. We do not distribute pcre2.h |
| 314 | # because it is generated from pcre2.h.in. |
| 315 | |
| 316 | nodist_include_HEADERS = src/pcre2.h |
| 317 | include_HEADERS = src/pcre2posix.h |
| 318 | |
| 319 | # This is the "config" script. |
| 320 | |
| 321 | bin_SCRIPTS = pcre2-config |
| 322 | |
| 323 | ## --------------------------------------------------------------- |
| 324 | ## The dftables program is used to rebuild character tables before compiling |
| 325 | ## PCRE2, if --enable-rebuild-chartables is specified. It is not a user-visible |
| 326 | ## program. The default (when --enable-rebuild-chartables is not specified) is |
| 327 | ## to copy a distributed set of tables that are defined for ASCII code. In this |
| 328 | ## case, dftables is not needed. |
| 329 | |
| 330 | if WITH_REBUILD_CHARTABLES |
| 331 | noinst_PROGRAMS += dftables |
| 332 | dftables_SOURCES = src/dftables.c |
| 333 | src/pcre2_chartables.c: dftables$(EXEEXT) |
| 334 | rm -f $@ |
| 335 | ./dftables$(EXEEXT) $@ |
| 336 | else |
| 337 | src/pcre2_chartables.c: $(srcdir)/src/pcre2_chartables.c.dist |
| 338 | rm -f $@ |
| 339 | $(LN_S) $(abs_srcdir)/src/pcre2_chartables.c.dist $(abs_builddir)/src/pcre2_chartables.c |
| 340 | endif # WITH_REBUILD_CHARTABLES |
| 341 | |
| 342 | BUILT_SOURCES = src/pcre2_chartables.c |
| 343 | NODIST_SOURCES = src/pcre2_chartables.c |
| 344 | |
| 345 | ## Define the list of common sources, then arrange to build whichever of the |
| 346 | ## 8-, 16-, or 32-bit libraries are configured. |
| 347 | |
| 348 | COMMON_SOURCES = \ |
| 349 | src/pcre2_auto_possess.c \ |
| 350 | src/pcre2_compile.c \ |
| 351 | src/pcre2_config.c \ |
| 352 | src/pcre2_context.c \ |
Elliott Hughes | 9bc971b | 2018-07-27 13:23:14 -0700 | [diff] [blame] | 353 | src/pcre2_convert.c \ |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 354 | src/pcre2_dfa_match.c \ |
| 355 | src/pcre2_error.c \ |
Elliott Hughes | 9bc971b | 2018-07-27 13:23:14 -0700 | [diff] [blame] | 356 | src/pcre2_extuni.c \ |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 357 | src/pcre2_find_bracket.c \ |
| 358 | src/pcre2_internal.h \ |
| 359 | src/pcre2_intmodedep.h \ |
| 360 | src/pcre2_jit_compile.c \ |
| 361 | src/pcre2_maketables.c \ |
| 362 | src/pcre2_match.c \ |
| 363 | src/pcre2_match_data.c \ |
| 364 | src/pcre2_newline.c \ |
| 365 | src/pcre2_ord2utf.c \ |
| 366 | src/pcre2_pattern_info.c \ |
Elliott Hughes | 0c26e19 | 2019-08-07 12:24:46 -0700 | [diff] [blame] | 367 | src/pcre2_script_run.c \ |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 368 | src/pcre2_serialize.c \ |
| 369 | src/pcre2_string_utils.c \ |
| 370 | src/pcre2_study.c \ |
| 371 | src/pcre2_substitute.c \ |
| 372 | src/pcre2_substring.c \ |
| 373 | src/pcre2_tables.c \ |
| 374 | src/pcre2_ucd.c \ |
| 375 | src/pcre2_ucp.h \ |
| 376 | src/pcre2_valid_utf.c \ |
| 377 | src/pcre2_xclass.c |
| 378 | |
| 379 | if WITH_PCRE2_8 |
| 380 | lib_LTLIBRARIES += libpcre2-8.la |
| 381 | libpcre2_8_la_SOURCES = \ |
| 382 | $(COMMON_SOURCES) |
| 383 | nodist_libpcre2_8_la_SOURCES = \ |
| 384 | $(NODIST_SOURCES) |
| 385 | libpcre2_8_la_CFLAGS = \ |
| 386 | -DPCRE2_CODE_UNIT_WIDTH=8 \ |
| 387 | $(VISIBILITY_CFLAGS) \ |
| 388 | $(AM_CFLAGS) |
| 389 | libpcre2_8_la_LIBADD = |
| 390 | endif # WITH_PCRE2_8 |
| 391 | |
| 392 | if WITH_PCRE2_16 |
| 393 | lib_LTLIBRARIES += libpcre2-16.la |
| 394 | libpcre2_16_la_SOURCES = \ |
| 395 | $(COMMON_SOURCES) |
| 396 | nodist_libpcre2_16_la_SOURCES = \ |
| 397 | $(NODIST_SOURCES) |
| 398 | libpcre2_16_la_CFLAGS = \ |
| 399 | -DPCRE2_CODE_UNIT_WIDTH=16 \ |
| 400 | $(VISIBILITY_CFLAGS) \ |
| 401 | $(AM_CFLAGS) |
| 402 | libpcre2_16_la_LIBADD = |
| 403 | endif # WITH_PCRE2_16 |
| 404 | |
| 405 | if WITH_PCRE2_32 |
| 406 | lib_LTLIBRARIES += libpcre2-32.la |
| 407 | libpcre2_32_la_SOURCES = \ |
| 408 | $(COMMON_SOURCES) |
| 409 | nodist_libpcre2_32_la_SOURCES = \ |
| 410 | $(NODIST_SOURCES) |
| 411 | libpcre2_32_la_CFLAGS = \ |
| 412 | -DPCRE2_CODE_UNIT_WIDTH=32 \ |
| 413 | $(VISIBILITY_CFLAGS) \ |
| 414 | $(AM_CFLAGS) |
| 415 | libpcre2_32_la_LIBADD = |
| 416 | endif # WITH_PCRE2_32 |
| 417 | |
| 418 | # The pcre2_chartables.c.dist file is the default version of |
| 419 | # pcre2_chartables.c, used unless --enable-rebuild-chartables is specified. |
| 420 | |
| 421 | EXTRA_DIST += src/pcre2_chartables.c.dist |
| 422 | CLEANFILES += src/pcre2_chartables.c |
| 423 | |
| 424 | # The JIT compiler lives in a separate directory, but its files are #included |
| 425 | # when pcre2_jit_compile.c is processed, so they must be distributed. |
| 426 | |
| 427 | EXTRA_DIST += \ |
| 428 | src/sljit/sljitConfig.h \ |
| 429 | src/sljit/sljitConfigInternal.h \ |
| 430 | src/sljit/sljitExecAllocator.c \ |
| 431 | src/sljit/sljitLir.c \ |
| 432 | src/sljit/sljitLir.h \ |
| 433 | src/sljit/sljitNativeARM_32.c \ |
| 434 | src/sljit/sljitNativeARM_64.c \ |
| 435 | src/sljit/sljitNativeARM_T2_32.c \ |
| 436 | src/sljit/sljitNativeMIPS_32.c \ |
| 437 | src/sljit/sljitNativeMIPS_64.c \ |
| 438 | src/sljit/sljitNativeMIPS_common.c \ |
| 439 | src/sljit/sljitNativePPC_32.c \ |
| 440 | src/sljit/sljitNativePPC_64.c \ |
| 441 | src/sljit/sljitNativePPC_common.c \ |
| 442 | src/sljit/sljitNativeSPARC_32.c \ |
| 443 | src/sljit/sljitNativeSPARC_common.c \ |
| 444 | src/sljit/sljitNativeTILEGX-encoder.c \ |
| 445 | src/sljit/sljitNativeTILEGX_64.c \ |
| 446 | src/sljit/sljitNativeX86_32.c \ |
| 447 | src/sljit/sljitNativeX86_64.c \ |
| 448 | src/sljit/sljitNativeX86_common.c \ |
Elliott Hughes | 9bc971b | 2018-07-27 13:23:14 -0700 | [diff] [blame] | 449 | src/sljit/sljitProtExecAllocator.c \ |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 450 | src/sljit/sljitUtils.c |
| 451 | |
| 452 | # Some of the JIT sources are also in separate files that are #included. |
| 453 | |
| 454 | EXTRA_DIST += \ |
| 455 | src/pcre2_jit_match.c \ |
| 456 | src/pcre2_jit_misc.c |
| 457 | |
| 458 | if WITH_PCRE2_8 |
| 459 | libpcre2_8_la_LDFLAGS = $(EXTRA_LIBPCRE2_8_LDFLAGS) |
| 460 | endif # WITH_PCRE2_8 |
| 461 | if WITH_PCRE2_16 |
| 462 | libpcre2_16_la_LDFLAGS = $(EXTRA_LIBPCRE2_16_LDFLAGS) |
| 463 | endif # WITH_PCRE2_16 |
| 464 | if WITH_PCRE2_32 |
| 465 | libpcre2_32_la_LDFLAGS = $(EXTRA_LIBPCRE2_32_LDFLAGS) |
| 466 | endif # WITH_PCRE2_32 |
| 467 | |
| 468 | if WITH_VALGRIND |
| 469 | if WITH_PCRE2_8 |
| 470 | libpcre2_8_la_CFLAGS += $(VALGRIND_CFLAGS) |
| 471 | endif # WITH_PCRE2_8 |
| 472 | if WITH_PCRE2_16 |
| 473 | libpcre2_16_la_CFLAGS += $(VALGRIND_CFLAGS) |
| 474 | endif # WITH_PCRE2_16 |
| 475 | if WITH_PCRE2_32 |
| 476 | libpcre2_32_la_CFLAGS += $(VALGRIND_CFLAGS) |
| 477 | endif # WITH_PCRE2_32 |
| 478 | endif # WITH_VALGRIND |
| 479 | |
| 480 | if WITH_GCOV |
| 481 | if WITH_PCRE2_8 |
| 482 | libpcre2_8_la_CFLAGS += $(GCOV_CFLAGS) |
| 483 | endif # WITH_PCRE2_8 |
| 484 | if WITH_PCRE2_16 |
| 485 | libpcre2_16_la_CFLAGS += $(GCOV_CFLAGS) |
| 486 | endif # WITH_PCRE2_16 |
| 487 | if WITH_PCRE2_32 |
| 488 | libpcre2_32_la_CFLAGS += $(GCOV_CFLAGS) |
| 489 | endif # WITH_PCRE2_32 |
| 490 | endif # WITH_GCOV |
| 491 | |
| 492 | ## A version of the 8-bit library that has a POSIX API. |
| 493 | |
| 494 | if WITH_PCRE2_8 |
| 495 | lib_LTLIBRARIES += libpcre2-posix.la |
| 496 | libpcre2_posix_la_SOURCES = src/pcre2posix.c |
| 497 | libpcre2_posix_la_CFLAGS = \ |
| 498 | -DPCRE2_CODE_UNIT_WIDTH=8 \ |
| 499 | $(VISIBILITY_CFLAGS) $(AM_CFLAGS) |
| 500 | libpcre2_posix_la_LDFLAGS = $(EXTRA_LIBPCRE2_POSIX_LDFLAGS) |
| 501 | libpcre2_posix_la_LIBADD = libpcre2-8.la |
| 502 | if WITH_GCOV |
| 503 | libpcre2_posix_la_CFLAGS += $(GCOV_CFLAGS) |
| 504 | endif # WITH_GCOV |
| 505 | endif # WITH_PCRE2_8 |
| 506 | |
Elliott Hughes | 9bc971b | 2018-07-27 13:23:14 -0700 | [diff] [blame] | 507 | ## Build pcre2grep and optional fuzzer stuff if the 8-bit library is enabled |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 508 | |
| 509 | if WITH_PCRE2_8 |
| 510 | bin_PROGRAMS += pcre2grep |
| 511 | pcre2grep_SOURCES = src/pcre2grep.c |
| 512 | pcre2grep_CFLAGS = $(AM_CFLAGS) |
| 513 | pcre2grep_LDADD = $(LIBZ) $(LIBBZ2) |
| 514 | pcre2grep_LDADD += libpcre2-8.la |
| 515 | if WITH_GCOV |
| 516 | pcre2grep_CFLAGS += $(GCOV_CFLAGS) |
| 517 | pcre2grep_LDADD += $(GCOV_LIBS) |
| 518 | endif # WITH_GCOV |
Elliott Hughes | 9bc971b | 2018-07-27 13:23:14 -0700 | [diff] [blame] | 519 | |
| 520 | ## If fuzzer support is enabled, build a non-distributed library containing the |
| 521 | ## fuzzing function. Also build the standalone checking binary from the same |
| 522 | ## source but using -DSTANDALONE. |
| 523 | |
| 524 | if WITH_FUZZ_SUPPORT |
| 525 | noinst_LIBRARIES = .libs/libpcre2-fuzzsupport.a |
| 526 | _libs_libpcre2_fuzzsupport_a_SOURCES = src/pcre2_fuzzsupport.c |
| 527 | _libs_libpcre2_fuzzsupport_a_CFLAGS = $(AM_CFLAGS) |
| 528 | _libs_libpcre2_fuzzsupport_a_LIBADD = |
| 529 | |
| 530 | noinst_PROGRAMS += pcre2fuzzcheck |
| 531 | pcre2fuzzcheck_SOURCES = src/pcre2_fuzzsupport.c |
| 532 | pcre2fuzzcheck_CFLAGS = -DSTANDALONE $(AM_CFLAGS) |
| 533 | pcre2fuzzcheck_LDADD = libpcre2-8.la |
Elliott Hughes | 0c26e19 | 2019-08-07 12:24:46 -0700 | [diff] [blame] | 534 | if WITH_GCOV |
| 535 | pcre2fuzzcheck_CFLAGS += $(GCOV_CFLAGS) |
| 536 | pcre2fuzzcheck_LDADD += $(GCOV_LIBS) |
| 537 | endif # WITH_GCOV |
Elliott Hughes | 9bc971b | 2018-07-27 13:23:14 -0700 | [diff] [blame] | 538 | endif # WITH FUZZ_SUPPORT |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 539 | endif # WITH_PCRE2_8 |
| 540 | |
| 541 | ## -------- Testing ---------- |
| 542 | |
| 543 | ## If JIT support is enabled, arrange for the JIT test program to run. |
| 544 | |
| 545 | if WITH_JIT |
| 546 | TESTS += pcre2_jit_test |
| 547 | noinst_PROGRAMS += pcre2_jit_test |
| 548 | pcre2_jit_test_SOURCES = src/pcre2_jit_test.c |
| 549 | pcre2_jit_test_CFLAGS = $(AM_CFLAGS) |
| 550 | pcre2_jit_test_LDADD = |
| 551 | if WITH_PCRE2_8 |
| 552 | pcre2_jit_test_LDADD += libpcre2-8.la |
| 553 | endif # WITH_PCRE2_8 |
| 554 | if WITH_PCRE2_16 |
| 555 | pcre2_jit_test_LDADD += libpcre2-16.la |
| 556 | endif # WITH_PCRE2_16 |
| 557 | if WITH_PCRE2_32 |
| 558 | pcre2_jit_test_LDADD += libpcre2-32.la |
| 559 | endif # WITH_PCRE2_32 |
| 560 | if WITH_GCOV |
| 561 | pcre2_jit_test_CFLAGS += $(GCOV_CFLAGS) |
| 562 | pcre2_jit_test_LDADD += $(GCOV_LIBS) |
| 563 | endif # WITH_GCOV |
| 564 | endif # WITH_JIT |
| 565 | |
| 566 | # Build the general pcre2test program. The file src/pcre2_printint.c is |
| 567 | # #included by pcre2test as many times as needed, at different code unit |
| 568 | # widths. |
| 569 | |
| 570 | bin_PROGRAMS += pcre2test |
| 571 | EXTRA_DIST += src/pcre2_printint.c |
| 572 | pcre2test_SOURCES = src/pcre2test.c |
| 573 | pcre2test_CFLAGS = $(AM_CFLAGS) |
| 574 | pcre2test_LDADD = $(LIBREADLINE) |
| 575 | |
| 576 | if WITH_PCRE2_8 |
| 577 | pcre2test_LDADD += libpcre2-8.la libpcre2-posix.la |
| 578 | endif # WITH_PCRE2_8 |
| 579 | |
| 580 | if WITH_PCRE2_16 |
| 581 | pcre2test_LDADD += libpcre2-16.la |
| 582 | endif # WITH_PCRE2_16 |
| 583 | |
| 584 | if WITH_PCRE2_32 |
| 585 | pcre2test_LDADD += libpcre2-32.la |
| 586 | endif # WITH_PCRE2_32 |
| 587 | |
| 588 | if WITH_VALGRIND |
| 589 | pcre2test_CFLAGS += $(VALGRIND_CFLAGS) |
| 590 | endif # WITH_VALGRIND |
| 591 | |
| 592 | if WITH_GCOV |
| 593 | pcre2test_CFLAGS += $(GCOV_CFLAGS) |
| 594 | pcre2test_LDADD += $(GCOV_LIBS) |
| 595 | endif # WITH_GCOV |
| 596 | |
| 597 | ## The main library tests. Each test is a binary plus a script that runs that |
| 598 | ## binary in various ways. We install these test binaries in case folks find it |
Elliott Hughes | 9bc971b | 2018-07-27 13:23:14 -0700 | [diff] [blame] | 599 | ## helpful. The two .bat files are for running the tests under Windows. |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 600 | |
| 601 | TESTS += RunTest |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 602 | EXTRA_DIST += RunTest.bat |
Elliott Hughes | 9bc971b | 2018-07-27 13:23:14 -0700 | [diff] [blame] | 603 | dist_noinst_SCRIPTS += RunTest |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 604 | |
| 605 | ## When the 8-bit library is configured, pcre2grep will have been built. |
| 606 | |
| 607 | if WITH_PCRE2_8 |
| 608 | TESTS += RunGrepTest |
Elliott Hughes | 9bc971b | 2018-07-27 13:23:14 -0700 | [diff] [blame] | 609 | EXTRA_DIST += RunGrepTest.bat |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 610 | dist_noinst_SCRIPTS += RunGrepTest |
| 611 | endif # WITH_PCRE2_8 |
| 612 | |
| 613 | ## Distribute all the test data files |
| 614 | |
| 615 | EXTRA_DIST += \ |
| 616 | testdata/grepbinary \ |
| 617 | testdata/grepfilelist \ |
| 618 | testdata/grepinput \ |
| 619 | testdata/grepinput3 \ |
| 620 | testdata/grepinput8 \ |
Elliott Hughes | 9bc971b | 2018-07-27 13:23:14 -0700 | [diff] [blame] | 621 | testdata/grepinputM \ |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 622 | testdata/grepinputv \ |
| 623 | testdata/grepinputx \ |
| 624 | testdata/greplist \ |
| 625 | testdata/grepoutput \ |
| 626 | testdata/grepoutput8 \ |
Janis Danisevskis | 8b979b2 | 2016-08-15 16:09:16 +0100 | [diff] [blame] | 627 | testdata/grepoutputC \ |
Elliott Hughes | 0c26e19 | 2019-08-07 12:24:46 -0700 | [diff] [blame] | 628 | testdata/grepoutputCN \ |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 629 | testdata/grepoutputN \ |
| 630 | testdata/greppatN4 \ |
| 631 | testdata/testinput1 \ |
| 632 | testdata/testinput2 \ |
| 633 | testdata/testinput3 \ |
| 634 | testdata/testinput4 \ |
| 635 | testdata/testinput5 \ |
| 636 | testdata/testinput6 \ |
| 637 | testdata/testinput7 \ |
| 638 | testdata/testinput8 \ |
| 639 | testdata/testinput9 \ |
| 640 | testdata/testinput10 \ |
| 641 | testdata/testinput11 \ |
| 642 | testdata/testinput12 \ |
| 643 | testdata/testinput13 \ |
| 644 | testdata/testinput14 \ |
| 645 | testdata/testinput15 \ |
| 646 | testdata/testinput16 \ |
| 647 | testdata/testinput17 \ |
| 648 | testdata/testinput18 \ |
| 649 | testdata/testinput19 \ |
| 650 | testdata/testinput20 \ |
| 651 | testdata/testinput21 \ |
| 652 | testdata/testinput22 \ |
| 653 | testdata/testinput23 \ |
Elliott Hughes | 9bc971b | 2018-07-27 13:23:14 -0700 | [diff] [blame] | 654 | testdata/testinput24 \ |
| 655 | testdata/testinput25 \ |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 656 | testdata/testinputEBC \ |
| 657 | testdata/testoutput1 \ |
| 658 | testdata/testoutput2 \ |
| 659 | testdata/testoutput3 \ |
| 660 | testdata/testoutput3A \ |
| 661 | testdata/testoutput3B \ |
| 662 | testdata/testoutput4 \ |
| 663 | testdata/testoutput5 \ |
| 664 | testdata/testoutput6 \ |
| 665 | testdata/testoutput7 \ |
| 666 | testdata/testoutput8-16-2 \ |
| 667 | testdata/testoutput8-16-3 \ |
Elliott Hughes | 653c210 | 2019-01-09 15:41:36 -0800 | [diff] [blame] | 668 | testdata/testoutput8-16-4 \ |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 669 | testdata/testoutput8-32-2 \ |
| 670 | testdata/testoutput8-32-3 \ |
| 671 | testdata/testoutput8-32-4 \ |
| 672 | testdata/testoutput8-8-2 \ |
| 673 | testdata/testoutput8-8-3 \ |
| 674 | testdata/testoutput8-8-4 \ |
| 675 | testdata/testoutput9 \ |
| 676 | testdata/testoutput10 \ |
| 677 | testdata/testoutput11-16 \ |
| 678 | testdata/testoutput11-32 \ |
| 679 | testdata/testoutput12-16 \ |
| 680 | testdata/testoutput12-32 \ |
| 681 | testdata/testoutput13 \ |
| 682 | testdata/testoutput14-16 \ |
| 683 | testdata/testoutput14-32 \ |
| 684 | testdata/testoutput14-8 \ |
| 685 | testdata/testoutput15 \ |
| 686 | testdata/testoutput16 \ |
| 687 | testdata/testoutput17 \ |
| 688 | testdata/testoutput18 \ |
| 689 | testdata/testoutput19 \ |
| 690 | testdata/testoutput20 \ |
| 691 | testdata/testoutput21 \ |
| 692 | testdata/testoutput22-16 \ |
| 693 | testdata/testoutput22-32 \ |
| 694 | testdata/testoutput22-8 \ |
| 695 | testdata/testoutput23 \ |
Elliott Hughes | 9bc971b | 2018-07-27 13:23:14 -0700 | [diff] [blame] | 696 | testdata/testoutput24 \ |
| 697 | testdata/testoutput25 \ |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 698 | testdata/testoutputEBC \ |
| 699 | testdata/valgrind-jit.supp \ |
| 700 | testdata/wintestinput3 \ |
| 701 | testdata/wintestoutput3 \ |
| 702 | perltest.sh |
| 703 | |
| 704 | # RunTest and RunGrepTest should clean up after themselves, but just in case |
| 705 | # they don't, add their working files to CLEANFILES. |
| 706 | |
| 707 | CLEANFILES += \ |
| 708 | testSinput \ |
| 709 | test3input \ |
| 710 | test3output \ |
| 711 | test3outputA \ |
| 712 | test3outputB \ |
| 713 | testtry \ |
| 714 | teststdout \ |
| 715 | teststderr \ |
| 716 | teststderrgrep \ |
| 717 | testtemp1grep \ |
| 718 | testtemp2grep \ |
| 719 | testtrygrep \ |
| 720 | testNinputgrep |
| 721 | |
| 722 | ## ------------ End of testing ------------- |
| 723 | |
| 724 | |
| 725 | # PCRE2 demonstration program. Not built automatcally. The point is that the |
| 726 | # users should build it themselves. So just distribute the source. |
| 727 | |
| 728 | EXTRA_DIST += src/pcre2demo.c |
| 729 | |
| 730 | |
| 731 | # We have .pc files for pkg-config users. |
| 732 | |
| 733 | pkgconfigdir = $(libdir)/pkgconfig |
| 734 | pkgconfig_DATA = |
| 735 | |
| 736 | if WITH_PCRE2_8 |
| 737 | pkgconfig_DATA += libpcre2-8.pc libpcre2-posix.pc |
| 738 | endif |
| 739 | |
| 740 | if WITH_PCRE2_16 |
| 741 | pkgconfig_DATA += libpcre2-16.pc |
| 742 | endif |
| 743 | |
| 744 | if WITH_PCRE2_32 |
| 745 | pkgconfig_DATA += libpcre2-32.pc |
| 746 | endif |
| 747 | |
| 748 | |
| 749 | # gcov/lcov code coverage reporting |
| 750 | # |
| 751 | # Coverage reporting targets: |
| 752 | # |
| 753 | # coverage: Create a coverage report from 'make check' |
| 754 | # coverage-baseline: Capture baseline coverage information |
| 755 | # coverage-reset: This zeros the coverage counters only |
| 756 | # coverage-report: This creates the coverage report only |
| 757 | # coverage-clean-report: This removes the generated coverage report |
| 758 | # without cleaning the coverage data itself |
| 759 | # coverage-clean-data: This removes the captured coverage data without |
| 760 | # removing the coverage files created at compile time (*.gcno) |
| 761 | # coverage-clean: This cleans all coverage data including the generated |
| 762 | # coverage report. |
| 763 | |
| 764 | if WITH_GCOV |
| 765 | COVERAGE_TEST_NAME = $(PACKAGE) |
| 766 | COVERAGE_NAME = $(PACKAGE)-$(VERSION) |
| 767 | COVERAGE_OUTPUT_FILE = $(COVERAGE_NAME)-coverage.info |
| 768 | COVERAGE_OUTPUT_DIR = $(COVERAGE_NAME)-coverage |
| 769 | COVERAGE_LCOV_EXTRA_FLAGS = |
| 770 | COVERAGE_GENHTML_EXTRA_FLAGS = |
| 771 | |
| 772 | coverage_quiet = $(coverage_quiet_$(V)) |
| 773 | coverage_quiet_ = $(coverage_quiet_$(AM_DEFAULT_VERBOSITY)) |
| 774 | coverage_quiet_0 = --quiet |
| 775 | |
| 776 | coverage-check: all |
| 777 | -$(MAKE) $(AM_MAKEFLAGS) -k check |
| 778 | |
| 779 | coverage-baseline: |
| 780 | $(LCOV) $(coverage_quiet) \ |
| 781 | --directory $(top_builddir) \ |
| 782 | --output-file "$(COVERAGE_OUTPUT_FILE)" \ |
| 783 | --capture \ |
| 784 | --initial |
| 785 | |
| 786 | coverage-report: |
| 787 | $(LCOV) $(coverage_quiet) \ |
| 788 | --directory $(top_builddir) \ |
| 789 | --capture \ |
| 790 | --output-file "$(COVERAGE_OUTPUT_FILE).tmp" \ |
| 791 | --test-name "$(COVERAGE_TEST_NAME)" \ |
| 792 | --no-checksum \ |
| 793 | --compat-libtool \ |
| 794 | $(COVERAGE_LCOV_EXTRA_FLAGS) |
| 795 | $(LCOV) $(coverage_quiet) \ |
| 796 | --directory $(top_builddir) \ |
| 797 | --output-file "$(COVERAGE_OUTPUT_FILE)" \ |
| 798 | --remove "$(COVERAGE_OUTPUT_FILE).tmp" \ |
| 799 | "/tmp/*" \ |
| 800 | "/usr/include/*" \ |
| 801 | "$(includedir)/*" |
| 802 | -@rm -f "$(COVERAGE_OUTPUT_FILE).tmp" |
| 803 | LANG=C $(GENHTML) $(coverage_quiet) \ |
| 804 | --prefix $(top_builddir) \ |
| 805 | --output-directory "$(COVERAGE_OUTPUT_DIR)" \ |
| 806 | --title "$(PACKAGE) $(VERSION) Code Coverage Report" \ |
| 807 | --show-details "$(COVERAGE_OUTPUT_FILE)" \ |
| 808 | --legend \ |
| 809 | $(COVERAGE_GENHTML_EXTRA_FLAGS) |
| 810 | @echo "Code coverage report written to file://$(abs_builddir)/$(COVERAGE_OUTPUT_DIR)/index.html" |
| 811 | |
| 812 | coverage-reset: |
| 813 | -$(LCOV) $(coverage_quiet) --zerocounters --directory $(top_builddir) |
| 814 | |
| 815 | coverage-clean-report: |
| 816 | -rm -f "$(COVERAGE_OUTPUT_FILE)" "$(COVERAGE_OUTPUT_FILE).tmp" |
| 817 | -rm -rf "$(COVERAGE_OUTPUT_DIR)" |
| 818 | |
| 819 | coverage-clean-data: |
| 820 | -find $(top_builddir) -name "*.gcda" -delete |
| 821 | |
| 822 | coverage-clean: coverage-reset coverage-clean-report coverage-clean-data |
| 823 | -find $(top_builddir) -name "*.gcno" -delete |
| 824 | |
| 825 | coverage-distclean: coverage-clean |
| 826 | |
| 827 | coverage: coverage-reset coverage-baseline coverage-check coverage-report |
| 828 | clean-local: coverage-clean |
| 829 | distclean-local: coverage-distclean |
| 830 | |
| 831 | .PHONY: coverage coverage-baseline coverage-check coverage-report coverage-reset coverage-clean-report coverage-clean-data coverage-clean coverage-distclean |
| 832 | |
| 833 | # Without coverage support, still arrange for 'make distclean' to get rid of |
| 834 | # any coverage files that may have been left from a different configuration. |
| 835 | |
| 836 | else |
| 837 | |
| 838 | coverage: |
| 839 | @echo "Configuring with --enable-coverage is required to generate code coverage report." |
| 840 | |
| 841 | DISTCLEANFILES += src/*.gcda src/*.gcno |
| 842 | |
| 843 | distclean-local: |
| 844 | rm -rf $(PACKAGE)-$(VERSION)-coverage* |
| 845 | |
| 846 | endif # WITH_GCOV |
| 847 | |
| 848 | ## CMake support |
| 849 | |
| 850 | EXTRA_DIST += \ |
| 851 | cmake/COPYING-CMAKE-SCRIPTS \ |
| 852 | cmake/FindPackageHandleStandardArgs.cmake \ |
| 853 | cmake/FindReadline.cmake \ |
| 854 | cmake/FindEditline.cmake \ |
| 855 | CMakeLists.txt \ |
| 856 | config-cmake.h.in |
| 857 | |
| 858 | ## end Makefile.am |