1 ## Process this file with automake to produce Makefile.in.
3 AUTOMAKE_OPTIONS = subdir-objects
4 ACLOCAL_AMFLAGS = -I m4
6 ## This seems to have become necessary for building in non-source directory.
8 AM_CPPFLAGS="-I$(srcdir)/src"
10 ## Specify the documentation files that are distributed.
20 doc/pcre2-config.txt \
25 doc/html/NON-AUTOTOOLS-BUILD.txt \
28 doc/html/pcre2-config.html \
30 doc/html/pcre2_callout_enumerate.html \
31 doc/html/pcre2_code_copy.html \
32 doc/html/pcre2_code_copy_with_tables.html \
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 \
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 \
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 \
66 doc/html/pcre2_pattern_convert.html \
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 \
75 doc/html/pcre2_set_compile_extra_options.html \
76 doc/html/pcre2_set_compile_recursion_guard.html \
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 \
81 doc/html/pcre2_set_match_limit.html \
82 doc/html/pcre2_set_max_pattern_length.html \
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 \
88 doc/html/pcre2_substitute.html \
89 doc/html/pcre2_substring_copy_byname.html \
90 doc/html/pcre2_substring_copy_bynumber.html \
91 doc/html/pcre2_substring_free.html \
92 doc/html/pcre2_substring_get_byname.html \
93 doc/html/pcre2_substring_get_bynumber.html \
94 doc/html/pcre2_substring_length_byname.html \
95 doc/html/pcre2_substring_length_bynumber.html \
96 doc/html/pcre2_substring_list_free.html \
97 doc/html/pcre2_substring_list_get.html \
98 doc/html/pcre2_substring_nametable_scan.html \
99 doc/html/pcre2_substring_number_from_name.html \
100 doc/html/pcre2api.html \
101 doc/html/pcre2build.html \
102 doc/html/pcre2callout.html \
103 doc/html/pcre2compat.html \
104 doc/html/pcre2convert.html \
105 doc/html/pcre2demo.html \
106 doc/html/pcre2grep.html \
107 doc/html/pcre2jit.html \
108 doc/html/pcre2limits.html \
109 doc/html/pcre2matching.html \
110 doc/html/pcre2partial.html \
111 doc/html/pcre2pattern.html \
112 doc/html/pcre2perform.html \
113 doc/html/pcre2posix.html \
114 doc/html/pcre2sample.html \
115 doc/html/pcre2serialize.html \
116 doc/html/pcre2syntax.html \
117 doc/html/pcre2test.html \
118 doc/html/pcre2unicode.html
123 doc/pcre2_callout_enumerate.3 \
124 doc/pcre2_code_copy.3 \
125 doc/pcre2_code_copy_with_tables.3 \
126 doc/pcre2_code_free.3 \
127 doc/pcre2_compile.3 \
128 doc/pcre2_compile_context_copy.3 \
129 doc/pcre2_compile_context_create.3 \
130 doc/pcre2_compile_context_free.3 \
132 doc/pcre2_convert_context_copy.3 \
133 doc/pcre2_convert_context_create.3 \
134 doc/pcre2_convert_context_free.3 \
135 doc/pcre2_converted_pattern_free.3 \
136 doc/pcre2_dfa_match.3 \
137 doc/pcre2_general_context_copy.3 \
138 doc/pcre2_general_context_create.3 \
139 doc/pcre2_general_context_free.3 \
140 doc/pcre2_get_error_message.3 \
141 doc/pcre2_get_mark.3 \
142 doc/pcre2_get_ovector_count.3 \
143 doc/pcre2_get_ovector_pointer.3 \
144 doc/pcre2_get_startchar.3 \
145 doc/pcre2_jit_compile.3 \
146 doc/pcre2_jit_free_unused_memory.3 \
147 doc/pcre2_jit_match.3 \
148 doc/pcre2_jit_stack_assign.3 \
149 doc/pcre2_jit_stack_create.3 \
150 doc/pcre2_jit_stack_free.3 \
151 doc/pcre2_maketables.3 \
153 doc/pcre2_match_context_copy.3 \
154 doc/pcre2_match_context_create.3 \
155 doc/pcre2_match_context_free.3 \
156 doc/pcre2_match_data_create.3 \
157 doc/pcre2_match_data_create_from_pattern.3 \
158 doc/pcre2_match_data_free.3 \
159 doc/pcre2_pattern_convert.3 \
160 doc/pcre2_pattern_info.3 \
161 doc/pcre2_serialize_decode.3 \
162 doc/pcre2_serialize_encode.3 \
163 doc/pcre2_serialize_free.3 \
164 doc/pcre2_serialize_get_number_of_codes.3 \
165 doc/pcre2_set_bsr.3 \
166 doc/pcre2_set_callout.3 \
167 doc/pcre2_set_character_tables.3 \
168 doc/pcre2_set_compile_extra_options.3 \
169 doc/pcre2_set_compile_recursion_guard.3 \
170 doc/pcre2_set_depth_limit.3 \
171 doc/pcre2_set_glob_escape.3 \
172 doc/pcre2_set_glob_separator.3 \
173 doc/pcre2_set_heap_limit.3 \
174 doc/pcre2_set_match_limit.3 \
175 doc/pcre2_set_max_pattern_length.3 \
176 doc/pcre2_set_offset_limit.3 \
177 doc/pcre2_set_newline.3 \
178 doc/pcre2_set_parens_nest_limit.3 \
179 doc/pcre2_set_recursion_limit.3 \
180 doc/pcre2_set_recursion_memory_management.3 \
181 doc/pcre2_substitute.3 \
182 doc/pcre2_substring_copy_byname.3 \
183 doc/pcre2_substring_copy_bynumber.3 \
184 doc/pcre2_substring_free.3 \
185 doc/pcre2_substring_get_byname.3 \
186 doc/pcre2_substring_get_bynumber.3 \
187 doc/pcre2_substring_length_byname.3 \
188 doc/pcre2_substring_length_bynumber.3 \
189 doc/pcre2_substring_list_free.3 \
190 doc/pcre2_substring_list_get.3 \
191 doc/pcre2_substring_nametable_scan.3 \
192 doc/pcre2_substring_number_from_name.3 \
202 doc/pcre2matching.3 \
208 doc/pcre2serialize.3 \
213 # The Libtool libraries to install. We'll add to this later.
217 # Unit tests you want to run when people type 'make check'.
218 # TESTS is for binary unit tests, check_SCRIPTS for script-based tests
222 dist_noinst_SCRIPTS =
224 # Some of the binaries we make are to be installed, and others are
225 # (non-user-visible) helper programs needed to build the libraries.
230 # Additional files to delete on 'make clean', 'make distclean',
231 # and 'make maintainer-clean'.
234 DISTCLEANFILES = src/config.h.in~ config.h pcre2.h.generic
235 MAINTAINERCLEANFILES =
237 # Additional files to bundle with the distribution, over and above what
238 # the Autotools include by default.
242 # These files contain additional m4 macros that are used by autoconf.
245 m4/ax_pthread.m4 m4/pcre2_visibility.m4
247 # These files contain maintenance information
250 NON-AUTOTOOLS-BUILD \
253 # These files are used in the preparation of a release
263 # These files are usable versions of pcre2.h and config.h that are distributed
264 # for the benefit of people who are building PCRE2 manually, without the
268 src/pcre2.h.generic \
271 # The only difference between pcre2.h.in and pcre2.h is the setting of the PCRE
272 # version number. Therefore, we can create the generic version just by copying.
274 src/pcre2.h.generic: src/pcre2.h.in configure.ac
278 # It is more complicated for config.h.generic. We need the version that results
279 # from a default configuration so as to get all the default values for PCRE
280 # configuration macros such as MATCH_LIMIT and NEWLINE. We can get this by
281 # doing a configure in a temporary directory. However, some trickery is needed,
282 # because the source directory may already be configured. If you just try
283 # running configure in a new directory, it complains. For this reason, we move
284 # config.status out of the way while doing the default configuration. The
285 # resulting config.h is munged by perl to put #ifdefs round any #defines for
286 # macros with values, and to #undef all boolean macros such as HAVE_xxx and
287 # SUPPORT_xxx. We also get rid of any gcc-specific visibility settings. Make
288 # sure that PCRE2_EXP_DEFN is unset (in case it has visibility settings).
290 src/config.h.generic: configure.ac
293 cs=$(srcdir)/config.status; test ! -f $$cs || mv -f $$cs $$cs.aside
294 cd _generic && $(abs_top_srcdir)/configure || :
295 cs=$(srcdir)/config.status; test ! -f $$cs.aside || mv -f $$cs.aside $$cs
296 test -f _generic/src/config.h
298 -e 'BEGIN{$$blank=0;}' \
299 -e 'if(/PCRE2_EXP_DEFN/){print"/* #undef PCRE2_EXP_DEFN */\n";$$blank=0;next;}' \
300 -e 'if(/to make a symbol visible/){next;}' \
301 -e 'if(/__attribute__ \(\(visibility/){next;}' \
302 -e 'if(/LT_OBJDIR/){print"/* This is ignored unless you are using libtool. */\n";}' \
303 -e 'if(/^#define\s((?:HAVE|SUPPORT|STDC)_\w+)/){print"/* #undef $$1 */\n";$$blank=0;next;}' \
304 -e 'if(/^#define\s(?!PACKAGE|VERSION)(\w+)/){print"#ifndef $$1\n$$_#endif\n";$$blank=0;next;}' \
305 -e 'if(/^\s*$$/){print unless $$blank; $$blank=1;} else{print;$$blank=0;}' \
306 _generic/src/config.h >$@
309 MAINTAINERCLEANFILES += src/pcre2.h.generic src/config.h.generic
311 # These are the header files we'll install. We do not distribute pcre2.h
312 # because it is generated from pcre2.h.in.
314 nodist_include_HEADERS = src/pcre2.h
315 include_HEADERS = src/pcre2posix.h
317 # This is the "config" script.
319 bin_SCRIPTS = pcre2-config
321 ## ---------------------------------------------------------------
322 ## The dftables program is used to rebuild character tables before compiling
323 ## PCRE2, if --enable-rebuild-chartables is specified. It is not a user-visible
324 ## program. The default (when --enable-rebuild-chartables is not specified) is
325 ## to copy a distributed set of tables that are defined for ASCII code. In this
326 ## case, dftables is not needed.
328 if WITH_REBUILD_CHARTABLES
329 noinst_PROGRAMS += dftables
330 dftables_SOURCES = src/dftables.c
331 src/pcre2_chartables.c: dftables$(EXEEXT)
333 ./dftables$(EXEEXT) $@
335 src/pcre2_chartables.c: $(srcdir)/src/pcre2_chartables.c.dist
337 $(LN_S) $(abs_srcdir)/src/pcre2_chartables.c.dist $(abs_builddir)/src/pcre2_chartables.c
338 endif # WITH_REBUILD_CHARTABLES
340 BUILT_SOURCES = src/pcre2_chartables.c
341 NODIST_SOURCES = src/pcre2_chartables.c
343 ## Define the list of common sources, then arrange to build whichever of the
344 ## 8-, 16-, or 32-bit libraries are configured.
347 src/pcre2_auto_possess.c \
348 src/pcre2_compile.c \
350 src/pcre2_context.c \
351 src/pcre2_convert.c \
352 src/pcre2_dfa_match.c \
355 src/pcre2_find_bracket.c \
356 src/pcre2_internal.h \
357 src/pcre2_intmodedep.h \
358 src/pcre2_jit_compile.c \
359 src/pcre2_maketables.c \
361 src/pcre2_match_data.c \
362 src/pcre2_newline.c \
363 src/pcre2_ord2utf.c \
364 src/pcre2_pattern_info.c \
365 src/pcre2_serialize.c \
366 src/pcre2_string_utils.c \
368 src/pcre2_substitute.c \
369 src/pcre2_substring.c \
373 src/pcre2_valid_utf.c \
377 lib_LTLIBRARIES += libpcre2-8.la
378 libpcre2_8_la_SOURCES = \
380 nodist_libpcre2_8_la_SOURCES = \
382 libpcre2_8_la_CFLAGS = \
383 -DPCRE2_CODE_UNIT_WIDTH=8 \
384 $(VISIBILITY_CFLAGS) \
386 libpcre2_8_la_LIBADD =
390 lib_LTLIBRARIES += libpcre2-16.la
391 libpcre2_16_la_SOURCES = \
393 nodist_libpcre2_16_la_SOURCES = \
395 libpcre2_16_la_CFLAGS = \
396 -DPCRE2_CODE_UNIT_WIDTH=16 \
397 $(VISIBILITY_CFLAGS) \
399 libpcre2_16_la_LIBADD =
400 endif # WITH_PCRE2_16
403 lib_LTLIBRARIES += libpcre2-32.la
404 libpcre2_32_la_SOURCES = \
406 nodist_libpcre2_32_la_SOURCES = \
408 libpcre2_32_la_CFLAGS = \
409 -DPCRE2_CODE_UNIT_WIDTH=32 \
410 $(VISIBILITY_CFLAGS) \
412 libpcre2_32_la_LIBADD =
413 endif # WITH_PCRE2_32
415 # The pcre2_chartables.c.dist file is the default version of
416 # pcre2_chartables.c, used unless --enable-rebuild-chartables is specified.
418 EXTRA_DIST += src/pcre2_chartables.c.dist
419 CLEANFILES += src/pcre2_chartables.c
421 # The JIT compiler lives in a separate directory, but its files are #included
422 # when pcre2_jit_compile.c is processed, so they must be distributed.
425 src/sljit/sljitConfig.h \
426 src/sljit/sljitConfigInternal.h \
427 src/sljit/sljitExecAllocator.c \
428 src/sljit/sljitLir.c \
429 src/sljit/sljitLir.h \
430 src/sljit/sljitNativeARM_32.c \
431 src/sljit/sljitNativeARM_64.c \
432 src/sljit/sljitNativeARM_T2_32.c \
433 src/sljit/sljitNativeMIPS_32.c \
434 src/sljit/sljitNativeMIPS_64.c \
435 src/sljit/sljitNativeMIPS_common.c \
436 src/sljit/sljitNativePPC_32.c \
437 src/sljit/sljitNativePPC_64.c \
438 src/sljit/sljitNativePPC_common.c \
439 src/sljit/sljitNativeSPARC_32.c \
440 src/sljit/sljitNativeSPARC_common.c \
441 src/sljit/sljitNativeTILEGX-encoder.c \
442 src/sljit/sljitNativeTILEGX_64.c \
443 src/sljit/sljitNativeX86_32.c \
444 src/sljit/sljitNativeX86_64.c \
445 src/sljit/sljitNativeX86_common.c \
446 src/sljit/sljitProtExecAllocator.c \
447 src/sljit/sljitUtils.c
449 # Some of the JIT sources are also in separate files that are #included.
452 src/pcre2_jit_match.c \
456 libpcre2_8_la_LDFLAGS = $(EXTRA_LIBPCRE2_8_LDFLAGS)
459 libpcre2_16_la_LDFLAGS = $(EXTRA_LIBPCRE2_16_LDFLAGS)
460 endif # WITH_PCRE2_16
462 libpcre2_32_la_LDFLAGS = $(EXTRA_LIBPCRE2_32_LDFLAGS)
463 endif # WITH_PCRE2_32
467 libpcre2_8_la_CFLAGS += $(VALGRIND_CFLAGS)
470 libpcre2_16_la_CFLAGS += $(VALGRIND_CFLAGS)
471 endif # WITH_PCRE2_16
473 libpcre2_32_la_CFLAGS += $(VALGRIND_CFLAGS)
474 endif # WITH_PCRE2_32
475 endif # WITH_VALGRIND
479 libpcre2_8_la_CFLAGS += $(GCOV_CFLAGS)
482 libpcre2_16_la_CFLAGS += $(GCOV_CFLAGS)
483 endif # WITH_PCRE2_16
485 libpcre2_32_la_CFLAGS += $(GCOV_CFLAGS)
486 endif # WITH_PCRE2_32
489 ## A version of the 8-bit library that has a POSIX API.
492 lib_LTLIBRARIES += libpcre2-posix.la
493 libpcre2_posix_la_SOURCES = src/pcre2posix.c
494 libpcre2_posix_la_CFLAGS = \
495 -DPCRE2_CODE_UNIT_WIDTH=8 \
496 $(VISIBILITY_CFLAGS) $(AM_CFLAGS)
497 libpcre2_posix_la_LDFLAGS = $(EXTRA_LIBPCRE2_POSIX_LDFLAGS)
498 libpcre2_posix_la_LIBADD = libpcre2-8.la
500 libpcre2_posix_la_CFLAGS += $(GCOV_CFLAGS)
504 ## Build pcre2grep and optional fuzzer stuff if the 8-bit library is enabled
507 bin_PROGRAMS += pcre2grep
508 pcre2grep_SOURCES = src/pcre2grep.c
509 pcre2grep_CFLAGS = $(AM_CFLAGS)
510 pcre2grep_LDADD = $(LIBZ) $(LIBBZ2)
511 pcre2grep_LDADD += libpcre2-8.la
513 pcre2grep_CFLAGS += $(GCOV_CFLAGS)
514 pcre2grep_LDADD += $(GCOV_LIBS)
517 ## If fuzzer support is enabled, build a non-distributed library containing the
518 ## fuzzing function. Also build the standalone checking binary from the same
519 ## source but using -DSTANDALONE.
522 noinst_LIBRARIES = .libs/libpcre2-fuzzsupport.a
523 _libs_libpcre2_fuzzsupport_a_SOURCES = src/pcre2_fuzzsupport.c
524 _libs_libpcre2_fuzzsupport_a_CFLAGS = $(AM_CFLAGS)
525 _libs_libpcre2_fuzzsupport_a_LIBADD =
527 noinst_PROGRAMS += pcre2fuzzcheck
528 pcre2fuzzcheck_SOURCES = src/pcre2_fuzzsupport.c
529 pcre2fuzzcheck_CFLAGS = -DSTANDALONE $(AM_CFLAGS)
530 pcre2fuzzcheck_LDADD = libpcre2-8.la
531 endif # WITH FUZZ_SUPPORT
534 ## -------- Testing ----------
536 ## If JIT support is enabled, arrange for the JIT test program to run.
539 TESTS += pcre2_jit_test
540 noinst_PROGRAMS += pcre2_jit_test
541 pcre2_jit_test_SOURCES = src/pcre2_jit_test.c
542 pcre2_jit_test_CFLAGS = $(AM_CFLAGS)
543 pcre2_jit_test_LDADD =
545 pcre2_jit_test_LDADD += libpcre2-8.la
548 pcre2_jit_test_LDADD += libpcre2-16.la
549 endif # WITH_PCRE2_16
551 pcre2_jit_test_LDADD += libpcre2-32.la
552 endif # WITH_PCRE2_32
554 pcre2_jit_test_CFLAGS += $(GCOV_CFLAGS)
555 pcre2_jit_test_LDADD += $(GCOV_LIBS)
559 # Build the general pcre2test program. The file src/pcre2_printint.c is
560 # #included by pcre2test as many times as needed, at different code unit
563 bin_PROGRAMS += pcre2test
564 EXTRA_DIST += src/pcre2_printint.c
565 pcre2test_SOURCES = src/pcre2test.c
566 pcre2test_CFLAGS = $(AM_CFLAGS)
567 pcre2test_LDADD = $(LIBREADLINE)
570 pcre2test_LDADD += libpcre2-8.la libpcre2-posix.la
574 pcre2test_LDADD += libpcre2-16.la
575 endif # WITH_PCRE2_16
578 pcre2test_LDADD += libpcre2-32.la
579 endif # WITH_PCRE2_32
582 pcre2test_CFLAGS += $(VALGRIND_CFLAGS)
583 endif # WITH_VALGRIND
586 pcre2test_CFLAGS += $(GCOV_CFLAGS)
587 pcre2test_LDADD += $(GCOV_LIBS)
590 ## The main library tests. Each test is a binary plus a script that runs that
591 ## binary in various ways. We install these test binaries in case folks find it
592 ## helpful. The two .bat files are for running the tests under Windows.
595 EXTRA_DIST += RunTest.bat
596 dist_noinst_SCRIPTS += RunTest
598 ## When the 8-bit library is configured, pcre2grep will have been built.
602 EXTRA_DIST += RunGrepTest.bat
603 dist_noinst_SCRIPTS += RunGrepTest
606 ## Distribute all the test data files
609 testdata/grepbinary \
610 testdata/grepfilelist \
612 testdata/grepinput3 \
613 testdata/grepinput8 \
614 testdata/grepinputM \
615 testdata/grepinputv \
616 testdata/grepinputx \
618 testdata/grepoutput \
619 testdata/grepoutput8 \
620 testdata/grepoutputC \
621 testdata/grepoutputN \
623 testdata/testinput1 \
624 testdata/testinput2 \
625 testdata/testinput3 \
626 testdata/testinput4 \
627 testdata/testinput5 \
628 testdata/testinput6 \
629 testdata/testinput7 \
630 testdata/testinput8 \
631 testdata/testinput9 \
632 testdata/testinput10 \
633 testdata/testinput11 \
634 testdata/testinput12 \
635 testdata/testinput13 \
636 testdata/testinput14 \
637 testdata/testinput15 \
638 testdata/testinput16 \
639 testdata/testinput17 \
640 testdata/testinput18 \
641 testdata/testinput19 \
642 testdata/testinput20 \
643 testdata/testinput21 \
644 testdata/testinput22 \
645 testdata/testinput23 \
646 testdata/testinput24 \
647 testdata/testinput25 \
648 testdata/testinputEBC \
649 testdata/testoutput1 \
650 testdata/testoutput2 \
651 testdata/testoutput3 \
652 testdata/testoutput3A \
653 testdata/testoutput3B \
654 testdata/testoutput4 \
655 testdata/testoutput5 \
656 testdata/testoutput6 \
657 testdata/testoutput7 \
658 testdata/testoutput8-16-2 \
659 testdata/testoutput8-16-3 \
660 testdata/testoutput8-16-4 \
661 testdata/testoutput8-32-2 \
662 testdata/testoutput8-32-3 \
663 testdata/testoutput8-32-4 \
664 testdata/testoutput8-8-2 \
665 testdata/testoutput8-8-3 \
666 testdata/testoutput8-8-4 \
667 testdata/testoutput9 \
668 testdata/testoutput10 \
669 testdata/testoutput11-16 \
670 testdata/testoutput11-32 \
671 testdata/testoutput12-16 \
672 testdata/testoutput12-32 \
673 testdata/testoutput13 \
674 testdata/testoutput14-16 \
675 testdata/testoutput14-32 \
676 testdata/testoutput14-8 \
677 testdata/testoutput15 \
678 testdata/testoutput16 \
679 testdata/testoutput17 \
680 testdata/testoutput18 \
681 testdata/testoutput19 \
682 testdata/testoutput20 \
683 testdata/testoutput21 \
684 testdata/testoutput22-16 \
685 testdata/testoutput22-32 \
686 testdata/testoutput22-8 \
687 testdata/testoutput23 \
688 testdata/testoutput24 \
689 testdata/testoutput25 \
690 testdata/testoutputEBC \
691 testdata/valgrind-jit.supp \
692 testdata/wintestinput3 \
693 testdata/wintestoutput3 \
696 # RunTest and RunGrepTest should clean up after themselves, but just in case
697 # they don't, add their working files to CLEANFILES.
714 ## ------------ End of testing -------------
717 # PCRE2 demonstration program. Not built automatcally. The point is that the
718 # users should build it themselves. So just distribute the source.
720 EXTRA_DIST += src/pcre2demo.c
723 # We have .pc files for pkg-config users.
725 pkgconfigdir = $(libdir)/pkgconfig
729 pkgconfig_DATA += libpcre2-8.pc libpcre2-posix.pc
733 pkgconfig_DATA += libpcre2-16.pc
737 pkgconfig_DATA += libpcre2-32.pc
741 # gcov/lcov code coverage reporting
743 # Coverage reporting targets:
745 # coverage: Create a coverage report from 'make check'
746 # coverage-baseline: Capture baseline coverage information
747 # coverage-reset: This zeros the coverage counters only
748 # coverage-report: This creates the coverage report only
749 # coverage-clean-report: This removes the generated coverage report
750 # without cleaning the coverage data itself
751 # coverage-clean-data: This removes the captured coverage data without
752 # removing the coverage files created at compile time (*.gcno)
753 # coverage-clean: This cleans all coverage data including the generated
757 COVERAGE_TEST_NAME = $(PACKAGE)
758 COVERAGE_NAME = $(PACKAGE)-$(VERSION)
759 COVERAGE_OUTPUT_FILE = $(COVERAGE_NAME)-coverage.info
760 COVERAGE_OUTPUT_DIR = $(COVERAGE_NAME)-coverage
761 COVERAGE_LCOV_EXTRA_FLAGS =
762 COVERAGE_GENHTML_EXTRA_FLAGS =
764 coverage_quiet = $(coverage_quiet_$(V))
765 coverage_quiet_ = $(coverage_quiet_$(AM_DEFAULT_VERBOSITY))
766 coverage_quiet_0 = --quiet
769 -$(MAKE) $(AM_MAKEFLAGS) -k check
772 $(LCOV) $(coverage_quiet) \
773 --directory $(top_builddir) \
774 --output-file "$(COVERAGE_OUTPUT_FILE)" \
779 $(LCOV) $(coverage_quiet) \
780 --directory $(top_builddir) \
782 --output-file "$(COVERAGE_OUTPUT_FILE).tmp" \
783 --test-name "$(COVERAGE_TEST_NAME)" \
786 $(COVERAGE_LCOV_EXTRA_FLAGS)
787 $(LCOV) $(coverage_quiet) \
788 --directory $(top_builddir) \
789 --output-file "$(COVERAGE_OUTPUT_FILE)" \
790 --remove "$(COVERAGE_OUTPUT_FILE).tmp" \
794 -@rm -f "$(COVERAGE_OUTPUT_FILE).tmp"
795 LANG=C $(GENHTML) $(coverage_quiet) \
796 --prefix $(top_builddir) \
797 --output-directory "$(COVERAGE_OUTPUT_DIR)" \
798 --title "$(PACKAGE) $(VERSION) Code Coverage Report" \
799 --show-details "$(COVERAGE_OUTPUT_FILE)" \
801 $(COVERAGE_GENHTML_EXTRA_FLAGS)
802 @echo "Code coverage report written to file://$(abs_builddir)/$(COVERAGE_OUTPUT_DIR)/index.html"
805 -$(LCOV) $(coverage_quiet) --zerocounters --directory $(top_builddir)
807 coverage-clean-report:
808 -rm -f "$(COVERAGE_OUTPUT_FILE)" "$(COVERAGE_OUTPUT_FILE).tmp"
809 -rm -rf "$(COVERAGE_OUTPUT_DIR)"
812 -find $(top_builddir) -name "*.gcda" -delete
814 coverage-clean: coverage-reset coverage-clean-report coverage-clean-data
815 -find $(top_builddir) -name "*.gcno" -delete
817 coverage-distclean: coverage-clean
819 coverage: coverage-reset coverage-baseline coverage-check coverage-report
820 clean-local: coverage-clean
821 distclean-local: coverage-distclean
823 .PHONY: coverage coverage-baseline coverage-check coverage-report coverage-reset coverage-clean-report coverage-clean-data coverage-clean coverage-distclean
825 # Without coverage support, still arrange for 'make distclean' to get rid of
826 # any coverage files that may have been left from a different configuration.
831 @echo "Configuring with --enable-coverage is required to generate code coverage report."
833 DISTCLEANFILES += src/*.gcda src/*.gcno
836 rm -rf $(PACKAGE)-$(VERSION)-coverage*
843 cmake/COPYING-CMAKE-SCRIPTS \
844 cmake/FindPackageHandleStandardArgs.cmake \
845 cmake/FindReadline.cmake \
846 cmake/FindEditline.cmake \