/[pcre]/code/trunk/Makefile.am
ViewVC logotype

Contents of /code/trunk/Makefile.am

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1235 - (show annotations)
Mon Dec 10 13:36:29 2012 UTC (7 years ago) by ph10
File size: 26775 byte(s)
Ensure boolean macros are #undeffed in pcre.h.generic.
1 ## Process this file with automake to produce Makefile.in.
2
3 ACLOCAL_AMFLAGS = -I m4
4
5 dist_doc_DATA = \
6 doc/pcre.txt \
7 doc/pcre-config.txt \
8 doc/pcregrep.txt \
9 doc/pcretest.txt \
10 AUTHORS \
11 COPYING \
12 ChangeLog \
13 LICENCE \
14 NEWS \
15 README
16
17 dist_html_DATA = \
18 doc/html/index.html \
19 doc/html/pcre.html \
20 doc/html/pcre16.html \
21 doc/html/pcre32.html \
22 doc/html/pcre-config.html \
23 doc/html/pcre_assign_jit_stack.html \
24 doc/html/pcre_compile.html \
25 doc/html/pcre_compile2.html \
26 doc/html/pcre_config.html \
27 doc/html/pcre_copy_named_substring.html \
28 doc/html/pcre_copy_substring.html \
29 doc/html/pcre_dfa_exec.html \
30 doc/html/pcre_exec.html \
31 doc/html/pcre_free_study.html \
32 doc/html/pcre_free_substring.html \
33 doc/html/pcre_free_substring_list.html \
34 doc/html/pcre_fullinfo.html \
35 doc/html/pcre_get_named_substring.html \
36 doc/html/pcre_get_stringnumber.html \
37 doc/html/pcre_get_stringtable_entries.html \
38 doc/html/pcre_get_substring.html \
39 doc/html/pcre_get_substring_list.html \
40 doc/html/pcre_jit_exec.html \
41 doc/html/pcre_jit_stack_alloc.html \
42 doc/html/pcre_jit_stack_free.html \
43 doc/html/pcre_maketables.html \
44 doc/html/pcre_pattern_to_host_byte_order.html \
45 doc/html/pcre_refcount.html \
46 doc/html/pcre_study.html \
47 doc/html/pcre_utf16_to_host_byte_order.html \
48 doc/html/pcre_utf32_to_host_byte_order.html \
49 doc/html/pcre_version.html \
50 doc/html/pcreapi.html \
51 doc/html/pcrebuild.html \
52 doc/html/pcrecallout.html \
53 doc/html/pcrecompat.html \
54 doc/html/pcredemo.html \
55 doc/html/pcregrep.html \
56 doc/html/pcrejit.html \
57 doc/html/pcrelimits.html \
58 doc/html/pcrematching.html \
59 doc/html/pcrepartial.html \
60 doc/html/pcrepattern.html \
61 doc/html/pcreperform.html \
62 doc/html/pcreposix.html \
63 doc/html/pcreprecompile.html \
64 doc/html/pcresample.html \
65 doc/html/pcrestack.html \
66 doc/html/pcresyntax.html \
67 doc/html/pcretest.html \
68 doc/html/pcreunicode.html
69
70 pcrecpp_html = doc/html/pcrecpp.html
71 dist_noinst_DATA = $(pcrecpp_html)
72
73 if WITH_PCRE_CPP
74 html_DATA = $(pcrecpp_html)
75 endif
76
77 # The Libtool libraries to install. We'll add to this later.
78 lib_LTLIBRARIES =
79
80 # Unit tests you want to run when people type 'make check'.
81 # TESTS is for binary unit tests, check_SCRIPTS for script-based tests
82 TESTS =
83 check_SCRIPTS =
84 dist_noinst_SCRIPTS =
85
86 # Some of the binaries we make are to be installed, and others are
87 # (non-user-visible) helper programs needed to build libpcre, libpcre16
88 # or libpcre32.
89 bin_PROGRAMS =
90 noinst_PROGRAMS =
91
92 # Additional files to delete on 'make clean' and 'make maintainer-clean'.
93 CLEANFILES =
94 MAINTAINERCLEANFILES =
95
96 # Additional files to bundle with the distribution, over and above what
97 # the Autotools include by default.
98 EXTRA_DIST =
99
100 # These files contain additional m4 macros that are used by autoconf.
101 EXTRA_DIST += \
102 m4/ax_pthread.m4 m4/pcre_visibility.m4
103
104 # These files contain maintenance information
105 EXTRA_DIST += \
106 doc/perltest.txt \
107 NON-UNIX-USE \
108 NON-AUTOTOOLS-BUILD \
109 HACKING
110
111 # These files are used in the preparation of a release
112 EXTRA_DIST += \
113 PrepareRelease \
114 CheckMan \
115 CleanTxt \
116 Detrail \
117 132html \
118 doc/index.html.src
119
120 # These files are to do with building for Virtual Pascal
121 EXTRA_DIST += \
122 makevp.bat \
123 makevp_c.txt \
124 makevp_l.txt \
125 pcregexp.pas
126
127 # These files are usable versions of pcre.h and config.h that are distributed
128 # for the benefit of people who are building PCRE manually, without the
129 # Autotools support.
130 EXTRA_DIST += \
131 pcre.h.generic \
132 config.h.generic
133
134 # The only difference between pcre.h.in and pcre.h is the setting of the PCRE
135 # version number. Therefore, we can create the generic version just by copying.
136 pcre.h.generic: pcre.h.in configure.ac
137 rm -f $@
138 cp -p pcre.h $@
139
140 # It is more complicated for config.h.generic. We need the version that results
141 # from a default configuration so as to get all the default values for PCRE
142 # configuration macros such as MATCH_LIMIT and NEWLINE. We can get this by
143 # doing a configure in a temporary directory. However, some trickery is needed,
144 # because the source directory may already be configured. If you just try
145 # running configure in a new directory, it complains. For this reason, we move
146 # config.status out of the way while doing the default configuration. The
147 # resulting config.h is munged by perl to put #ifdefs round any #defines for
148 # macros with values, and to #undef all boolean macros such as HAVE_xxx and
149 # SUPPORT_xxx. We also get rid of any gcc-specific visibility settings. Make
150 # sure that PCRE_EXP_DEFN is unset (in case it has visibility settings).
151 config.h.generic: configure.ac
152 rm -rf $@ _generic
153 mkdir _generic
154 cs=$(srcdir)/config.status; test ! -f $$cs || mv -f $$cs $$cs.aside
155 cd _generic && $(abs_top_srcdir)/configure || :
156 cs=$(srcdir)/config.status; test ! -f $$cs.aside || mv -f $$cs.aside $$cs
157 test -f _generic/config.h
158 perl -n \
159 -e 'BEGIN{$$blank=0;}' \
160 -e 'if(/PCRE_EXP_DEFN/){print"/* #undef PCRE_EXP_DEFN */\n";$$blank=0;next;}' \
161 -e 'if(/to make a symbol visible/){next;}' \
162 -e 'if(/__attribute__ \(\(visibility/){next;}' \
163 -e 'if(/LT_OBJDIR/){print"/* This is ignored unless you are using libtool. */\n";}' \
164 -e 'if(/^#define\s((?:HAVE|SUPPORT|STDC)_\w+)/){print"/* #undef $$1 */\n";$$blank=0;next;}' \
165 -e 'if(/^#define\s(?!PACKAGE|VERSION)(\w+)/){print"#ifndef $$1\n$$_#endif\n";$$blank=0;next;}' \
166 -e 'if(/^\s*$$/){print unless $$blank; $$blank=1;} else{print;$$blank=0;}' \
167 _generic/config.h >$@
168 rm -rf _generic
169
170 MAINTAINERCLEANFILES += pcre.h.generic config.h.generic
171
172 # These are the header files we'll install. We do not distribute pcre.h because
173 # it is generated from pcre.h.in.
174 nodist_include_HEADERS = \
175 pcre.h
176 include_HEADERS = \
177 pcreposix.h
178
179 # These additional headers will be be installed if C++ support is enabled. We
180 # do not distribute pcrecpparg.h or pcre_stringpiece.h, as these are generated
181 # from corresponding .h.in files (which we do distribute).
182 if WITH_PCRE_CPP
183 nodist_include_HEADERS += \
184 pcrecpparg.h \
185 pcre_stringpiece.h
186 include_HEADERS += \
187 pcrecpp.h \
188 pcre_scanner.h
189 endif # WITH_PCRE_CPP
190
191 bin_SCRIPTS = pcre-config
192
193 ## ---------------------------------------------------------------
194 ## The dftables program is used to rebuild character tables before compiling
195 ## PCRE, if --enable-rebuild-chartables is specified. It is not a user-visible
196 ## program. The default (when --enable-rebuild-chartables is not specified) is
197 ## to copy a distributed set of tables that are defined for ASCII code. In this
198 ## case, dftables is not needed.
199
200 if WITH_REBUILD_CHARTABLES
201
202 noinst_PROGRAMS += dftables
203 dftables_SOURCES = dftables.c
204
205 pcre_chartables.c: dftables$(EXEEXT)
206 ./dftables$(EXEEXT) $@
207 else
208
209 pcre_chartables.c: $(srcdir)/pcre_chartables.c.dist
210 rm -f $@
211 $(LN_S) $(srcdir)/pcre_chartables.c.dist $@
212
213 endif # WITH_REBUILD_CHARTABLES
214
215 BUILT_SOURCES = pcre_chartables.c
216
217 ## The main pcre library
218
219 # Build the 8 bit library if it is enabled.
220 if WITH_PCRE8
221 lib_LTLIBRARIES += libpcre.la
222
223 libpcre_la_SOURCES = \
224 pcre_byte_order.c \
225 pcre_compile.c \
226 pcre_config.c \
227 pcre_dfa_exec.c \
228 pcre_exec.c \
229 pcre_fullinfo.c \
230 pcre_get.c \
231 pcre_globals.c \
232 pcre_internal.h \
233 pcre_jit_compile.c \
234 pcre_maketables.c \
235 pcre_newline.c \
236 pcre_ord2utf8.c \
237 pcre_refcount.c \
238 pcre_string_utils.c \
239 pcre_study.c \
240 pcre_tables.c \
241 pcre_ucd.c \
242 pcre_valid_utf8.c \
243 pcre_version.c \
244 pcre_xclass.c \
245 ucp.h
246
247 libpcre_la_CFLAGS = \
248 $(VISIBILITY_CFLAGS) \
249 $(AM_CFLAGS)
250
251 libpcre_la_LIBADD =
252
253 ## This file is generated as part of the building process, so don't distribute.
254 nodist_libpcre_la_SOURCES = \
255 pcre_chartables.c
256
257 endif # WITH_PCRE8
258
259 # Build the 16 bit library if it is enabled.
260 if WITH_PCRE16
261 lib_LTLIBRARIES += libpcre16.la
262 libpcre16_la_SOURCES = \
263 pcre16_byte_order.c \
264 pcre16_chartables.c \
265 pcre16_compile.c \
266 pcre16_config.c \
267 pcre16_dfa_exec.c \
268 pcre16_exec.c \
269 pcre16_fullinfo.c \
270 pcre16_get.c \
271 pcre16_globals.c \
272 pcre16_jit_compile.c \
273 pcre16_maketables.c \
274 pcre16_newline.c \
275 pcre16_ord2utf16.c \
276 pcre16_refcount.c \
277 pcre16_string_utils.c \
278 pcre16_study.c \
279 pcre16_tables.c \
280 pcre16_ucd.c \
281 pcre16_utf16_utils.c \
282 pcre16_valid_utf16.c \
283 pcre16_version.c \
284 pcre16_xclass.c
285
286 libpcre16_la_CFLAGS = \
287 $(VISIBILITY_CFLAGS) \
288 $(AM_CFLAGS)
289
290 libpcre16_la_LIBADD =
291
292 ## This file is generated as part of the building process, so don't distribute.
293 nodist_libpcre16_la_SOURCES = \
294 pcre_chartables.c
295
296 endif # WITH_PCRE16
297
298 # Build the 32 bit library if it is enabled.
299 if WITH_PCRE32
300 lib_LTLIBRARIES += libpcre32.la
301 libpcre32_la_SOURCES = \
302 pcre32_byte_order.c \
303 pcre32_chartables.c \
304 pcre32_compile.c \
305 pcre32_config.c \
306 pcre32_dfa_exec.c \
307 pcre32_exec.c \
308 pcre32_fullinfo.c \
309 pcre32_get.c \
310 pcre32_globals.c \
311 pcre32_jit_compile.c \
312 pcre32_maketables.c \
313 pcre32_newline.c \
314 pcre32_ord2utf32.c \
315 pcre32_refcount.c \
316 pcre32_string_utils.c \
317 pcre32_study.c \
318 pcre32_tables.c \
319 pcre32_ucd.c \
320 pcre32_utf32_utils.c \
321 pcre32_valid_utf32.c \
322 pcre32_version.c \
323 pcre32_xclass.c
324
325 libpcre32_la_CFLAGS = \
326 $(VISIBILITY_CFLAGS) \
327 $(AM_CFLAGS)
328
329 libpcre32_la_LIBADD =
330
331 ## This file is generated as part of the building process, so don't distribute.
332 nodist_libpcre32_la_SOURCES = \
333 pcre_chartables.c
334
335 endif # WITH_PCRE32
336
337 # The pcre_chartables.c.dist file is the default version of pcre_chartables.c,
338 # used unless --enable-rebuild-chartables is specified.
339 EXTRA_DIST += pcre_chartables.c.dist
340
341 # The JIT compiler lives in a separate directory, but its files are #included
342 # when pcre_jit_compile.c is processed, so they must be distributed.
343 EXTRA_DIST += \
344 sljit/sljitConfig.h \
345 sljit/sljitConfigInternal.h \
346 sljit/sljitExecAllocator.c \
347 sljit/sljitLir.c \
348 sljit/sljitLir.h \
349 sljit/sljitNativeARM_Thumb2.c \
350 sljit/sljitNativeARM_v5.c \
351 sljit/sljitNativeMIPS_32.c \
352 sljit/sljitNativeMIPS_common.c \
353 sljit/sljitNativePPC_32.c \
354 sljit/sljitNativePPC_64.c \
355 sljit/sljitNativePPC_common.c \
356 sljit/sljitNativeSPARC_32.c \
357 sljit/sljitNativeSPARC_common.c \
358 sljit/sljitNativeX86_32.c \
359 sljit/sljitNativeX86_64.c \
360 sljit/sljitNativeX86_common.c \
361 sljit/sljitUtils.c
362
363 if WITH_PCRE8
364 libpcre_la_LDFLAGS = $(EXTRA_LIBPCRE_LDFLAGS)
365 endif # WITH_PCRE8
366 if WITH_PCRE16
367 libpcre16_la_LDFLAGS = $(EXTRA_LIBPCRE16_LDFLAGS)
368 endif # WITH_PCRE16
369 if WITH_PCRE32
370 libpcre32_la_LDFLAGS = $(EXTRA_LIBPCRE32_LDFLAGS)
371 endif # WITH_PCRE32
372
373 if WITH_VALGRIND
374 if WITH_PCRE8
375 libpcre_la_CFLAGS += $(VALGRIND_CFLAGS)
376 endif # WITH_PCRE8
377 if WITH_PCRE16
378 libpcre16_la_CFLAGS += $(VALGRIND_CFLAGS)
379 endif # WITH_PCRE16
380 if WITH_PCRE32
381 libpcre32_la_CFLAGS += $(VALGRIND_CFLAGS)
382 endif # WITH_PCRE32
383 endif # WITH_VALGRIND
384
385 if WITH_GCOV
386 if WITH_PCRE8
387 libpcre_la_CFLAGS += $(GCOV_CFLAGS)
388 endif # WITH_PCRE8
389 if WITH_PCRE16
390 libpcre16_la_CFLAGS += $(GCOV_CFLAGS)
391 endif # WITH_PCRE16
392 if WITH_PCRE32
393 libpcre32_la_CFLAGS += $(GCOV_CFLAGS)
394 endif # WITH_PCRE32
395 endif # WITH_GCOV
396
397 CLEANFILES += pcre_chartables.c
398
399 ## If JIT support is enabled, arrange for the JIT test program to run.
400 if WITH_JIT
401 TESTS += pcre_jit_test
402 noinst_PROGRAMS += pcre_jit_test
403 pcre_jit_test_SOURCES = pcre_jit_test.c
404 pcre_jit_test_CFLAGS = $(AM_CFLAGS)
405 pcre_jit_test_LDADD =
406 if WITH_PCRE8
407 pcre_jit_test_LDADD += libpcre.la
408 endif # WITH_PCRE8
409 if WITH_PCRE16
410 pcre_jit_test_LDADD += libpcre16.la
411 endif # WITH_PCRE16
412 if WITH_PCRE32
413 pcre_jit_test_LDADD += libpcre32.la
414 endif # WITH_PCRE32
415 if WITH_GCOV
416 pcre_jit_test_CFLAGS += $(GCOV_CFLAGS)
417 pcre_jit_test_LDADD += $(GCOV_LIBS)
418 endif # WITH_GCOV
419 endif # WITH_JIT
420
421 ## A version of the main pcre library that has a posix re API.
422 if WITH_PCRE8
423
424 lib_LTLIBRARIES += libpcreposix.la
425 libpcreposix_la_SOURCES = \
426 pcreposix.c
427 libpcreposix_la_CFLAGS = $(VISIBILITY_CFLAGS) $(AM_CFLAGS)
428 libpcreposix_la_LDFLAGS = $(EXTRA_LIBPCREPOSIX_LDFLAGS)
429 libpcreposix_la_LIBADD = libpcre.la
430
431 if WITH_GCOV
432 libpcreposix_la_CFLAGS += $(GCOV_CFLAGS)
433 endif # WITH_GCOV
434
435 endif # WITH_PCRE8
436
437 ## There's a C++ library as well.
438 if WITH_PCRE_CPP
439
440 lib_LTLIBRARIES += libpcrecpp.la
441 libpcrecpp_la_SOURCES = \
442 pcrecpp_internal.h \
443 pcrecpp.cc \
444 pcre_scanner.cc \
445 pcre_stringpiece.cc
446 libpcrecpp_la_CXXFLAGS = $(VISIBILITY_CXXFLAGS) $(AM_CXXFLAGS)
447 libpcrecpp_la_LDFLAGS = $(EXTRA_LIBPCRECPP_LDFLAGS)
448 libpcrecpp_la_LIBADD = libpcre.la
449
450 TESTS += pcrecpp_unittest
451 noinst_PROGRAMS += pcrecpp_unittest
452 pcrecpp_unittest_SOURCES = pcrecpp_unittest.cc
453 pcrecpp_unittest_CXXFLAGS = $(AM_CXXFLAGS)
454 pcrecpp_unittest_LDADD = libpcrecpp.la
455
456 TESTS += pcre_scanner_unittest
457 noinst_PROGRAMS += pcre_scanner_unittest
458 pcre_scanner_unittest_SOURCES = pcre_scanner_unittest.cc
459 pcre_scanner_unittest_CXXFLAGS = $(AM_CXXFLAGS)
460 pcre_scanner_unittest_LDADD = libpcrecpp.la
461
462 TESTS += pcre_stringpiece_unittest
463 noinst_PROGRAMS += pcre_stringpiece_unittest
464 pcre_stringpiece_unittest_SOURCES = pcre_stringpiece_unittest.cc
465 pcre_stringpiece_unittest_CXXFLAGS = $(AM_CXXFLAGS)
466 pcre_stringpiece_unittest_LDADD = libpcrecpp.la
467
468 if WITH_GCOV
469 libpcrecpp_la_CXXFLAGS += $(GCOV_CXXFLAGS)
470 pcrecpp_unittest_LDADD += $(GCOV_LIBS)
471 pcre_scanner_unittest_LDADD += $(GCOV_LIBS)
472 pcre_stringpiece_unittest_LDADD += $(GCOV_LIBS)
473 endif # WITH_GCOV
474
475 endif # WITH_PCRE_CPP
476
477 ## The main unit tests
478
479 # Each unit test is a binary plus a script that runs that binary in various
480 # ways. We install these test binaries in case folks find it helpful.
481
482 TESTS += RunTest
483 dist_noinst_SCRIPTS += RunTest
484 EXTRA_DIST += RunTest.bat
485 bin_PROGRAMS += pcretest
486 pcretest_SOURCES = pcretest.c
487 pcretest_CFLAGS = $(AM_CFLAGS)
488 pcretest_LDADD = $(LIBREADLINE)
489 if WITH_PCRE8
490 pcretest_SOURCES += pcre_printint.c
491 pcretest_LDADD += libpcre.la libpcreposix.la
492 endif # WITH_PCRE8
493 if WITH_PCRE16
494 pcretest_SOURCES += pcre16_printint.c
495 pcretest_LDADD += libpcre16.la
496 endif # WITH_PCRE16
497 if WITH_PCRE32
498 pcretest_SOURCES += pcre32_printint.c
499 pcretest_LDADD += libpcre32.la
500 endif # WITH_PCRE32
501 if WITH_VALGRIND
502 pcretest_CFLAGS += $(VALGRIND_CFLAGS)
503 endif # WITH_VALGRIND
504 if WITH_GCOV
505 pcretest_CFLAGS += $(GCOV_CFLAGS)
506 pcretest_LDADD += $(GCOV_LIBS)
507 endif # WITH_GCOV
508
509 if WITH_PCRE8
510 TESTS += RunGrepTest
511 dist_noinst_SCRIPTS += RunGrepTest
512 bin_PROGRAMS += pcregrep
513 pcregrep_SOURCES = pcregrep.c
514 pcregrep_CFLAGS = $(AM_CFLAGS)
515 pcregrep_LDADD = $(LIBZ) $(LIBBZ2)
516 pcregrep_LDADD += libpcre.la libpcreposix.la
517 if WITH_GCOV
518 pcregrep_CFLAGS += $(GCOV_CFLAGS)
519 pcregrep_LDADD += $(GCOV_LIBS)
520 endif # WITH_GCOV
521 endif # WITH_PCRE8
522
523 EXTRA_DIST += \
524 testdata/grepbinary \
525 testdata/grepfilelist \
526 testdata/grepinput \
527 testdata/grepinput3 \
528 testdata/grepinput8 \
529 testdata/grepinputv \
530 testdata/grepinputx \
531 testdata/greplist \
532 testdata/grepoutput \
533 testdata/grepoutput8 \
534 testdata/grepoutputN \
535 testdata/greppatN4 \
536 testdata/saved16 \
537 testdata/saved16BE-1 \
538 testdata/saved16BE-2 \
539 testdata/saved16LE-1 \
540 testdata/saved16LE-2 \
541 testdata/saved32 \
542 testdata/saved32BE-1 \
543 testdata/saved32BE-2 \
544 testdata/saved32LE-1 \
545 testdata/saved32LE-2 \
546 testdata/saved8 \
547 testdata/testinput1 \
548 testdata/testinput2 \
549 testdata/testinput3 \
550 testdata/testinput4 \
551 testdata/testinput5 \
552 testdata/testinput6 \
553 testdata/testinput7 \
554 testdata/testinput8 \
555 testdata/testinput9 \
556 testdata/testinput10 \
557 testdata/testinput11 \
558 testdata/testinput12 \
559 testdata/testinput13 \
560 testdata/testinput14 \
561 testdata/testinput15 \
562 testdata/testinput16 \
563 testdata/testinput17 \
564 testdata/testinput18 \
565 testdata/testinput19 \
566 testdata/testinput20 \
567 testdata/testinput21 \
568 testdata/testinput22 \
569 testdata/testinput23 \
570 testdata/testinput24 \
571 testdata/testinput25 \
572 testdata/testinput26 \
573 testdata/testinputEBC \
574 testdata/testoutput1 \
575 testdata/testoutput2 \
576 testdata/testoutput3 \
577 testdata/testoutput4 \
578 testdata/testoutput5 \
579 testdata/testoutput6 \
580 testdata/testoutput7 \
581 testdata/testoutput8 \
582 testdata/testoutput9 \
583 testdata/testoutput10 \
584 testdata/testoutput11-8 \
585 testdata/testoutput11-16 \
586 testdata/testoutput11-32 \
587 testdata/testoutput12 \
588 testdata/testoutput13 \
589 testdata/testoutput14 \
590 testdata/testoutput15 \
591 testdata/testoutput16 \
592 testdata/testoutput17 \
593 testdata/testoutput18-16 \
594 testdata/testoutput18-32 \
595 testdata/testoutput19 \
596 testdata/testoutput20 \
597 testdata/testoutput21-16 \
598 testdata/testoutput21-32 \
599 testdata/testoutput22-16 \
600 testdata/testoutput22-32 \
601 testdata/testoutput23 \
602 testdata/testoutput24 \
603 testdata/testoutput25 \
604 testdata/testoutput26 \
605 testdata/testoutputEBC \
606 testdata/wintestinput3 \
607 testdata/wintestoutput3 \
608 perltest.pl
609
610 CLEANFILES += \
611 testsavedregex \
612 teststderr \
613 testtemp* \
614 testtry \
615 testNinput
616
617
618 # PCRE demonstration program. No longer built automatcally. The point is that
619 # the users should build it themselves. So just distribute the source.
620 # noinst_PROGRAMS += pcredemo
621 # pcredemo_SOURCES = pcredemo.c
622 # pcredemo_LDADD = libpcre.la
623
624 EXTRA_DIST += pcredemo.c
625
626
627 ## Utility rules, documentation, etc.
628
629 # A compatibility line, the old build system worked with 'make test'
630 test: check ;
631
632
633 # A PCRE user submitted the following addition, saying that it "will allow
634 # anyone using the 'mingw32' compiler to simply type 'make pcre.dll' and get a
635 # nice DLL for Windows use". (It is used by the pcre.dll target.)
636 DLL_OBJS= pcre_byte_order.o pcre_compile.o pcre_config.o \
637 pcre_dfa_exec.o pcre_exec.o pcre_fullinfo.o pcre_get.o \
638 pcre_globals.o pcre_jit_compile.o pcre_maketables.o \
639 pcre_newline.o pcre_ord2utf8.o pcre_refcount.o \
640 pcre_study.o pcre_tables.o pcre_ucd.o \
641 pcre_valid_utf8.o pcre_version.o pcre_chartables.o \
642 pcre_xclass.o
643
644 # A PCRE user submitted the following addition, saying that it "will allow
645 # anyone using the 'mingw32' compiler to simply type 'make pcre.dll' and get a
646 # nice DLL for Windows use".
647 pcre.dll: $(DLL_OBJS)
648 $(CC) -shared -o pcre.dll -Wl,"--strip-all" -Wl,"--export-all-symbols" $(DLL_OBJS)
649
650
651 # We have .pc files for pkg-config users.
652 pkgconfigdir = $(libdir)/pkgconfig
653 pkgconfig_DATA = libpcre.pc libpcreposix.pc
654 if WITH_PCRE16
655 pkgconfig_DATA += libpcre16.pc
656 endif
657 if WITH_PCRE32
658 pkgconfig_DATA += libpcre32.pc
659 endif
660 if WITH_PCRE_CPP
661 pkgconfig_DATA += libpcrecpp.pc
662 endif
663
664 dist_man_MANS = \
665 doc/pcre.3 \
666 doc/pcre16.3 \
667 doc/pcre32.3 \
668 doc/pcre-config.1 \
669 doc/pcre_assign_jit_stack.3 \
670 doc/pcre_compile.3 \
671 doc/pcre_compile2.3 \
672 doc/pcre_config.3 \
673 doc/pcre_copy_named_substring.3 \
674 doc/pcre_copy_substring.3 \
675 doc/pcre_dfa_exec.3 \
676 doc/pcre_exec.3 \
677 doc/pcre_free_study.3 \
678 doc/pcre_free_substring.3 \
679 doc/pcre_free_substring_list.3 \
680 doc/pcre_fullinfo.3 \
681 doc/pcre_get_named_substring.3 \
682 doc/pcre_get_stringnumber.3 \
683 doc/pcre_get_stringtable_entries.3 \
684 doc/pcre_get_substring.3 \
685 doc/pcre_get_substring_list.3 \
686 doc/pcre_jit_exec.3 \
687 doc/pcre_jit_stack_alloc.3 \
688 doc/pcre_jit_stack_free.3 \
689 doc/pcre_maketables.3 \
690 doc/pcre_pattern_to_host_byte_order.3 \
691 doc/pcre_refcount.3 \
692 doc/pcre_study.3 \
693 doc/pcre_utf16_to_host_byte_order.3 \
694 doc/pcre_utf32_to_host_byte_order.3 \
695 doc/pcre_version.3 \
696 doc/pcreapi.3 \
697 doc/pcrebuild.3 \
698 doc/pcrecallout.3 \
699 doc/pcrecompat.3 \
700 doc/pcregrep.1 \
701 doc/pcrejit.3 \
702 doc/pcrelimits.3 \
703 doc/pcrematching.3 \
704 doc/pcrepartial.3 \
705 doc/pcrepattern.3 \
706 doc/pcreperform.3 \
707 doc/pcreposix.3 \
708 doc/pcreprecompile.3 \
709 doc/pcresample.3 \
710 doc/pcrestack.3 \
711 doc/pcresyntax.3 \
712 doc/pcretest.1 \
713 doc/pcreunicode.3
714
715 # Arrange for the per-function man pages to have 16- and 32-bit names as well.
716 install-data-hook:
717 ln -sf pcre_assign_jit_stack.3 $(DESTDIR)$(man3dir)/pcre16_assign_jit_stack.3
718 ln -sf pcre_compile.3 $(DESTDIR)$(man3dir)/pcre16_compile.3
719 ln -sf pcre_compile2.3 $(DESTDIR)$(man3dir)/pcre16_compile2.3
720 ln -sf pcre_config.3 $(DESTDIR)$(man3dir)/pcre16_config.3
721 ln -sf pcre_copy_named_substring.3 $(DESTDIR)$(man3dir)/pcre16_copy_named_substring.3
722 ln -sf pcre_copy_substring.3 $(DESTDIR)$(man3dir)/pcre16_copy_substring.3
723 ln -sf pcre_dfa_exec.3 $(DESTDIR)$(man3dir)/pcre16_dfa_exec.3
724 ln -sf pcre_exec.3 $(DESTDIR)$(man3dir)/pcre16_exec.3
725 ln -sf pcre_free_study.3 $(DESTDIR)$(man3dir)/pcre16_free_study.3
726 ln -sf pcre_free_substring.3 $(DESTDIR)$(man3dir)/pcre16_free_substring.3
727 ln -sf pcre_free_substring_list.3 $(DESTDIR)$(man3dir)/pcre16_free_substring_list.3
728 ln -sf pcre_fullinfo.3 $(DESTDIR)$(man3dir)/pcre16_fullinfo.3
729 ln -sf pcre_get_named_substring.3 $(DESTDIR)$(man3dir)/pcre16_get_named_substring.3
730 ln -sf pcre_get_stringnumber.3 $(DESTDIR)$(man3dir)/pcre16_get_stringnumber.3
731 ln -sf pcre_get_stringtable_entries.3 $(DESTDIR)$(man3dir)/pcre16_get_stringtable_entries.3
732 ln -sf pcre_get_substring.3 $(DESTDIR)$(man3dir)/pcre16_get_substring.3
733 ln -sf pcre_get_substring_list.3 $(DESTDIR)$(man3dir)/pcre16_get_substring_list.3
734 ln -sf pcre_jit_exec.3 $(DESTDIR)$(man3dir)/pcre16_jit_exec.3
735 ln -sf pcre_jit_stack_alloc.3 $(DESTDIR)$(man3dir)/pcre16_jit_stack_alloc.3
736 ln -sf pcre_jit_stack_free.3 $(DESTDIR)$(man3dir)/pcre16_jit_stack_free.3
737 ln -sf pcre_maketables.3 $(DESTDIR)$(man3dir)/pcre16_maketables.3
738 ln -sf pcre_pattern_to_host_byte_order.3 $(DESTDIR)$(man3dir)/pcre16_pattern_to_host_byte_order.3
739 ln -sf pcre_refcount.3 $(DESTDIR)$(man3dir)/pcre16_refcount.3
740 ln -sf pcre_study.3 $(DESTDIR)$(man3dir)/pcre16_study.3
741 ln -sf pcre_utf16_to_host_byte_order.3 $(DESTDIR)$(man3dir)/pcre16_utf16_to_host_byte_order.3
742 ln -sf pcre_version.3 $(DESTDIR)$(man3dir)/pcre16_version.3
743 ln -sf pcre_assign_jit_stack.3 $(DESTDIR)$(man3dir)/pcre32_assign_jit_stack.3
744 ln -sf pcre_compile.3 $(DESTDIR)$(man3dir)/pcre32_compile.3
745 ln -sf pcre_compile2.3 $(DESTDIR)$(man3dir)/pcre32_compile2.3
746 ln -sf pcre_config.3 $(DESTDIR)$(man3dir)/pcre32_config.3
747 ln -sf pcre_copy_named_substring.3 $(DESTDIR)$(man3dir)/pcre32_copy_named_substring.3
748 ln -sf pcre_copy_substring.3 $(DESTDIR)$(man3dir)/pcre32_copy_substring.3
749 ln -sf pcre_dfa_exec.3 $(DESTDIR)$(man3dir)/pcre32_dfa_exec.3
750 ln -sf pcre_exec.3 $(DESTDIR)$(man3dir)/pcre32_exec.3
751 ln -sf pcre_free_study.3 $(DESTDIR)$(man3dir)/pcre32_free_study.3
752 ln -sf pcre_free_substring.3 $(DESTDIR)$(man3dir)/pcre32_free_substring.3
753 ln -sf pcre_free_substring_list.3 $(DESTDIR)$(man3dir)/pcre32_free_substring_list.3
754 ln -sf pcre_fullinfo.3 $(DESTDIR)$(man3dir)/pcre32_fullinfo.3
755 ln -sf pcre_get_named_substring.3 $(DESTDIR)$(man3dir)/pcre32_get_named_substring.3
756 ln -sf pcre_get_stringnumber.3 $(DESTDIR)$(man3dir)/pcre32_get_stringnumber.3
757 ln -sf pcre_get_stringtable_entries.3 $(DESTDIR)$(man3dir)/pcre32_get_stringtable_entries.3
758 ln -sf pcre_get_substring.3 $(DESTDIR)$(man3dir)/pcre32_get_substring.3
759 ln -sf pcre_get_substring_list.3 $(DESTDIR)$(man3dir)/pcre32_get_substring_list.3
760 ln -sf pcre_jit_exec.3 $(DESTDIR)$(man3dir)/pcre32_jit_exec.3
761 ln -sf pcre_jit_stack_alloc.3 $(DESTDIR)$(man3dir)/pcre32_jit_stack_alloc.3
762 ln -sf pcre_jit_stack_free.3 $(DESTDIR)$(man3dir)/pcre32_jit_stack_free.3
763 ln -sf pcre_maketables.3 $(DESTDIR)$(man3dir)/pcre32_maketables.3
764 ln -sf pcre_pattern_to_host_byte_order.3 $(DESTDIR)$(man3dir)/pcre32_pattern_to_host_byte_order.3
765 ln -sf pcre_refcount.3 $(DESTDIR)$(man3dir)/pcre32_refcount.3
766 ln -sf pcre_study.3 $(DESTDIR)$(man3dir)/pcre32_study.3
767 ln -sf pcre_utf32_to_host_byte_order.3 $(DESTDIR)$(man3dir)/pcre32_utf32_to_host_byte_order.3
768 ln -sf pcre_version.3 $(DESTDIR)$(man3dir)/pcre32_version.3
769
770 pcrecpp_man = doc/pcrecpp.3
771 EXTRA_DIST += $(pcrecpp_man)
772
773 if WITH_PCRE_CPP
774 man_MANS = $(pcrecpp_man)
775 endif
776
777 # gcov/lcov code coverage reporting
778
779 if WITH_GCOV
780
781 # Coverage reporting targets:
782 #
783 # coverage: Create a coverage report from 'make check'
784 # coverage-baseline: Capture baseline coverage information
785 # coverage-reset: This zeros the coverage counters only
786 # coverage-report: This creates the coverage report only
787 # coverage-clean-report: This removes the generated coverage report
788 # without cleaning the coverage data itself
789 # coverage-clean-data: This removes the captured coverage data without
790 # removing the coverage files created at compile time (*.gcno)
791 # coverage-clean: This cleans all coverage data including the generated
792 # coverage report.
793
794 COVERAGE_TEST_NAME = $(PACKAGE)
795 COVERAGE_NAME = $(PACKAGE)-$(VERSION)
796 COVERAGE_OUTPUT_FILE = $(COVERAGE_NAME)-coverage.info
797 COVERAGE_OUTPUT_DIR = $(COVERAGE_NAME)-coverage
798 COVERAGE_LCOV_EXTRA_FLAGS =
799 COVERAGE_GENHTML_EXTRA_FLAGS =
800
801 coverage_quiet = $(coverage_quiet_$(V))
802 coverage_quiet_ = $(coverage_quiet_$(AM_DEFAULT_VERBOSITY))
803 coverage_quiet_0 = --quiet
804
805 coverage-check: all
806 -$(MAKE) $(AM_MAKEFLAGS) -k check
807
808 coverage-baseline:
809 $(LCOV) $(coverage_quiet) \
810 --directory $(top_builddir) \
811 --output-file "$(COVERAGE_OUTPUT_FILE)" \
812 --capture \
813 --initial
814
815 coverage-report:
816 $(LCOV) $(coverage_quiet) \
817 --directory $(top_builddir) \
818 --capture \
819 --output-file "$(COVERAGE_OUTPUT_FILE).tmp" \
820 --test-name "$(COVERAGE_TEST_NAME)" \
821 --no-checksum \
822 --compat-libtool \
823 $(COVERAGE_LCOV_EXTRA_FLAGS)
824 $(LCOV) $(coverage_quiet) \
825 --directory $(top_builddir) \
826 --output-file "$(COVERAGE_OUTPUT_FILE)" \
827 --remove "$(COVERAGE_OUTPUT_FILE).tmp" \
828 "/tmp/*" \
829 "/usr/include/*" \
830 "$(includedir)/*"
831 -@rm -f "$(COVERAGE_OUTPUT_FILE).tmp"
832 LANG=C $(GENHTML) $(coverage_quiet) \
833 --prefix $(top_builddir) \
834 --output-directory "$(COVERAGE_OUTPUT_DIR)" \
835 --title "$(PACKAGE) $(VERSION) Code Coverage Report" \
836 --show-details "$(COVERAGE_OUTPUT_FILE)" \
837 --legend \
838 $(COVERAGE_GENHTML_EXTRA_FLAGS)
839 @echo "Code coverage report written to file://$(abs_builddir)/$(COVERAGE_OUTPUT_DIR)/index.html"
840
841 coverage-reset:
842 -$(LCOV) $(coverage_quiet) --zerocounters --directory $(top_builddir)
843
844 coverage-clean-report:
845 -rm -f "$(COVERAGE_OUTPUT_FILE)" "$(COVERAGE_OUTPUT_FILE).tmp"
846 -rm -rf "$(COVERAGE_OUTPUT_DIR)"
847
848 coverage-clean-data:
849 -find $(top_builddir) -name "*.gcda" -delete
850
851 coverage-clean: coverage-reset coverage-clean-report coverage-clean-data
852 -find $(top_builddir) -name "*.gcno" -delete
853
854 coverage-distclean: coverage-clean
855
856 coverage: coverage-reset coverage-baseline coverage-check coverage-report
857 clean-local: coverage-clean
858 distclean-local: coverage-distclean
859
860 .PHONY: coverage coverage-baseline coverage-check coverage-report coverage-reset coverage-clean-report coverage-clean-data coverage-clean coverage-distclean
861
862 else
863
864 coverage:
865 @echo "Configuring with --enable-coverage required to generate code coverage report."
866
867 endif # WITH_GCOV
868
869 ## CMake support
870
871 EXTRA_DIST += \
872 cmake/COPYING-CMAKE-SCRIPTS \
873 cmake/FindPackageHandleStandardArgs.cmake \
874 cmake/FindReadline.cmake \
875 cmake/FindEditline.cmake \
876 CMakeLists.txt \
877 config-cmake.h.in
878
879 ## end Makefile.am

  ViewVC Help
Powered by ViewVC 1.1.5