/[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 1158 by chpe, Mon Oct 22 19:43:50 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 677  if WITH_PCRE_CPP Line 721  if WITH_PCRE_CPP
721  man_MANS = $(pcrecpp_man)  man_MANS = $(pcrecpp_man)
722  endif  endif
723    
724    # gcov/lcov code coverage reporting
725    
726    GCOV_NAME ?= $(PACKAGE)-$(VERSION)
727    GCOV_OUTPUT_FILE ?= $(GCOV_NAME)-coverage.info
728    GCOV_OUTPUT_DIR ?= $(GCOV_NAME)-coverage
729    GCOV_LCOV_FLAGS ?=
730    GCOV_GENHTML_FLAGS ?=
731    
732    gcov_quiet = $(gcov_quiet_$(V))
733    gcov_quiet_ = $(gcov_quiet_$(AM_DEFAULT_VERBOSITY))
734    gcov_quiet_0 = --quiet
735    
736    coverage-check: all
737            -$(MAKE) $(AM_MAKEFLAGS) -k check
738    
739    coverage-report:
740            $(LCOV) $(gcov_quiet) \
741                    --directory $(top_builddir) \
742                    --capture \
743                    --output-file "$(GCOV_OUTPUT_FILE).tmp" \
744                    --test-name "$(GCOV_NAME)" \
745                    --no-checksum \
746                    --compat-libtool \
747                    $(GCOV_LCOV_FLAGS)
748            $(LCOV) $(gcov_quiet) \
749                    --directory $(top_builddir) \
750                    --output-file "$(GCOV_OUTPUT_FILE)" \
751                    --remove "$(GCOV_OUTPUT_FILE).tmp" \
752                    "/tmp/*" \
753                    "/usr/include/*" \
754                    "$(includedir)/*"
755            -@rm -f "$(GCOV_OUTPUT_FILE).tmp"
756            LANG=C $(GENHTML) $(gcov_quiet) \
757                    --prefix $(top_builddir) \
758                    --output-directory "$(GCOV_OUTPUT_DIR)" \
759                    --title "$(PACKAGE) $(VERSION) Code Coverage Report" \
760                    --show-details "$(GCOV_OUTPUT_FILE)" \
761                    --legend \
762                    $(GCOV_GENHTML_FLAGS)
763            @echo "Code coverage report written to file://$(abs_builddir)/$(GCOV_OUTPUT_DIR)/index.html"
764    
765    coverage-clean:
766            -$(LCOV) $(gcov_quiet) --zerocounters --directory $(top_builddir)
767            -rm -f "$(GCOV_OUTPUT_FILE)"
768            -rm -f "$(GCOV_OUTPUT_FILE).tmp"
769            -rm -rf "$(GCOV_NAME)"
770            -find $(top_builddir) -name '*.gcda' -o -name "*.gcov" -delete
771    
772    coverage: coverage-check coverage-report
773    clean-local: coverage-clean
774    distclean-local: coverage-clean
775    
776  ## CMake support  ## CMake support
777    
778  EXTRA_DIST += \  EXTRA_DIST += \

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

  ViewVC Help
Powered by ViewVC 1.1.5