/[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 1161 by chpe, Mon Oct 22 22:05:07 2012 UTC
# Line 344  libpcre32_la_CFLAGS += $(VALGRIND_CFLAGS Line 344  libpcre32_la_CFLAGS += $(VALGRIND_CFLAGS
344  endif # WITH_PCRE32  endif # WITH_PCRE32
345  endif # WITH_VALGRIND  endif # WITH_VALGRIND
346    
347    if WITH_GCOV
348    if WITH_PCRE8
349    libpcre_la_CFLAGS += $(GCOV_CFLAGS)
350    endif # WITH_PCRE8
351    if WITH_PCRE16
352    libpcre16_la_CFLAGS += $(GCOV_CFLAGS)
353    endif # WITH_PCRE16
354    if WITH_PCRE32
355    libpcre32_la_CFLAGS += $(GCOV_CFLAGS)
356    endif # WITH_PCRE32
357    endif # WITH_GCOV
358    
359  CLEANFILES += pcre_chartables.c  CLEANFILES += pcre_chartables.c
360    
361  ## 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 363  if WITH_JIT
363  TESTS += pcre_jit_test  TESTS += pcre_jit_test
364  noinst_PROGRAMS += pcre_jit_test  noinst_PROGRAMS += pcre_jit_test
365  pcre_jit_test_SOURCES = pcre_jit_test.c  pcre_jit_test_SOURCES = pcre_jit_test.c
366    pcre_jit_test_CFLAGS = $(AM_CFLAGS)
367  pcre_jit_test_LDADD =  pcre_jit_test_LDADD =
368  if WITH_PCRE8  if WITH_PCRE8
369  pcre_jit_test_LDADD += libpcre.la  pcre_jit_test_LDADD += libpcre.la
# Line 361  endif # WITH_PCRE16 Line 374  endif # WITH_PCRE16
374  if WITH_PCRE32  if WITH_PCRE32
375  pcre_jit_test_LDADD += libpcre32.la  pcre_jit_test_LDADD += libpcre32.la
376  endif # WITH_PCRE32  endif # WITH_PCRE32
377    if WITH_GCOV
378    pcre_jit_test_CFLAGS += $(GCOV_CFLAGS)
379    pcre_jit_test_LDADD += $(GCOV_LIBS)
380    endif # WITH_GCOV
381  endif # WITH_JIT  endif # WITH_JIT
382    
383  ## 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.
384  if WITH_PCRE8  if WITH_PCRE8
385    
386  lib_LTLIBRARIES += libpcreposix.la  lib_LTLIBRARIES += libpcreposix.la
387  libpcreposix_la_SOURCES = \  libpcreposix_la_SOURCES = \
388    pcreposix.c    pcreposix.c
389    libpcreposix_la_CFLAGS = $(AM_CFLAGS)
390  libpcreposix_la_LDFLAGS = $(EXTRA_LIBPCREPOSIX_LDFLAGS)  libpcreposix_la_LDFLAGS = $(EXTRA_LIBPCREPOSIX_LDFLAGS)
391  libpcreposix_la_LIBADD = libpcre.la  libpcreposix_la_LIBADD = libpcre.la
392    
393    if WITH_GCOV
394    libpcreposix_la_CFLAGS += $(GCOV_CFLAGS)
395    endif # WITH_GCOV
396    
397  endif # WITH_PCRE8  endif # WITH_PCRE8
398    
399  ## There's a C++ library as well.  ## There's a C++ library as well.
# Line 381  libpcrecpp_la_SOURCES = \ Line 405  libpcrecpp_la_SOURCES = \
405    pcrecpp.cc \    pcrecpp.cc \
406    pcre_scanner.cc \    pcre_scanner.cc \
407    pcre_stringpiece.cc    pcre_stringpiece.cc
408    libpcrecpp_la_CXXFLAGS = $(AM_CXXFLAGS)
409  libpcrecpp_la_LDFLAGS = $(EXTRA_LIBPCRECPP_LDFLAGS)  libpcrecpp_la_LDFLAGS = $(EXTRA_LIBPCRECPP_LDFLAGS)
410  libpcrecpp_la_LIBADD = libpcre.la  libpcrecpp_la_LIBADD = libpcre.la
411    
412  TESTS += pcrecpp_unittest  TESTS += pcrecpp_unittest
413  noinst_PROGRAMS += pcrecpp_unittest  noinst_PROGRAMS += pcrecpp_unittest
414  pcrecpp_unittest_SOURCES = pcrecpp_unittest.cc  pcrecpp_unittest_SOURCES = pcrecpp_unittest.cc
415    pcrecpp_unittest_CXXFLAGS = $(AM_CXXFLAGS)
416  pcrecpp_unittest_LDADD = libpcrecpp.la  pcrecpp_unittest_LDADD = libpcrecpp.la
417    
418  TESTS += pcre_scanner_unittest  TESTS += pcre_scanner_unittest
419  noinst_PROGRAMS += pcre_scanner_unittest  noinst_PROGRAMS += pcre_scanner_unittest
420  pcre_scanner_unittest_SOURCES = pcre_scanner_unittest.cc  pcre_scanner_unittest_SOURCES = pcre_scanner_unittest.cc
421    pcre_scanner_unittest_CXXFLAGS = $(AM_CXXFLAGS)
422  pcre_scanner_unittest_LDADD = libpcrecpp.la  pcre_scanner_unittest_LDADD = libpcrecpp.la
423    
424  TESTS += pcre_stringpiece_unittest  TESTS += pcre_stringpiece_unittest
425  noinst_PROGRAMS += pcre_stringpiece_unittest  noinst_PROGRAMS += pcre_stringpiece_unittest
426  pcre_stringpiece_unittest_SOURCES = pcre_stringpiece_unittest.cc  pcre_stringpiece_unittest_SOURCES = pcre_stringpiece_unittest.cc
427    pcre_stringpiece_unittest_CXXFLAGS = $(AM_CXXFLAGS)
428  pcre_stringpiece_unittest_LDADD = libpcrecpp.la  pcre_stringpiece_unittest_LDADD = libpcrecpp.la
429    
430    if WITH_GCOV
431    libpcrecpp_la_CXXFLAGS += $(GCOV_CXXFLAGS)
432    pcrecpp_unittest_LDADD += $(GCOV_LIBS)
433    pcre_scanner_unittest_LDADD += $(GCOV_LIBS)
434    pcre_stringpiece_unittest_LDADD += $(GCOV_LIBS)
435    endif # WITH_GCOV
436    
437  endif # WITH_PCRE_CPP  endif # WITH_PCRE_CPP
438    
439  ## The main unit tests  ## The main unit tests
# Line 428  endif # WITH_PCRE32 Line 463  endif # WITH_PCRE32
463  if WITH_VALGRIND  if WITH_VALGRIND
464  pcretest_CFLAGS += $(VALGRIND_CFLAGS)  pcretest_CFLAGS += $(VALGRIND_CFLAGS)
465  endif # WITH_VALGRIND  endif # WITH_VALGRIND
466    if WITH_GCOV
467    pcretest_CFLAGS += $(GCOV_CFLAGS)
468    pcretest_LDADD += $(GCOV_LIBS)
469    endif # WITH_GCOV
470    
471  if WITH_PCRE8  if WITH_PCRE8
472  TESTS += RunGrepTest  TESTS += RunGrepTest
473  dist_noinst_SCRIPTS += RunGrepTest  dist_noinst_SCRIPTS += RunGrepTest
474  bin_PROGRAMS += pcregrep  bin_PROGRAMS += pcregrep
475  pcregrep_SOURCES = pcregrep.c  pcregrep_SOURCES = pcregrep.c
476    pcregrep_CFLAGS = $(AM_CFLAGS)
477  pcregrep_LDADD = $(LIBZ) $(LIBBZ2)  pcregrep_LDADD = $(LIBZ) $(LIBBZ2)
478  pcregrep_LDADD += libpcre.la libpcreposix.la  pcregrep_LDADD += libpcre.la libpcreposix.la
479    if WITH_GCOV
480    pcregrep_CFLAGS += $(GCOV_CFLAGS)
481    pcregrep_LDADD += $(GCOV_LIBS)
482    endif # WITH_GCOV
483  endif # WITH_PCRE8  endif # WITH_PCRE8
484    
485  EXTRA_DIST += \  EXTRA_DIST += \
# Line 484  EXTRA_DIST += \ Line 528  EXTRA_DIST += \
528    testdata/testinput20 \    testdata/testinput20 \
529    testdata/testinput21 \    testdata/testinput21 \
530    testdata/testinput22 \    testdata/testinput22 \
531      testdata/testinput23 \
532      testdata/testinput24 \
533      testdata/testinput25 \
534      testdata/testinput26 \
535    testdata/testinputEBC \    testdata/testinputEBC \
536    testdata/testoutput1 \    testdata/testoutput1 \
537    testdata/testoutput2 \    testdata/testoutput2 \
# Line 495  EXTRA_DIST += \ Line 543  EXTRA_DIST += \
543    testdata/testoutput8 \    testdata/testoutput8 \
544    testdata/testoutput9 \    testdata/testoutput9 \
545    testdata/testoutput10 \    testdata/testoutput10 \
   testdata/testoutput11-16 \  
546    testdata/testoutput11-8 \    testdata/testoutput11-8 \
547      testdata/testoutput11-16 \
548      testdata/testoutput11-32 \
549    testdata/testoutput12 \    testdata/testoutput12 \
550    testdata/testoutput13 \    testdata/testoutput13 \
551    testdata/testoutput14 \    testdata/testoutput14 \
552    testdata/testoutput15 \    testdata/testoutput15 \
553    testdata/testoutput16 \    testdata/testoutput16 \
554    testdata/testoutput17 \    testdata/testoutput17 \
555    testdata/testoutput18 \    testdata/testoutput18-16 \
556      testdata/testoutput18-32 \
557    testdata/testoutput19 \    testdata/testoutput19 \
558    testdata/testoutput20 \    testdata/testoutput20 \
559    testdata/testoutput21 \    testdata/testoutput21-16 \
560    testdata/testoutput22 \    testdata/testoutput21-32 \
561      testdata/testoutput22-16 \
562      testdata/testoutput22-32 \
563      testdata/testoutput23 \
564      testdata/testoutput24 \
565      testdata/testoutput25 \
566      testdata/testoutput26 \
567    testdata/testoutputEBC \    testdata/testoutputEBC \
568    testdata/wintestinput3 \    testdata/wintestinput3 \
569    testdata/wintestoutput3 \    testdata/wintestoutput3 \
# Line 677  if WITH_PCRE_CPP Line 733  if WITH_PCRE_CPP
733  man_MANS = $(pcrecpp_man)  man_MANS = $(pcrecpp_man)
734  endif  endif
735    
736    # gcov/lcov code coverage reporting
737    
738    if WITH_GCOV
739    
740    GCOV_NAME ?= $(PACKAGE)-$(VERSION)
741    GCOV_OUTPUT_FILE ?= $(GCOV_NAME)-coverage.info
742    GCOV_OUTPUT_DIR ?= $(GCOV_NAME)-coverage
743    GCOV_LCOV_FLAGS ?=
744    GCOV_GENHTML_FLAGS ?=
745    
746    gcov_quiet = $(gcov_quiet_$(V))
747    gcov_quiet_ = $(gcov_quiet_$(AM_DEFAULT_VERBOSITY))
748    gcov_quiet_0 = --quiet
749    
750    coverage-check: all
751            -$(MAKE) $(AM_MAKEFLAGS) -k check
752    
753    coverage-report:
754            $(LCOV) $(gcov_quiet) \
755                    --directory $(top_builddir) \
756                    --capture \
757                    --output-file "$(GCOV_OUTPUT_FILE).tmp" \
758                    --test-name "$(GCOV_NAME)" \
759                    --no-checksum \
760                    --compat-libtool \
761                    $(GCOV_LCOV_FLAGS)
762            $(LCOV) $(gcov_quiet) \
763                    --directory $(top_builddir) \
764                    --output-file "$(GCOV_OUTPUT_FILE)" \
765                    --remove "$(GCOV_OUTPUT_FILE).tmp" \
766                    "/tmp/*" \
767                    "/usr/include/*" \
768                    "$(includedir)/*"
769            -@rm -f "$(GCOV_OUTPUT_FILE).tmp"
770            LANG=C $(GENHTML) $(gcov_quiet) \
771                    --prefix $(top_builddir) \
772                    --output-directory "$(GCOV_OUTPUT_DIR)" \
773                    --title "$(PACKAGE) $(VERSION) Code Coverage Report" \
774                    --show-details "$(GCOV_OUTPUT_FILE)" \
775                    --legend \
776                    $(GCOV_GENHTML_FLAGS)
777            @echo "Code coverage report written to file://$(abs_builddir)/$(GCOV_OUTPUT_DIR)/index.html"
778    
779    coverage-clean:
780            -$(LCOV) $(gcov_quiet) --zerocounters --directory $(top_builddir)
781            -rm -f "$(GCOV_OUTPUT_FILE)"
782            -rm -f "$(GCOV_OUTPUT_FILE).tmp"
783            -rm -rf "$(GCOV_NAME)"
784            -find $(top_builddir) -name '*.gcda' -o -name "*.gcov" -delete
785    
786    coverage: coverage-check coverage-report
787    clean-local: coverage-clean
788    distclean-local: coverage-clean
789    
790    else
791    
792    coverage:
793            @echo "Configuring with --enable-coverage required to generate code coverage report."
794    
795    endif # WITH_GCOV
796    
797  ## CMake support  ## CMake support
798    
799  EXTRA_DIST += \  EXTRA_DIST += \

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

  ViewVC Help
Powered by ViewVC 1.1.5