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

Diff of /code/trunk/Makefile.am

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1151 by chpe, Sun Oct 21 16:53:46 2012 UTC revision 1194 by ph10, Wed Oct 31 17:42:29 2012 UTC
# Line 36  dist_html_DATA = \ Line 36  dist_html_DATA = \
36    doc/html/pcre_get_stringtable_entries.html \    doc/html/pcre_get_stringtable_entries.html \
37    doc/html/pcre_get_substring.html \    doc/html/pcre_get_substring.html \
38    doc/html/pcre_get_substring_list.html \    doc/html/pcre_get_substring_list.html \
39      doc/html/pcre_jit_exec.html \
40    doc/html/pcre_jit_stack_alloc.html \    doc/html/pcre_jit_stack_alloc.html \
41    doc/html/pcre_jit_stack_free.html \    doc/html/pcre_jit_stack_free.html \
42    doc/html/pcre_maketables.html \    doc/html/pcre_maketables.html \
# Line 132  EXTRA_DIST += \ Line 133  EXTRA_DIST += \
133    pcre.h.generic \    pcre.h.generic \
134    config.h.generic    config.h.generic
135    
136  pcre.h.generic: configure.ac  # The only difference between pcre.h.in and pcre.h is the setting of the PCRE
137    # version number. Therefore, we can create the generic version just by copying.
138    pcre.h.generic: pcre.h.in configure.ac
139          rm -f $@          rm -f $@
140          cp -p pcre.h $@          cp -p pcre.h $@
141    
142  MAINTAINERCLEANFILES += pcre.h.generic  # It is more complicated for config.h.generic. We need the version that results
143    # from a default configuration. We can get this by doing a configure in a
144    # temporary directory. It has to be entirely done using files in that
145    # directory, because the source directory may already be configured. If you
146    # just try running configure in a new directory, it complains that the source
147    # directory is already configured.
148    config.h.generic: configure.ac
149            rm -rf $@ _generic
150            mkdir _generic
151            cs=$(srcdir)/config.status; test ! -f $$cs || mv -f $$cs $$cs.aside
152            cd _generic && $(abs_top_srcdir)/configure || :
153            cs=$(srcdir)/config.status; test ! -f $$cs.aside || mv -f $$cs.aside $$cs
154            test -f _generic/config.h
155            perl -pe 'if(/^#define\s(?!PACKAGE)(\w+)/){print"#ifndef $$1\n$$_#endif\n";$$_="";}' _generic/config.h >$@
156            rm -rf _generic
157    
158    MAINTAINERCLEANFILES += pcre.h.generic config.h.generic
159    
160  # These are the header files we'll install. We do not distribute pcre.h because  # These are the header files we'll install. We do not distribute pcre.h because
161  # it is generated from pcre.h.in.  # it is generated from pcre.h.in.
# Line 344  libpcre32_la_CFLAGS += $(VALGRIND_CFLAGS Line 363  libpcre32_la_CFLAGS += $(VALGRIND_CFLAGS
363  endif # WITH_PCRE32  endif # WITH_PCRE32
364  endif # WITH_VALGRIND  endif # WITH_VALGRIND
365    
366    if WITH_GCOV
367    if WITH_PCRE8
368    libpcre_la_CFLAGS += $(GCOV_CFLAGS)
369    endif # WITH_PCRE8
370    if WITH_PCRE16
371    libpcre16_la_CFLAGS += $(GCOV_CFLAGS)
372    endif # WITH_PCRE16
373    if WITH_PCRE32
374    libpcre32_la_CFLAGS += $(GCOV_CFLAGS)
375    endif # WITH_PCRE32
376    endif # WITH_GCOV
377    
378  CLEANFILES += pcre_chartables.c  CLEANFILES += pcre_chartables.c
379    
380  ## If JIT support is enabled, arrange for the JIT test program to run.  ## If JIT support is enabled, arrange for the JIT test program to run.
# Line 351  if WITH_JIT Line 382  if WITH_JIT
382  TESTS += pcre_jit_test  TESTS += pcre_jit_test
383  noinst_PROGRAMS += pcre_jit_test  noinst_PROGRAMS += pcre_jit_test
384  pcre_jit_test_SOURCES = pcre_jit_test.c  pcre_jit_test_SOURCES = pcre_jit_test.c
385    pcre_jit_test_CFLAGS = $(AM_CFLAGS)
386  pcre_jit_test_LDADD =  pcre_jit_test_LDADD =
387  if WITH_PCRE8  if WITH_PCRE8
388  pcre_jit_test_LDADD += libpcre.la  pcre_jit_test_LDADD += libpcre.la
# Line 361  endif # WITH_PCRE16 Line 393  endif # WITH_PCRE16
393  if WITH_PCRE32  if WITH_PCRE32
394  pcre_jit_test_LDADD += libpcre32.la  pcre_jit_test_LDADD += libpcre32.la
395  endif # WITH_PCRE32  endif # WITH_PCRE32
396    if WITH_GCOV
397    pcre_jit_test_CFLAGS += $(GCOV_CFLAGS)
398    pcre_jit_test_LDADD += $(GCOV_LIBS)
399    endif # WITH_GCOV
400  endif # WITH_JIT  endif # WITH_JIT
401    
402  ## A version of the main pcre library that has a posix re API.  ## A version of the main pcre library that has a posix re API.
403  if WITH_PCRE8  if WITH_PCRE8
404    
405  lib_LTLIBRARIES += libpcreposix.la  lib_LTLIBRARIES += libpcreposix.la
406  libpcreposix_la_SOURCES = \  libpcreposix_la_SOURCES = \
407    pcreposix.c    pcreposix.c
408    libpcreposix_la_CFLAGS = $(AM_CFLAGS)
409  libpcreposix_la_LDFLAGS = $(EXTRA_LIBPCREPOSIX_LDFLAGS)  libpcreposix_la_LDFLAGS = $(EXTRA_LIBPCREPOSIX_LDFLAGS)
410  libpcreposix_la_LIBADD = libpcre.la  libpcreposix_la_LIBADD = libpcre.la
411    
412    if WITH_GCOV
413    libpcreposix_la_CFLAGS += $(GCOV_CFLAGS)
414    endif # WITH_GCOV
415    
416  endif # WITH_PCRE8  endif # WITH_PCRE8
417    
418  ## There's a C++ library as well.  ## There's a C++ library as well.
# Line 381  libpcrecpp_la_SOURCES = \ Line 424  libpcrecpp_la_SOURCES = \
424    pcrecpp.cc \    pcrecpp.cc \
425    pcre_scanner.cc \    pcre_scanner.cc \
426    pcre_stringpiece.cc    pcre_stringpiece.cc
427    libpcrecpp_la_CXXFLAGS = $(AM_CXXFLAGS)
428  libpcrecpp_la_LDFLAGS = $(EXTRA_LIBPCRECPP_LDFLAGS)  libpcrecpp_la_LDFLAGS = $(EXTRA_LIBPCRECPP_LDFLAGS)
429  libpcrecpp_la_LIBADD = libpcre.la  libpcrecpp_la_LIBADD = libpcre.la
430    
431  TESTS += pcrecpp_unittest  TESTS += pcrecpp_unittest
432  noinst_PROGRAMS += pcrecpp_unittest  noinst_PROGRAMS += pcrecpp_unittest
433  pcrecpp_unittest_SOURCES = pcrecpp_unittest.cc  pcrecpp_unittest_SOURCES = pcrecpp_unittest.cc
434    pcrecpp_unittest_CXXFLAGS = $(AM_CXXFLAGS)
435  pcrecpp_unittest_LDADD = libpcrecpp.la  pcrecpp_unittest_LDADD = libpcrecpp.la
436    
437  TESTS += pcre_scanner_unittest  TESTS += pcre_scanner_unittest
438  noinst_PROGRAMS += pcre_scanner_unittest  noinst_PROGRAMS += pcre_scanner_unittest
439  pcre_scanner_unittest_SOURCES = pcre_scanner_unittest.cc  pcre_scanner_unittest_SOURCES = pcre_scanner_unittest.cc
440    pcre_scanner_unittest_CXXFLAGS = $(AM_CXXFLAGS)
441  pcre_scanner_unittest_LDADD = libpcrecpp.la  pcre_scanner_unittest_LDADD = libpcrecpp.la
442    
443  TESTS += pcre_stringpiece_unittest  TESTS += pcre_stringpiece_unittest
444  noinst_PROGRAMS += pcre_stringpiece_unittest  noinst_PROGRAMS += pcre_stringpiece_unittest
445  pcre_stringpiece_unittest_SOURCES = pcre_stringpiece_unittest.cc  pcre_stringpiece_unittest_SOURCES = pcre_stringpiece_unittest.cc
446    pcre_stringpiece_unittest_CXXFLAGS = $(AM_CXXFLAGS)
447  pcre_stringpiece_unittest_LDADD = libpcrecpp.la  pcre_stringpiece_unittest_LDADD = libpcrecpp.la
448    
449    if WITH_GCOV
450    libpcrecpp_la_CXXFLAGS += $(GCOV_CXXFLAGS)
451    pcrecpp_unittest_LDADD += $(GCOV_LIBS)
452    pcre_scanner_unittest_LDADD += $(GCOV_LIBS)
453    pcre_stringpiece_unittest_LDADD += $(GCOV_LIBS)
454    endif # WITH_GCOV
455    
456  endif # WITH_PCRE_CPP  endif # WITH_PCRE_CPP
457    
458  ## The main unit tests  ## The main unit tests
# Line 428  endif # WITH_PCRE32 Line 482  endif # WITH_PCRE32
482  if WITH_VALGRIND  if WITH_VALGRIND
483  pcretest_CFLAGS += $(VALGRIND_CFLAGS)  pcretest_CFLAGS += $(VALGRIND_CFLAGS)
484  endif # WITH_VALGRIND  endif # WITH_VALGRIND
485    if WITH_GCOV
486    pcretest_CFLAGS += $(GCOV_CFLAGS)
487    pcretest_LDADD += $(GCOV_LIBS)
488    endif # WITH_GCOV
489    
490  if WITH_PCRE8  if WITH_PCRE8
491  TESTS += RunGrepTest  TESTS += RunGrepTest
492  dist_noinst_SCRIPTS += RunGrepTest  dist_noinst_SCRIPTS += RunGrepTest
493  bin_PROGRAMS += pcregrep  bin_PROGRAMS += pcregrep
494  pcregrep_SOURCES = pcregrep.c  pcregrep_SOURCES = pcregrep.c
495    pcregrep_CFLAGS = $(AM_CFLAGS)
496  pcregrep_LDADD = $(LIBZ) $(LIBBZ2)  pcregrep_LDADD = $(LIBZ) $(LIBBZ2)
497  pcregrep_LDADD += libpcre.la libpcreposix.la  pcregrep_LDADD += libpcre.la libpcreposix.la
498    if WITH_GCOV
499    pcregrep_CFLAGS += $(GCOV_CFLAGS)
500    pcregrep_LDADD += $(GCOV_LIBS)
501    endif # WITH_GCOV
502  endif # WITH_PCRE8  endif # WITH_PCRE8
503    
504  EXTRA_DIST += \  EXTRA_DIST += \
# Line 484  EXTRA_DIST += \ Line 547  EXTRA_DIST += \
547    testdata/testinput20 \    testdata/testinput20 \
548    testdata/testinput21 \    testdata/testinput21 \
549    testdata/testinput22 \    testdata/testinput22 \
550      testdata/testinput23 \
551      testdata/testinput24 \
552      testdata/testinput25 \
553      testdata/testinput26 \
554    testdata/testinputEBC \    testdata/testinputEBC \
555    testdata/testoutput1 \    testdata/testoutput1 \
556    testdata/testoutput2 \    testdata/testoutput2 \
# Line 495  EXTRA_DIST += \ Line 562  EXTRA_DIST += \
562    testdata/testoutput8 \    testdata/testoutput8 \
563    testdata/testoutput9 \    testdata/testoutput9 \
564    testdata/testoutput10 \    testdata/testoutput10 \
   testdata/testoutput11-16 \  
