Makefile.am 27 KB

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