/[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 1195 by zherczeg, Thu Nov 1 15:21:27 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 317  EXTRA_DIST += \ Line 336  EXTRA_DIST += \
336    sljit/sljitNativePPC_32.c \    sljit/sljitNativePPC_32.c \
337    sljit/sljitNativePPC_64.c \    sljit/sljitNativePPC_64.c \
338    sljit/sljitNativePPC_common.c \    sljit/sljitNativePPC_common.c \
339      sljit/sljitNativeSPARC_32.c \
340      sljit/sljitNativeSPARC_common.c \
341    sljit/sljitNativeX86_32.c \    sljit/sljitNativeX86_32.c \
342    sljit/sljitNativeX86_64.c \    sljit/sljitNativeX86_64.c \
343    sljit/sljitNativeX86_common.c \    sljit/sljitNativeX86_common.c \
# Line 344  libpcre32_la_CFLAGS += $(VALGRIND_CFLAGS Line 365  libpcre32_la_CFLAGS += $(VALGRIND_CFLAGS
365  endif # WITH_PCRE32  endif # WITH_PCRE32
366  endif # WITH_VALGRIND  endif # WITH_VALGRIND
367    
368    if WITH_GCOV
369    if WITH_PCRE8
370    libpcre_la_CFLAGS += $(GCOV_CFLAGS)
371    endif # WITH_PCRE8
372    if WITH_PCRE16
373    libpcre16_la_CFLAGS += $(GCOV_CFLAGS)
374    endif # WITH_PCRE16
375    if WITH_PCRE32
376    libpcre32_la_CFLAGS += $(GCOV_CFLAGS)
377    endif # WITH_PCRE32
378    endif # WITH_GCOV
379    
380  CLEANFILES += pcre_chartables.c  CLEANFILES += pcre_chartables.c
381    
382  ## 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 384  if WITH_JIT
384  TESTS += pcre_jit_test  TESTS += pcre_jit_test
385  noinst_PROGRAMS += pcre_jit_test  noinst_PROGRAMS += pcre_jit_test
386  pcre_jit_test_SOURCES = pcre_jit_test.c  pcre_jit_test_SOURCES = pcre_jit_test.c
387    pcre_jit_test_CFLAGS = $(AM_CFLAGS)
388  pcre_jit_test_LDADD =  pcre_jit_test_LDADD =
389  if WITH_PCRE8  if WITH_PCRE8
390  pcre_jit_test_LDADD += libpcre.la  pcre_jit_test_LDADD += libpcre.la
# Line 361  endif # WITH_PCRE16 Line 395  endif # WITH_PCRE16
395  if WITH_PCRE32  if WITH_PCRE32
396  pcre_jit_test_LDADD += libpcre32.la  pcre_jit_test_LDADD += libpcre32.la
397  endif # WITH_PCRE32  endif # WITH_PCRE32
398    if WITH_GCOV
399    pcre_jit_test_CFLAGS += $(GCOV_CFLAGS)
400    pcre_jit_test_LDADD += $(GCOV_LIBS)
401    endif # WITH_GCOV
402  endif # WITH_JIT  endif # WITH_JIT
403    
404  ## 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.
405  if WITH_PCRE8  if WITH_PCRE8
406    
407  lib_LTLIBRARIES += libpcreposix.la  lib_LTLIBRARIES += libpcreposix.la
408  libpcreposix_la_SOURCES = \  libpcreposix_la_SOURCES = \
409    pcreposix.c    pcreposix.c
410    libpcreposix_la_CFLAGS = $(AM_CFLAGS)
411  libpcreposix_la_LDFLAGS = $(EXTRA_LIBPCREPOSIX_LDFLAGS)  libpcreposix_la_LDFLAGS = $(EXTRA_LIBPCREPOSIX_LDFLAGS)
412  libpcreposix_la_LIBADD = libpcre.la  libpcreposix_la_LIBADD = libpcre.la
413    
414    if WITH_GCOV
415    libpcreposix_la_CFLAGS += $(GCOV_CFLAGS)
416    endif # WITH_GCOV
417    
418  endif # WITH_PCRE8  endif # WITH_PCRE8
419    
420  ## There's a C++ library as well.  ## There's a C++ library as well.
# Line 381  libpcrecpp_la_SOURCES = \ Line 426  libpcrecpp_la_SOURCES = \
426    pcrecpp.cc \    pcrecpp.cc \
427    pcre_scanner.cc \    pcre_scanner.cc \
428    pcre_stringpiece.cc    pcre_stringpiece.cc
429    libpcrecpp_la_CXXFLAGS = $(AM_CXXFLAGS)
430  libpcrecpp_la_LDFLAGS = $(EXTRA_LIBPCRECPP_LDFLAGS)  libpcrecpp_la_LDFLAGS = $(EXTRA_LIBPCRECPP_LDFLAGS)
431  libpcrecpp_la_LIBADD = libpcre.la  libpcrecpp_la_LIBADD = libpcre.la
432    
433  TESTS += pcrecpp_unittest  TESTS += pcrecpp_unittest
434  noinst_PROGRAMS += pcrecpp_unittest  noinst_PROGRAMS += pcrecpp_unittest
435  pcrecpp_unittest_SOURCES = pcrecpp_unittest.cc  pcrecpp_unittest_SOURCES = pcrecpp_unittest.cc
436    pcrecpp_unittest_CXXFLAGS = $(AM_CXXFLAGS)
437  pcrecpp_unittest_LDADD = libpcrecpp.la  pcrecpp_unittest_LDADD = libpcrecpp.la
438    
439  TESTS += pcre_scanner_unittest  TESTS += pcre_scanner_unittest
440  noinst_PROGRAMS += pcre_scanner_unittest  noinst_PROGRAMS += pcre_scanner_unittest
441  pcre_scanner_unittest_SOURCES = pcre_scanner_unittest.cc  pcre_scanner_unittest_SOURCES = pcre_scanner_unittest.cc
442    pcre_scanner_unittest_CXXFLAGS = $(AM_CXXFLAGS)
443  pcre_scanner_unittest_LDADD = libpcrecpp.la  pcre_scanner_unittest_LDADD = libpcrecpp.la
444    
445  TESTS += pcre_stringpiece_unittest  TESTS += pcre_stringpiece_unittest
446  noinst_PROGRAMS += pcre_stringpiece_unittest  noinst_PROGRAMS += pcre_stringpiece_unittest
447  pcre_stringpiece_unittest_SOURCES = pcre_stringpiece_unittest.cc  pcre_stringpiece_unittest_SOURCES = pcre_stringpiece_unittest.cc
448    pcre_stringpiece_unittest_CXXFLAGS = $(AM_CXXFLAGS)
449  pcre_stringpiece_unittest_LDADD = libpcrecpp.la  pcre_stringpiece_unittest_LDADD = libpcrecpp.la
450    
451    if WITH_GCOV
452    libpcrecpp_la_CXXFLAGS += $(GCOV_CXXFLAGS)
453    pcrecpp_unittest_LDADD += $(GCOV_LIBS)
454    pcre_scanner_unittest_LDADD += $(GCOV_LIBS)
455    pcre_stringpiece_unittest_LDADD += $(GCOV_LIBS)
456    endif # WITH_GCOV
457    
458  endif # WITH_PCRE_CPP  endif # WITH_PCRE_CPP
459    
460  ## The main unit tests  ## The main unit tests
# Line 428  endif # WITH_PCRE32 Line 484  endif # WITH_PCRE32
484  if WITH_VALGRIND  if WITH_VALGRIND
485  pcretest_CFLAGS += $(VALGRIND_CFLAGS)  pcretest_CFLAGS += $(VALGRIND_CFLAGS)
486  endif # WITH_VALGRIND  endif # WITH_VALGRIND
487    if WITH_GCOV
488    pcretest_CFLAGS += $(GCOV_CFLAGS)
489    pcretest_LDADD += $(GCOV_LIBS)
490    endif # WITH_GCOV
491    
492  if WITH_PCRE8  if WITH_PCRE8
493  TESTS += RunGrepTest  TESTS += RunGrepTest
494  dist_noinst_SCRIPTS += RunGrepTest  dist_noinst_SCRIPTS += RunGrepTest
495  bin_PROGRAMS += pcregrep  bin_PROGRAMS += pcregrep
496  pcregrep_SOURCES = pcregrep.c  pcregrep_SOURCES = pcregrep.c
497    pcregrep_CFLAGS = $(AM_CFLAGS)
498  pcregrep_LDADD = $(LIBZ) $(LIBBZ2)  pcregrep_LDADD = $(LIBZ) $(LIBBZ2)
499  pcregrep_LDADD += libpcre.la libpcreposix.la  pcregrep_LDADD += libpcre.la libpcreposix.la
500    if WITH_GCOV
501    pcregrep_CFLAGS += $(GCOV_CFLAGS)
502    pcregrep_LDADD += $(GCOV_LIBS)
503    endif # WITH_GCOV
504  endif # WITH_PCRE8  endif # WITH_PCRE8
505    
506  EXTRA_DIST += \  EXTRA_DIST += \
# Line 484  EXTRA_DIST += \ Line 549  EXTRA_DIST += \
549    testdata/testinput20 \    testdata/testinput20 \
550    testdata/testinput21 \    testdata/testinput21 \
551    testdata/testinput22 \    testdata/testinput22 \
552      testdata/testinput23 \
553      testdata/testinput24 \
554      testdata/testinput25 \
555      testdata/testinput26 \
556    testdata/testinputEBC \    testdata/testinputEBC \
557    testdata/testoutput1 \    testdata/testoutput1 \
558    testdata/testoutput2 \    testdata/testoutput2 \
# Line 495  EXTRA_DIST += \ Line 564  EXTRA_DIST += \
564    testdata/testoutput8 \    testdata/testoutput8 \
565    testdata/testoutput9 \    testdata/testoutput9 \
566    testdata/testoutput10 \    testdata/testoutput10 \
   testdata/testoutput11-16 \  
567    testdata/testoutput11-8 \    testdata/testoutput11-8 \
568      testdata/testoutput11-16 \
569      testdata/testoutput11-32 \
570    testdata/testoutput12 \    testdata/testoutput12 \
571    testdata/testoutput13 \    testdata/testoutput13 \
572    testdata/testoutput14 \    testdata/testoutput14 \
573    testdata/testoutput15 \    testdata/testoutput15 \
574    testdata/testoutput16 \    testdata/testoutput16 \
575    testdata/testoutput17 \    testdata/testoutput17 \
576    testdata/testoutput18 \    testdata/testoutput18-16 \
577      testdata/testoutput18-32 \
578    testdata/testoutput19 \    testdata/testoutput19 \
579    testdata/testoutput20 \    testdata/testoutput20 \
580    testdata/testoutput21 \    testdata/testoutput21-16 \
581    testdata/testoutput22 \    testdata/testoutput21-32 \
582      testdata/testoutput22-16 \
583      testdata/testoutput22-32 \
584      testdata/testoutput23 \
585      testdata/testoutput24 \
586      testdata/testoutput25 \
587      testdata/testoutput26 \
588    testdata/testoutputEBC \    testdata/testoutputEBC \
589    testdata/wintestinput3 \    testdata/wintestinput3 \
590    testdata/wintestoutput3 \    testdata/wintestoutput3 \
# Line 589  dist_man_MANS = \ Line 666  dist_man_MANS = \
666    doc/pcre_get_stringtable_entries.3 \    doc/pcre_get_stringtable_entries.3 \
667    doc/pcre_get_substring.3 \    doc/pcre_get_substring.3 \
668    doc/pcre_get_substring_list.3 \    doc/pcre_get_substring_list.3 \
669      doc/pcre_jit_exec.3 \
670    doc/pcre_jit_stack_alloc.3 \    doc/pcre_jit_stack_alloc.3 \
671    doc/pcre_jit_stack_free.3 \    doc/pcre_jit_stack_free.3 \
672    doc/pcre_maketables.3 \    doc/pcre_maketables.3 \
# Line 636  install-data-hook: Line 714  install-data-hook:
714          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
715          ln -sf pcre_get_substring.3              $(DESTDIR)$(man3dir)/pcre16_get_substring.3          ln -sf pcre_get_substring.3              $(DESTDIR)$(man3dir)/pcre16_get_substring.3
716          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
717            ln -sf pcre_jit_exec.3                   $(DESTDIR)$(man3dir)/pcre16_jit_exec.3
718          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
719          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
720          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 740  install-data-hook:
740          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
741          ln -sf pcre_get_substring.3              $(DESTDIR)$(man3dir)/pcre32_get_substring.3          ln -sf pcre_get_substring.3              $(DESTDIR)$(man3dir)/pcre32_get_substring.3
742          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
743            ln -sf pcre_jit_exec.3                   $(DESTDIR)$(man3dir)/pcre32_jit_exec.3
744          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
745          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
746          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 757  if WITH_PCRE_CPP
757  man_MANS = $(pcrecpp_man)  man_MANS = $(pcrecpp_man)
758  endif  endif
759    
760    # gcov/lcov code coverage reporting
761    
762    if WITH_GCOV
763    
764    # Coverage reporting targets:
765    #
766    # coverage: Create a coverage report from 'make check'
767    # coverage-baseline: Capture baseline coverage information
768    # coverage-reset: This zeros the coverage counters only
769    # coverage-report: This creates the coverage report only
770    # coverage-clean-report: This removes the generated coverage report
771    #   without cleaning the coverage data itself
772    # coverage-clean-data: This removes the captured coverage data without
773    #   removing the coverage files created at compile time (*.gcno)
774    # coverage-clean: This cleans all coverage data including the generated
775    #   coverage report.
776    
777    COVERAGE_TEST_NAME = $(PACKAGE)
778    COVERAGE_NAME = $(PACKAGE)-$(VERSION)
779    COVERAGE_OUTPUT_FILE = $(COVERAGE_NAME)-coverage.info
780    COVERAGE_OUTPUT_DIR = $(COVERAGE_NAME)-coverage
781    COVERAGE_LCOV_EXTRA_FLAGS =
782    COVERAGE_GENHTML_EXTRA_FLAGS =
783    
784    coverage_quiet = $(coverage_quiet_$(V))
785    coverage_quiet_ = $(coverage_quiet_$(AM_DEFAULT_VERBOSITY))
786    coverage_quiet_0 = --quiet
787    
788    coverage-check: all
789            -$(MAKE) $(AM_MAKEFLAGS) -k check
790    
791    coverage-baseline:
792            $(LCOV) $(coverage_quiet) \
793                    --directory $(top_builddir) \
794                    --output-file "$(COVERAGE_OUTPUT_FILE)" \
795                    --capture \
796                    --initial
797    
798    coverage-report:
799            $(LCOV) $(coverage_quiet) \
800                    --directory $(top_builddir) \
801                    --capture \
802                    --output-file "$(COVERAGE_OUTPUT_FILE).tmp" \
803                    --test-name "$(COVERAGE_TEST_NAME)" \
804                    --no-checksum \
805                    --compat-libtool \
806                    $(COVERAGE_LCOV_EXTRA_FLAGS)
807            $(LCOV) $(coverage_quiet) \
808                    --directory $(top_builddir) \
809                    --output-file "$(COVERAGE_OUTPUT_FILE)" \
810                    --remove "$(COVERAGE_OUTPUT_FILE).tmp" \
811                    "/tmp/*" \
812                    "/usr/include/*" \
813                    "$(includedir)/*"
814            -@rm -f "$(COVERAGE_OUTPUT_FILE).tmp"
815            LANG=C $(GENHTML) $(coverage_quiet) \
816                    --prefix $(top_builddir) \
817                    --output-directory "$(COVERAGE_OUTPUT_DIR)" \
818                    --title "$(PACKAGE) $(VERSION) Code Coverage Report" \
819                    --show-details "$(COVERAGE_OUTPUT_FILE)" \
820                    --legend \
821                    $(COVERAGE_GENHTML_EXTRA_FLAGS)
822            @echo "Code coverage report written to file://$(abs_builddir)/$(COVERAGE_OUTPUT_DIR)/index.html"
823    
824    coverage-reset:
825            -$(LCOV) $(coverage_quiet) --zerocounters --directory $(top_builddir)
826    
827    coverage-clean-report:
828            -rm -f "$(COVERAGE_OUTPUT_FILE)" "$(COVERAGE_OUTPUT_FILE).tmp"
829            -rm -rf "$(COVERAGE_OUTPUT_DIR)"
830    
831    coverage-clean-data:
832            -find $(top_builddir) -name "*.gcda" -delete
833    
834    coverage-clean: coverage-reset coverage-clean-report coverage-clean-data
835            -find $(top_builddir) -name "*.gcno" -delete
836    
837    coverage-distclean: coverage-clean
838    
839    coverage: coverage-reset coverage-baseline coverage-check coverage-report
840    clean-local: coverage-clean
841    distclean-local: coverage-distclean
842    
843    .PHONY: coverage coverage-baseline coverage-check coverage-report coverage-reset coverage-clean-report coverage-clean-data coverage-clean coverage-distclean
844    
845    else
846    
847    coverage:
848            @echo "Configuring with --enable-coverage required to generate code coverage report."
849    
850    endif # WITH_GCOV
851    
852  ## CMake support  ## CMake support
853    
854  EXTRA_DIST += \  EXTRA_DIST += \

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

  ViewVC Help
Powered by ViewVC 1.1.5