565    testdata/testoutput11-8 \    testdata/testoutput11-8 \
566      testdata/testoutput11-16 \
567      testdata/testoutput11-32 \
568    testdata/testoutput12 \    testdata/testoutput12 \
569    testdata/testoutput13 \    testdata/testoutput13 \
570    testdata/testoutput14 \    testdata/testoutput14 \
571    testdata/testoutput15 \    testdata/testoutput15 \
572    testdata/testoutput16 \    testdata/testoutput16 \
573    testdata/testoutput17 \    testdata/testoutput17 \
574    testdata/testoutput18 \    testdata/testoutput18-16 \
575      testdata/testoutput18-32 \
576    testdata/testoutput19 \    testdata/testoutput19 \
577    testdata/testoutput20 \    testdata/testoutput20 \
578    testdata/testoutput21 \    testdata/testoutput21-16 \
579    testdata/testoutput22 \    testdata/testoutput21-32 \
580      testdata/testoutput22-16 \
581      testdata/testoutput22-32 \
582      testdata/testoutput23 \
583      testdata/testoutput24 \
584      testdata/testoutput25 \
585      testdata/testoutput26 \
586    testdata/testoutputEBC \    testdata/testoutputEBC \
587    testdata/wintestinput3 \    testdata/wintestinput3 \
588    testdata/wintestoutput3 \    testdata/wintestoutput3 \
# Line 589  dist_man_MANS = \ Line 664  dist_man_MANS = \
664    doc/pcre_get_stringtable_entries.3 \    doc/pcre_get_stringtable_entries.3 \
665    doc/pcre_get_substring.3 \    doc/pcre_get_substring.3 \
666    doc/pcre_get_substring_list.3 \    doc/pcre_get_substring_list.3 \
667      doc/pcre_jit_exec.3 \
668    doc/pcre_jit_stack_alloc.3 \    doc/pcre_jit_stack_alloc.3 \
669    doc/pcre_jit_stack_free.3 \    doc/pcre_jit_stack_free.3 \
670    doc/pcre_maketables.3 \    doc/pcre_maketables.3 \
# Line 636  install-data-hook: Line 712  install-data-hook:
712          ln -sf pcre_get_stringtable_entries.3    $(DESTDIR)$(man3dir)/pcre16_get_stringtable_entries.3          ln -sf pcre_get_stringtable_entries.3    $(DESTDIR)$(man3dir)/pcre16_get_stringtable_entries.3
713          ln -sf pcre_get_substring.3              $(DESTDIR)$(man3dir)/pcre16_get_substring.3          ln -sf pcre_get_substring.3              $(DESTDIR)$(man3dir)/pcre16_get_substring.3
714          ln -sf pcre_get_substring_list.3         $(DESTDIR)$(man3dir)/pcre16_get_substring_list.3          ln -sf pcre_get_substring_list.3         $(DESTDIR)$(man3dir)/pcre16_get_substring_list.3
715            ln -sf pcre_jit_exec.3                   $(DESTDIR)$(man3dir)/pcre16_jit_exec.3
716          ln -sf pcre_jit_stack_alloc.3            $(DESTDIR)$(man3dir)/pcre16_jit_stack_alloc.3          ln -sf pcre_jit_stack_alloc.3            $(DESTDIR)$(man3dir)/pcre16_jit_stack_alloc.3
717          ln -sf pcre_jit_stack_free.3             $(DESTDIR)$(man3dir)/pcre16_jit_stack_free.3          ln -sf pcre_jit_stack_free.3             $(DESTDIR)$(man3dir)/pcre16_jit_stack_free.3
718          ln -sf pcre_maketables.3                 $(DESTDIR)$(man3dir)/pcre16_maketables.3          ln -sf pcre_maketables.3                 $(DESTDIR)$(man3dir)/pcre16_maketables.3
# Line 661  install-data-hook: Line 738  install-data-hook:
738          ln -sf pcre_get_stringtable_entries.3    $(DESTDIR)$(man3dir)/pcre32_get_stringtable_entries.3          ln -sf pcre_get_stringtable_entries.3    $(DESTDIR)$(man3dir)/pcre32_get_stringtable_entries.3
739          ln -sf pcre_get_substring.3              $(DESTDIR)$(man3dir)/pcre32_get_substring.3          ln -sf pcre_get_substring.3              $(DESTDIR)$(man3dir)/pcre32_get_substring.3
740          ln -sf pcre_get_substring_list.3         $(DESTDIR)$(man3dir)/pcre32_get_substring_list.3          ln -sf pcre_get_substring_list.3         $(DESTDIR)$(man3dir)/pcre32_get_substring_list.3
741            ln -sf pcre_jit_exec.3                   $(DESTDIR)$(man3dir)/pcre32_jit_exec.3
742          ln -sf pcre_jit_stack_alloc.3            $(DESTDIR)$(man3dir)/pcre32_jit_stack_alloc.3          ln -sf pcre_jit_stack_alloc.3            $(DESTDIR)$(man3dir)/pcre32_jit_stack_alloc.3
743          ln -sf pcre_jit_stack_free.3             $(DESTDIR)$(man3dir)/pcre32_jit_stack_free.3          ln -sf pcre_jit_stack_free.3             $(DESTDIR)$(man3dir)/pcre32_jit_stack_free.3
744          ln -sf pcre_maketables.3                 $(DESTDIR)$(man3dir)/pcre32_maketables.3          ln -sf pcre_maketables.3                 $(DESTDIR)$(man3dir)/pcre32_maketables.3
# Line 677  if WITH_PCRE_CPP Line 755  if WITH_PCRE_CPP
755  man_MANS = $(pcrecpp_man)  man_MANS = $(pcrecpp_man)
756  endif  endif
757    
758    # gcov/lcov code coverage reporting
759    
760    if WITH_GCOV
761    
762    # Coverage reporting targets:
763    #
764    # coverage: Create a coverage report from 'make check'
765    # coverage-baseline: Capture baseline coverage information
766    # coverage-reset: This zeros the coverage counters only
767    # coverage-report: This creates the coverage report only
768    # coverage-clean-report: This removes the generated coverage report
769    #   without cleaning the coverage data itself
770    # coverage-clean-data: This removes the captured coverage data without
771    #   removing the coverage files created at compile time (*.gcno)
772    # coverage-clean: This cleans all coverage data including the generated
773    #   coverage report.
774    
775    COVERAGE_TEST_NAME = $(PACKAGE)
776    COVERAGE_NAME = $(PACKAGE)-$(VERSION)
777    COVERAGE_OUTPUT_FILE = $(COVERAGE_NAME)-coverage.info
778    COVERAGE_OUTPUT_DIR = $(COVERAGE_NAME)-coverage
779    COVERAGE_LCOV_EXTRA_FLAGS =
780    COVERAGE_GENHTML_EXTRA_FLAGS =
781    
782    coverage_quiet = $(coverage_quiet_$(V))
783    coverage_quiet_ = $(coverage_quiet_$(AM_DEFAULT_VERBOSITY))
784    coverage_quiet_0 = --quiet
785    
786    coverage-check: all
787            -$(MAKE) $(AM_MAKEFLAGS) -k check
788    
789    coverage-baseline:
790            $(LCOV) $(coverage_quiet) \
791                    --directory $(top_builddir) \
792                    --output-file "$(COVERAGE_OUTPUT_FILE)" \
793                    --capture \
794                    --initial
795    
796    coverage-report:
797            $(LCOV) $(coverage_quiet) \
798                    --directory $(top_builddir) \
799                    --capture \
800                    --output-file "$(COVERAGE_OUTPUT_FILE).tmp" \
801                    --test-name "$(COVERAGE_TEST_NAME)" \
802                    --no-checksum \
803                    --compat-libtool \
804                    $(COVERAGE_LCOV_EXTRA_FLAGS)
805            $(LCOV) $(coverage_quiet) \
806                    --directory $(top_builddir) \
807                    --output-file "$(COVERAGE_OUTPUT_FILE)" \
808                    --remove "$(COVERAGE_OUTPUT_FILE).tmp" \
809                    "/tmp/*" \
810                    "/usr/include/*" \
811                    "$(includedir)/*"
812            -@rm -f "$(COVERAGE_OUTPUT_FILE).tmp"
813            LANG=C $(GENHTML) $(coverage_quiet) \
814                    --prefix $(top_builddir) \
815                    --output-directory "$(COVERAGE_OUTPUT_DIR)" \
816                    --title "$(PACKAGE) $(VERSION) Code Coverage Report" \
817                    --show-details "$(COVERAGE_OUTPUT_FILE)" \
818                    --legend \
819                    $(COVERAGE_GENHTML_EXTRA_FLAGS)
820            @echo "Code coverage report written to file://$(abs_builddir)/$(COVERAGE_OUTPUT_DIR)/index.html"
821    
822    coverage-reset:
823            -$(LCOV) $(coverage_quiet) --zerocounters --directory $(top_builddir)
824    
825    coverage-clean-report:
826            -rm -f "$(COVERAGE_OUTPUT_FILE)" "$(COVERAGE_OUTPUT_FILE).tmp"
827            -rm -rf "$(COVERAGE_OUTPUT_DIR)"
828    
829    coverage-clean-data:
830            -find $(top_builddir) -name "*.gcda" -delete
831    
832    coverage-clean: coverage-reset coverage-clean-report coverage-clean-data
833            -find $(top_builddir) -name "*.gcno" -delete
834    
835    coverage-distclean: coverage-clean
836    
837    coverage: coverage-reset coverage-baseline coverage-check coverage-report
838    clean-local: coverage-clean
839    distclean-local: coverage-distclean
840    
841    .PHONY: coverage coverage-baseline coverage-check coverage-report coverage-reset coverage-clean-report coverage-clean-data coverage-clean coverage-distclean
842    
843    else
844    
845    coverage:
846            @echo "Configuring with --enable-coverage required to generate code coverage report."
847    
848    endif # WITH_GCOV
849    
850  ## CMake support  ## CMake support
851    
852  EXTRA_DIST += \  EXTRA_DIST += \

Legend:
Removed from v.1151  
changed lines
  Added in v.1194

  ViewVC Help
Powered by ViewVC 1.1.5