1## Process this file with automake to produce Makefile.in. 2 3ACLOCAL_AMFLAGS = -I m4 4 5dist_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 17dist_html_DATA = \ 18 doc/html/index.html \ 19 doc/html/pcre.html \ 20 doc/html/pcre16.html \ 21 doc/html/pcre-config.html \ 22 doc/html/pcre_assign_jit_stack.html \ 23 doc/html/pcre_compile.html \ 24 doc/html/pcre_compile2.html \ 25 doc/html/pcre_config.html \ 26 doc/html/pcre_copy_named_substring.html \ 27 doc/html/pcre_copy_substring.html \ 28 doc/html/pcre_dfa_exec.html \ 29 doc/html/pcre_exec.html \ 30 doc/html/pcre_free_study.html \ 31 doc/html/pcre_free_substring.html \ 32 doc/html/pcre_free_substring_list.html \ 33 doc/html/pcre_fullinfo.html \ 34 doc/html/pcre_get_named_substring.html \ 35 doc/html/pcre_get_stringnumber.html \ 36 doc/html/pcre_get_stringtable_entries.html \ 37 doc/html/pcre_get_substring.html \ 38 doc/html/pcre_get_substring_list.html \ 39 doc/html/pcre_jit_stack_alloc.html \ 40 doc/html/pcre_jit_stack_free.html \ 41 doc/html/pcre_maketables.html \ 42 doc/html/pcre_pattern_to_host_byte_order.html \ 43 doc/html/pcre_refcount.html \ 44 doc/html/pcre_study.html \ 45 doc/html/pcre_utf16_to_host_byte_order.html \ 46 doc/html/pcre_version.html \ 47 doc/html/pcreapi.html \ 48 doc/html/pcrebuild.html \ 49 doc/html/pcrecallout.html \ 50 doc/html/pcrecompat.html \ 51 doc/html/pcredemo.html \ 52 doc/html/pcregrep.html \ 53 doc/html/pcrejit.html \ 54 doc/html/pcrelimits.html \ 55 doc/html/pcrematching.html \ 56 doc/html/pcrepartial.html \ 57 doc/html/pcrepattern.html \ 58 doc/html/pcreperform.html \ 59 doc/html/pcreposix.html \ 60 doc/html/pcreprecompile.html \ 61 doc/html/pcresample.html \ 62 doc/html/pcrestack.html \ 63 doc/html/pcresyntax.html \ 64 doc/html/pcretest.html \ 65 doc/html/pcreunicode.html 66 67pcrecpp_html = doc/html/pcrecpp.html 68dist_noinst_DATA = $(pcrecpp_html) 69 70if WITH_PCRE_CPP 71html_DATA = $(pcrecpp_html) 72endif 73 74# The Libtool libraries to install. We'll add to this later. 75lib_LTLIBRARIES = 76 77# Unit tests you want to run when people type 'make check'. 78# TESTS is for binary unit tests, check_SCRIPTS for script-based tests 79TESTS = 80check_SCRIPTS = 81dist_noinst_SCRIPTS = 82 83# Some of the binaries we make are to be installed, and others are 84# (non-user-visible) helper programs needed to build libpcre or libpcre16. 85bin_PROGRAMS = 86noinst_PROGRAMS = 87 88# Additional files to delete on 'make clean' and 'make maintainer-clean'. 89CLEANFILES = 90MAINTAINERCLEANFILES = 91 92# Additional files to bundle with the distribution, over and above what 93# the Autotools include by default. 94EXTRA_DIST = 95 96# These files contain maintenance information 97EXTRA_DIST += \ 98 doc/perltest.txt \ 99 NON-UNIX-USE \ 100 NON-AUTOTOOLS-BUILD \ 101 HACKING 102 103# These files are used in the preparation of a release 104EXTRA_DIST += \ 105 PrepareRelease \ 106 CheckMan \ 107 CleanTxt \ 108 Detrail \ 109 132html \ 110 doc/index.html.src 111 112# These files are to do with building for Virtual Pascal 113EXTRA_DIST += \ 114 makevp.bat \ 115 makevp_c.txt \ 116 makevp_l.txt \ 117 pcregexp.pas 118 119# These files are usable versions of pcre.h and config.h that are distributed 120# for the benefit of people who are building PCRE manually, without the 121# Autotools support. 122EXTRA_DIST += \ 123 pcre.h.generic \ 124 config.h.generic 125 126pcre.h.generic: configure.ac 127 rm -f $@ 128 cp -p pcre.h $@ 129 130MAINTAINERCLEANFILES += pcre.h.generic 131 132# These are the header files we'll install. We do not distribute pcre.h because 133# it is generated from pcre.h.in. 134nodist_include_HEADERS = \ 135 pcre.h 136include_HEADERS = \ 137 pcreposix.h 138 139# These additional headers will be be installed if C++ support is enabled. We 140# do not distribute pcrecpparg.h or pcre_stringpiece.h, as these are generated 141# from corresponding .h.in files (which we do distribute). 142if WITH_PCRE_CPP 143nodist_include_HEADERS += \ 144 pcrecpparg.h \ 145 pcre_stringpiece.h 146include_HEADERS += \ 147 pcrecpp.h \ 148 pcre_scanner.h 149endif # WITH_PCRE_CPP 150 151bin_SCRIPTS = pcre-config 152 153## --------------------------------------------------------------- 154## The dftables program is used to rebuild character tables before compiling 155## PCRE, if --enable-rebuild-chartables is specified. It is not a user-visible 156## program. The default (when --enable-rebuild-chartables is not specified) is 157## to copy a distributed set of tables that are defined for ASCII code. In this 158## case, dftables is not needed. 159 160if WITH_REBUILD_CHARTABLES 161 162noinst_PROGRAMS += dftables 163dftables_SOURCES = dftables.c 164 165pcre_chartables.c: dftables$(EXEEXT) 166 ./dftables$(EXEEXT) $@ 167else 168 169pcre_chartables.c: $(srcdir)/pcre_chartables.c.dist 170 rm -f $@ 171 $(LN_S) $(srcdir)/pcre_chartables.c.dist $@ 172 173endif # WITH_REBUILD_CHARTABLES 174 175BUILT_SOURCES = pcre_chartables.c 176 177## The main pcre library 178 179# Build the 8 bit library if it is enabled. 180if WITH_PCRE8 181lib_LTLIBRARIES += libpcre.la 182libpcre_la_SOURCES = \ 183 pcre_byte_order.c \ 184 pcre_compile.c \ 185 pcre_config.c \ 186 pcre_dfa_exec.c \ 187 pcre_exec.c \ 188 pcre_fullinfo.c \ 189 pcre_get.c \ 190 pcre_globals.c \ 191 pcre_internal.h \ 192 pcre_jit_compile.c \ 193 pcre_maketables.c \ 194 pcre_newline.c \ 195 pcre_ord2utf8.c \ 196 pcre_refcount.c \ 197 pcre_string_utils.c \ 198 pcre_study.c \ 199 pcre_tables.c \ 200 pcre_ucd.c \ 201 pcre_valid_utf8.c \ 202 pcre_version.c \ 203 pcre_xclass.c \ 204 ucp.h 205 206## This file is generated as part of the building process, so don't distribute. 207nodist_libpcre_la_SOURCES = \ 208 pcre_chartables.c 209 210endif # WITH_PCRE8 211 212# Build the 16 bit library if it is enabled. 213if WITH_PCRE16 214lib_LTLIBRARIES += libpcre16.la 215libpcre16_la_SOURCES = \ 216 pcre16_byte_order.c \ 217 pcre16_chartables.c \ 218 pcre16_compile.c \ 219 pcre16_config.c \ 220 pcre16_dfa_exec.c \ 221 pcre16_exec.c \ 222 pcre16_fullinfo.c \ 223 pcre16_get.c \ 224 pcre16_globals.c \ 225 pcre16_jit_compile.c \ 226 pcre16_maketables.c \ 227 pcre16_newline.c \ 228 pcre16_ord2utf16.c \ 229 pcre16_refcount.c \ 230 pcre16_string_utils.c \ 231 pcre16_study.c \ 232 pcre16_tables.c \ 233 pcre16_ucd.c \ 234 pcre16_utf16_utils.c \ 235 pcre16_valid_utf16.c \ 236 pcre16_version.c \ 237 pcre16_xclass.c 238 239## This file is generated as part of the building process, so don't distribute. 240nodist_libpcre16_la_SOURCES = \ 241 pcre_chartables.c 242 243endif # WITH_PCRE16 244 245# The pcre_chartables.c.dist file is the default version of pcre_chartables.c, 246# used unless --enable-rebuild-chartables is specified. 247EXTRA_DIST += pcre_chartables.c.dist 248 249# The JIT compiler lives in a separate directory, but its files are #included 250# when pcre_jit_compile.c is processed, so they must be distributed. 251EXTRA_DIST += \ 252 sljit/sljitConfig.h \ 253 sljit/sljitConfigInternal.h \ 254 sljit/sljitExecAllocator.c \ 255 sljit/sljitLir.c \ 256 sljit/sljitLir.h \ 257 sljit/sljitNativeARM_Thumb2.c \ 258 sljit/sljitNativeARM_v5.c \ 259 sljit/sljitNativeMIPS_32.c \ 260 sljit/sljitNativeMIPS_common.c \ 261 sljit/sljitNativePPC_32.c \ 262 sljit/sljitNativePPC_64.c \ 263 sljit/sljitNativePPC_common.c \ 264 sljit/sljitNativeX86_32.c \ 265 sljit/sljitNativeX86_64.c \ 266 sljit/sljitNativeX86_common.c \ 267 sljit/sljitUtils.c 268 269if WITH_PCRE8 270libpcre_la_LDFLAGS = $(EXTRA_LIBPCRE_LDFLAGS) 271endif # WITH_PCRE8 272if WITH_PCRE16 273libpcre16_la_LDFLAGS = $(EXTRA_LIBPCRE16_LDFLAGS) 274endif # WITH_PCRE16 275 276CLEANFILES += pcre_chartables.c 277 278## If JIT support is enabled, arrange for the JIT test program to run. 279if WITH_JIT 280TESTS += pcre_jit_test 281noinst_PROGRAMS += pcre_jit_test 282pcre_jit_test_SOURCES = pcre_jit_test.c 283pcre_jit_test_LDADD = 284if WITH_PCRE8 285pcre_jit_test_LDADD += libpcre.la 286endif # WITH_PCRE8 287if WITH_PCRE16 288pcre_jit_test_LDADD += libpcre16.la 289endif # WITH_PCRE16 290endif # WITH_JIT 291 292## A version of the main pcre library that has a posix re API. 293if WITH_PCRE8 294lib_LTLIBRARIES += libpcreposix.la 295libpcreposix_la_SOURCES = \ 296 pcreposix.c 297libpcreposix_la_LDFLAGS = $(EXTRA_LIBPCREPOSIX_LDFLAGS) 298libpcreposix_la_LIBADD = libpcre.la 299endif # WITH_PCRE8 300 301## There's a C++ library as well. 302if WITH_PCRE_CPP 303 304lib_LTLIBRARIES += libpcrecpp.la 305libpcrecpp_la_SOURCES = \ 306 pcrecpp_internal.h \ 307 pcrecpp.cc \ 308 pcre_scanner.cc \ 309 pcre_stringpiece.cc 310libpcrecpp_la_LDFLAGS = $(EXTRA_LIBPCRECPP_LDFLAGS) 311libpcrecpp_la_LIBADD = libpcre.la 312 313TESTS += pcrecpp_unittest 314noinst_PROGRAMS += pcrecpp_unittest 315pcrecpp_unittest_SOURCES = pcrecpp_unittest.cc 316pcrecpp_unittest_LDADD = libpcrecpp.la 317 318TESTS += pcre_scanner_unittest 319noinst_PROGRAMS += pcre_scanner_unittest 320pcre_scanner_unittest_SOURCES = pcre_scanner_unittest.cc 321pcre_scanner_unittest_LDADD = libpcrecpp.la 322 323TESTS += pcre_stringpiece_unittest 324noinst_PROGRAMS += pcre_stringpiece_unittest 325pcre_stringpiece_unittest_SOURCES = pcre_stringpiece_unittest.cc 326pcre_stringpiece_unittest_LDADD = libpcrecpp.la 327 328endif # WITH_PCRE_CPP 329 330## The main unit tests 331 332# Each unit test is a binary plus a script that runs that binary in various 333# ways. We install these test binaries in case folks find it helpful. 334 335TESTS += RunTest 336dist_noinst_SCRIPTS += RunTest 337EXTRA_DIST += RunTest.bat 338bin_PROGRAMS += pcretest 339pcretest_SOURCES = pcretest.c 340pcretest_LDADD = $(LIBREADLINE) 341if WITH_PCRE8 342pcretest_SOURCES += pcre_printint.c 343pcretest_LDADD += libpcre.la libpcreposix.la 344endif # WITH_PCRE8 345if WITH_PCRE16 346pcretest_SOURCES += pcre16_printint.c 347pcretest_LDADD += libpcre16.la 348endif # WITH_PCRE16 349 350if WITH_PCRE8 351TESTS += RunGrepTest 352dist_noinst_SCRIPTS += RunGrepTest 353bin_PROGRAMS += pcregrep 354pcregrep_SOURCES = pcregrep.c 355pcregrep_LDADD = $(LIBZ) $(LIBBZ2) 356pcregrep_LDADD += libpcre.la libpcreposix.la 357endif # WITH_PCRE8 358 359EXTRA_DIST += \ 360 testdata/grepbinary \ 361 testdata/grepfilelist \ 362 testdata/grepinput \ 363 testdata/grepinput3 \ 364 testdata/grepinput8 \ 365 testdata/grepinputv \ 366 testdata/grepinputx \ 367 testdata/greplist \ 368 testdata/grepoutput \ 369 testdata/grepoutput8 \ 370 testdata/grepoutputN \ 371 testdata/greppatN4 \ 372 testdata/saved16 \ 373 testdata/saved16BE-1 \ 374 testdata/saved16BE-2 \ 375 testdata/saved16LE-1 \ 376 testdata/saved16LE-2 \ 377 testdata/saved8 \ 378 testdata/testinput1 \ 379 testdata/testinput2 \ 380 testdata/testinput3 \ 381 testdata/testinput4 \ 382 testdata/testinput5 \ 383 testdata/testinput6 \ 384 testdata/testinput7 \ 385 testdata/testinput8 \ 386 testdata/testinput9 \ 387 testdata/testinput10 \ 388 testdata/testinput11 \ 389 testdata/testinput12 \ 390 testdata/testinput13 \ 391 testdata/testinput14 \ 392 testdata/testinput15 \ 393 testdata/testinput16 \ 394 testdata/testinput17 \ 395 testdata/testinput18 \ 396 testdata/testinput19 \ 397 testdata/testinput20 \ 398 testdata/testinput21 \ 399 testdata/testinput22 \ 400 testdata/testoutput1 \ 401 testdata/testoutput2 \ 402 testdata/testoutput3 \ 403 testdata/testoutput4 \ 404 testdata/testoutput5 \ 405 testdata/testoutput6 \ 406 testdata/testoutput7 \ 407 testdata/testoutput8 \ 408 testdata/testoutput9 \ 409 testdata/testoutput10 \ 410 testdata/testoutput11-16 \ 411 testdata/testoutput11-8 \ 412 testdata/testoutput12 \ 413 testdata/testoutput13 \ 414 testdata/testoutput14 \ 415 testdata/testoutput15 \ 416 testdata/testoutput16 \ 417 testdata/testoutput17 \ 418 testdata/testoutput18 \ 419 testdata/testoutput19 \ 420 testdata/testoutput20 \ 421 testdata/testoutput21 \ 422 testdata/testoutput22 \ 423 testdata/wintestinput3 \ 424 testdata/wintestoutput3 \ 425 perltest.pl 426 427CLEANFILES += \ 428 testsavedregex \ 429 teststderr \ 430 testtry \ 431 testNinput 432 433 434# PCRE demonstration program. No longer built automatcally. The point is that 435# the users should build it themselves. So just distribute the source. 436# noinst_PROGRAMS += pcredemo 437# pcredemo_SOURCES = pcredemo.c 438# pcredemo_LDADD = libpcre.la 439 440EXTRA_DIST += pcredemo.c 441 442 443## Utility rules, documentation, etc. 444 445# A compatibility line, the old build system worked with 'make test' 446test: check ; 447 448 449# A PCRE user submitted the following addition, saying that it "will allow 450# anyone using the 'mingw32' compiler to simply type 'make pcre.dll' and get a 451# nice DLL for Windows use". (It is used by the pcre.dll target.) 452DLL_OBJS= pcre_byte_order.o pcre_compile.o pcre_config.o \ 453 pcre_dfa_exec.o pcre_exec.o pcre_fullinfo.o pcre_get.o \ 454 pcre_globals.o pcre_jit_compile.o pcre_maketables.o \ 455 pcre_newline.o pcre_ord2utf8.o pcre_refcount.o \ 456 pcre_study.o pcre_tables.o pcre_ucd.o \ 457 pcre_valid_utf8.o pcre_version.o pcre_chartables.o \ 458 pcre_xclass.o 459 460# A PCRE user submitted the following addition, saying that it "will allow 461# anyone using the 'mingw32' compiler to simply type 'make pcre.dll' and get a 462# nice DLL for Windows use". 463pcre.dll: $(DLL_OBJS) 464 $(CC) -shared -o pcre.dll -Wl,"--strip-all" -Wl,"--export-all-symbols" $(DLL_OBJS) 465 466 467# We have .pc files for pkg-config users. 468pkgconfigdir = $(libdir)/pkgconfig 469pkgconfig_DATA = libpcre.pc libpcreposix.pc 470if WITH_PCRE16 471pkgconfig_DATA += libpcre16.pc 472endif 473if WITH_PCRE_CPP 474pkgconfig_DATA += libpcrecpp.pc 475endif 476 477dist_man_MANS = \ 478 doc/pcre.3 \ 479 doc/pcre16.3 \ 480 doc/pcre-config.1 \ 481 doc/pcre_assign_jit_stack.3 \ 482 doc/pcre_compile.3 \ 483 doc/pcre_compile2.3 \ 484 doc/pcre_config.3 \ 485 doc/pcre_copy_named_substring.3 \ 486 doc/pcre_copy_substring.3 \ 487 doc/pcre_dfa_exec.3 \ 488 doc/pcre_exec.3 \ 489 doc/pcre_free_study.3 \ 490 doc/pcre_free_substring.3 \ 491 doc/pcre_free_substring_list.3 \ 492 doc/pcre_fullinfo.3 \ 493 doc/pcre_get_named_substring.3 \ 494 doc/pcre_get_stringnumber.3 \ 495 doc/pcre_get_stringtable_entries.3 \ 496 doc/pcre_get_substring.3 \ 497 doc/pcre_get_substring_list.3 \ 498 doc/pcre_jit_stack_alloc.3 \ 499 doc/pcre_jit_stack_free.3 \ 500 doc/pcre_maketables.3 \ 501 doc/pcre_pattern_to_host_byte_order.3 \ 502 doc/pcre_refcount.3 \ 503 doc/pcre_study.3 \ 504 doc/pcre_utf16_to_host_byte_order.3 \ 505 doc/pcre_version.3 \ 506 doc/pcreapi.3 \ 507 doc/pcrebuild.3 \ 508 doc/pcrecallout.3 \ 509 doc/pcrecompat.3 \ 510 doc/pcregrep.1 \ 511 doc/pcrejit.3 \ 512 doc/pcrelimits.3 \ 513 doc/pcrematching.3 \ 514 doc/pcrepartial.3 \ 515 doc/pcrepattern.3 \ 516 doc/pcreperform.3 \ 517 doc/pcreposix.3 \ 518 doc/pcreprecompile.3 \ 519 doc/pcresample.3 \ 520 doc/pcrestack.3 \ 521 doc/pcresyntax.3 \ 522 doc/pcretest.1 \ 523 doc/pcreunicode.3 524 525# Arrange for the per-function man pages to have 16-bit names as well. 526install-data-hook: 527 ln -sf pcre_assign_jit_stack.3 $(DESTDIR)$(man3dir)/pcre16_assign_jit_stack.3 528 ln -sf pcre_compile.3 $(DESTDIR)$(man3dir)/pcre16_compile.3 529 ln -sf pcre_compile2.3 $(DESTDIR)$(man3dir)/pcre16_compile2.3 530 ln -sf pcre_config.3 $(DESTDIR)$(man3dir)/pcre16_config.3 531 ln -sf pcre_copy_named_substring.3 $(DESTDIR)$(man3dir)/pcre16_copy_named_substring.3 532 ln -sf pcre_copy_substring.3 $(DESTDIR)$(man3dir)/pcre16_copy_substring.3 533 ln -sf pcre_dfa_exec.3 $(DESTDIR)$(man3dir)/pcre16_dfa_exec.3 534 ln -sf pcre_exec.3 $(DESTDIR)$(man3dir)/pcre16_exec.3 535 ln -sf pcre_free_study.3 $(DESTDIR)$(man3dir)/pcre16_free_study.3 536 ln -sf pcre_free_substring.3 $(DESTDIR)$(man3dir)/pcre16_free_substring.3 537 ln -sf pcre_free_substring_list.3 $(DESTDIR)$(man3dir)/pcre16_free_substring_list.3 538 ln -sf pcre_fullinfo.3 $(DESTDIR)$(man3dir)/pcre16_fullinfo.3 539 ln -sf pcre_get_named_substring.3 $(DESTDIR)$(man3dir)/pcre16_get_named_substring.3 540 ln -sf pcre_get_stringnumber.3 $(DESTDIR)$(man3dir)/pcre16_get_stringnumber.3 541 ln -sf pcre_get_stringtable_entries.3 $(DESTDIR)$(man3dir)/pcre16_get_stringtable_entries.3 542 ln -sf pcre_get_substring.3 $(DESTDIR)$(man3dir)/pcre16_get_substring.3 543 ln -sf pcre_get_substring_list.3 $(DESTDIR)$(man3dir)/pcre16_get_substring_list.3 544 ln -sf pcre_jit_stack_alloc.3 $(DESTDIR)$(man3dir)/pcre16_jit_stack_alloc.3 545 ln -sf pcre_jit_stack_free.3 $(DESTDIR)$(man3dir)/pcre16_jit_stack_free.3 546 ln -sf pcre_maketables.3 $(DESTDIR)$(man3dir)/pcre16_maketables.3 547 ln -sf pcre_pattern_to_host_byte_order.3 $(DESTDIR)$(man3dir)/pcre16_pattern_to_host_byte_order.3 548 ln -sf pcre_refcount.3 $(DESTDIR)$(man3dir)/pcre16_refcount.3 549 ln -sf pcre_study.3 $(DESTDIR)$(man3dir)/pcre16_study.3 550 ln -sf pcre_utf16_to_host_byte_order.3 $(DESTDIR)$(man3dir)/pcre16_utf16_to_host_byte_order.3 551 ln -sf pcre_version.3 $(DESTDIR)$(man3dir)/pcre16_version.3 552 553pcrecpp_man = doc/pcrecpp.3 554EXTRA_DIST += $(pcrecpp_man) 555 556if WITH_PCRE_CPP 557man_MANS = $(pcrecpp_man) 558endif 559 560## CMake support 561 562EXTRA_DIST += \ 563 cmake/COPYING-CMAKE-SCRIPTS \ 564 cmake/FindPackageHandleStandardArgs.cmake \ 565 cmake/FindReadline.cmake \ 566 cmake/FindEditline.cmake \ 567 CMakeLists.txt \ 568 config-cmake.h.in 569 570## end Makefile.am 571