/[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 1172 by ph10, Wed Oct 24 16:41:07 2012 UTC
# Line 132  EXTRA_DIST += \ Line 132  EXTRA_DIST += \
132    pcre.h.generic \    pcre.h.generic \
133    config.h.generic    config.h.generic
134    
135  pcre.h.generic: configure.ac  # The only difference between pcre.h.in and pcre.h is the setting of the PCRE
136    # version number. Therefore, we can create the generic version just by copying.
137    pcre.h.generic: pcre.h.in configure.ac
138          rm -f $@          rm -f $@
139          cp -p pcre.h $@          cp -p pcre.h $@
140    
141  MAINTAINERCLEANFILES += pcre.h.generic  # It is more complicated for config.h.generic. We need the version that results
142    # from a default configuration. We can get this by doing a configure in a
143    # temporary directory. It has to be entirely done using files in that
144    # directory, because the source directory may already be configured. If you
145    # just try running configure in a new directory, it complains that the source
146    # directory is already configured.
147    config.h.generic: configure.ac
148            rm -rf $@ _generic
149            mkdir _generic
150            cp configure *.in _generic
151            (cd _generic; ./configure srcdir=.)
152            perl -pe 'if(/^#define\s(?!PACKAGE)(\w+)/){print"#ifndef $$1\n$$_#endif\n";$$_="";}' _generic/config.h >$@
153            rm -rf _generic
154    
155    MAINTAINERCLEANFILES += pcre.h.generic config.h.generic
156    
157  # 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
158  # it is generated from pcre.h.in.  # it is generated from pcre.h.in.
# Line 344  libpcre32_la_CFLAGS += $(VALGRIND_CFLAGS Line 360  libpcre32_la_CFLAGS += $(VALGRIND_CFLAGS
360  endif # WITH_PCRE32  endif # WITH_PCRE32
361  endif # WITH_VALGRIND  endif # WITH_VALGRIND
362    
363    if WITH_GCOV
364    if WITH_PCRE8
365    libpcre_la_CFLAGS += $(GCOV_CFLAGS)
366    endif # WITH_PCRE8
367    if WITH_PCRE16
368    libpcre16_la_CFLAGS += $(GCOV_CFLAGS)
369    endif # WITH_PCRE16
370    if WITH_PCRE32
371    libpcre32_la_CFLAGS += $(GCOV_CFLAGS)
372    endif # WITH_PCRE32
373    endif # WITH_GCOV
374    
375  CLEANFILES += pcre_chartables.c  CLEANFILES += pcre_chartables.c
376    
377  ## 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 379  if WITH_JIT
379  TESTS += pcre_jit_test  TESTS += pcre_jit_test
380  noinst_PROGRAMS += pcre_jit_test  noinst_PROGRAMS += pcre_jit_test
381  pcre_jit_test_SOURCES = pcre_jit_test.c  pcre_jit_test_SOURCES = pcre_jit_test.c
382    pcre_jit_test_CFLAGS = $(AM_CFLAGS)
383  pcre_jit_test_LDADD =  pcre_jit_test_LDADD =
384  if WITH_PCRE8  if WITH_PCRE8
385  pcre_jit_test_LDADD += libpcre.la  pcre_jit_test_LDADD += libpcre.la
# Line 361  endif # WITH_PCRE16 Line 390  endif # WITH_PCRE16
390  if WITH_PCRE32  if WITH_PCRE32
391  pcre_jit_test_LDADD += libpcre32.la  pcre_jit_test_LDADD += libpcre32.la
392  endif # WITH_PCRE32  endif # WITH_PCRE32
393    if WITH_GCOV
394    pcre_jit_test_CFLAGS += $(GCOV_CFLAGS)
395    pcre_jit_test_LDADD += $(GCOV_LIBS)
396    endif # WITH_GCOV
397  endif # WITH_JIT  endif # WITH_JIT
398    
399  ## 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.
400  if WITH_PCRE8  if WITH_PCRE8
401    
402  lib_LTLIBRARIES += libpcreposix.la  lib_LTLIBRARIES += libpcreposix.la
403  libpcreposix_la_SOURCES = \  libpcreposix_la_SOURCES = \
404    pcreposix.c    pcreposix.c
405    libpcreposix_la_CFLAGS = $(AM_CFLAGS)
406  libpcreposix_la_LDFLAGS = $(EXTRA_LIBPCREPOSIX_LDFLAGS)  libpcreposix_la_LDFLAGS = $(EXTRA_LIBPCREPOSIX_LDFLAGS)
407  libpcreposix_la_LIBADD = libpcre.la  libpcreposix_la_LIBADD = libpcre.la
408    
409    if WITH_GCOV
410    libpcreposix_la_CFLAGS += $(GCOV_CFLAGS)
411    endif # WITH_GCOV
412    
413  endif # WITH_PCRE8  endif # WITH_PCRE8
414    
415  ## There's a C++ library as well.  ## There's a C++ library as well.
# Line 381  libpcrecpp_la_SOURCES = \ Line 421  libpcrecpp_la_SOURCES = \
421    pcrecpp.cc \    pcrecpp.cc \
422    pcre_scanner.cc \    pcre_scanner.cc \
423    pcre_stringpiece.cc    pcre_stringpiece.cc
424    libpcrecpp_la_CXXFLAGS = $(AM_CXXFLAGS)
425  libpcrecpp_la_LDFLAGS = $(EXTRA_LIBPCRECPP_LDFLAGS)  libpcrecpp_la_LDFLAGS = $(EXTRA_LIBPCRECPP_LDFLAGS)
426  libpcrecpp_la_LIBADD = libpcre.la  libpcrecpp_la_LIBADD = libpcre.la
427    
428  TESTS += pcrecpp_unittest  TESTS += pcrecpp_unittest
429  noinst_PROGRAMS += pcrecpp_unittest  noinst_PROGRAMS += pcrecpp_unittest
430  pcrecpp_unittest_SOURCES = pcrecpp_unittest.cc  pcrecpp_unittest_SOURCES = pcrecpp_unittest.cc
431    pcrecpp_unittest_CXXFLAGS = $(AM_CXXFLAGS)
432  pcrecpp_unittest_LDADD = libpcrecpp.la  pcrecpp_unittest_LDADD = libpcrecpp.la
433    
434  TESTS += pcre_scanner_unittest  TESTS += pcre_scanner_unittest
435  noinst_PROGRAMS += pcre_scanner_unittest  noinst_PROGRAMS += pcre_scanner_unittest
436  pcre_scanner_unittest_SOURCES = pcre_scanner_unittest.cc  pcre_scanner_unittest_SOURCES = pcre_scanner_unittest.cc
437    pcre_scanner_unittest_CXXFLAGS = $(AM_CXXFLAGS)
438  pcre_scanner_unittest_LDADD = libpcrecpp.la  pcre_scanner_unittest_LDADD = libpcrecpp.la
439    
440  TESTS += pcre_stringpiece_unittest  TESTS += pcre_stringpiece_unittest
441  noinst_PROGRAMS += pcre_stringpiece_unittest  noinst_PROGRAMS += pcre_stringpiece_unittest
442  pcre_stringpiece_unittest_SOURCES = pcre_stringpiece_unittest.cc  pcre_stringpiece_unittest_SOURCES = pcre_stringpiece_unittest.cc
443    pcre_stringpiece_unittest_CXXFLAGS = $(AM_CXXFLAGS)
444  pcre_stringpiece_unittest_LDADD = libpcrecpp.la  pcre_stringpiece_unittest_LDADD = libpcrecpp.la
445    
446    if WITH_GCOV
447    libpcrecpp_la_CXXFLAGS += $(GCOV_CXXFLAGS)
448    pcrecpp_unittest_LDADD += $(GCOV_LIBS)
449    pcre_scanner_unittest_LDADD += $(GCOV_LIBS)
450    pcre_stringpiece_unittest_LDADD += $(GCOV_LIBS)
451    endif # WITH_GCOV
452    
453  endif # WITH_PCRE_CPP  endif # WITH_PCRE_CPP
454    
455  ## The main unit tests  ## The main unit tests
# Line 428  endif # WITH_PCRE32 Line 479  endif # WITH_PCRE32
479  if WITH_VALGRIND  if WITH_VALGRIND
480  pcretest_CFLAGS += $(VALGRIND_CFLAGS)  pcretest_CFLAGS += $(VALGRIND_CFLAGS)
481  endif # WITH_VALGRIND  endif # WITH_VALGRIND
482    if WITH_GCOV
483    pcretest_CFLAGS += $(GCOV_CFLAGS)
484    pcretest_LDADD += $(GCOV_LIBS)
485    endif # WITH_GCOV
486    
487  if WITH_PCRE8  if WITH_PCRE8
488  TESTS += RunGrepTest  TESTS += RunGrepTest
489  dist_noinst_SCRIPTS += RunGrepTest  dist_noinst_SCRIPTS += RunGrepTest
490  bin_PROGRAMS += pcregrep  bin_PROGRAMS += pcregrep
491  pcregrep_SOURCES = pcregrep.c  pcregrep_SOURCES = pcregrep.c
492    pcregrep_CFLAGS = $(AM_CFLAGS)
493  pcregrep_LDADD = $(LIBZ) $(LIBBZ2)  pcregrep_LDADD = $(LIBZ) $(LIBBZ2)
494  pcregrep_LDADD += libpcre.la libpcreposix.la  pcregrep_LDADD += libpcre.la libpcreposix.la
495    if WITH_GCOV
496    pcregrep_CFLAGS += $(GCOV_CFLAGS)
497    pcregrep_LDADD += $(GCOV_LIBS)
498    endif # WITH_GCOV
499  endif # WITH_PCRE8  endif # WITH_PCRE8
500    
501  EXTRA_DIST += \  EXTRA_DIST += \
# Line 484  EXTRA_DIST += \ Line 544  EXTRA_DIST += \
544    testdata/testinput20 \    testdata/testinput20 \
545    testdata/testinput21 \    testdata/testinput21 \
546    testdata/testinput22 \    testdata/testinput22 \
547      testdata/testinput23 \
548      testdata/testinput24 \
549      testdata/testinput25 \
550      testdata/testinput26 \
551    testdata/testinputEBC \    testdata/testinputEBC \
552    testdata/testoutput1 \    testdata/testoutput1 \
553    testdata/testoutput2 \    testdata/testoutput2 \
# Line 495  EXTRA_DIST += \ Line 559  EXTRA_DIST += \
559    testdata/testoutput8 \    testdata/testoutput8 \
560    testdata/testoutput9 \    testdata/testoutput9 \
561    testdata/testoutput10 \    testdata/testoutput10 \
   testdata/testoutput11-16 \  
562    testdata/testoutput11-8 \    testdata/testoutput11-8 \
563      testdata/testoutput11-16 \
564      testdata/testoutput11-32 \
565    testdata/testoutput12 \    testdata/testoutput12 \
566    testdata/testoutput13 \    testdata/testoutput13 \
567    testdata/testoutput14 \    testdata/testoutput14 \
568    testdata/testoutput15 \    testdata/testoutput15 \
569    testdata/testoutput16 \    testdata/testoutput16 \
570    testdata/testoutput17 \    testdata/testoutput17 \
571    testdata/testoutput18 \    testdata/testoutput18-16 \
572      testdata/testoutput18-32 \
573    testdata/testoutput19 \    testdata/testoutput19 \
574    testdata/testoutput20 \    testdata/testoutput20 \
575    testdata/testoutput21 \    testdata/testoutput21-16 \
576    testdata/testoutput22 \    testdata/testoutput21-32 \
577      testdata/testoutput22-16 \
578      testdata/testoutput22-32 \
579      testdata/testoutput23 \
580      testdata/testoutput24 \
581      testdata/testoutput25 \
582      testdata/testoutput26 \
583    testdata/testoutputEBC \    testdata/testoutputEBC \
584    testdata/wintestinput3 \    testdata/wintestinput3 \
585    testdata/wintestoutput3 \    testdata/wintestoutput3 \
# Line 677  if WITH_PCRE_CPP Line 749  if WITH_PCRE_CPP
749  man_MANS = $(pcrecpp_man)  man_MANS = $(pcrecpp_man)
750  endif  endif
751    
752    # gcov/lcov code coverage reporting
753    
754    if WITH_GCOV
755    
756    GCOV_NAME = $(PACKAGE)-$(VERSION)
757    GCOV_OUTPUT_FILE = $(GCOV_NAME)-coverage.info
758    GCOV_OUTPUT_DIR = $(GCOV_NAME)-coverage
759    GCOV_LCOV_FLAGS =
760    GCOV_GENHTML_FLAGS =
761    
762    gcov_quiet = $(gcov_quiet_$(V))
763    gcov_quiet_ = $(gcov_quiet_$(AM_DEFAULT_VERBOSITY))
764    gcov_quiet_0 = --quiet
765    
766    coverage-check: all
767            -$(MAKE) $(AM_MAKEFLAGS) -k check
768    
769    coverage-report:
770            $(LCOV) $(gcov_quiet) \
771                    --directory $(top_builddir) \
772                    --capture \
773                    --output-file "$(GCOV_OUTPUT_FILE).tmp" \
774                    --test-name "$(GCOV_NAME)" \
775                    --no-checksum \
776                    --compat-libtool \
777                    $(GCOV_LCOV_FLAGS)
778            $(LCOV) $(gcov_quiet) \
779                    --directory $(top_builddir) \
780                    --output-file "$(GCOV_OUTPUT_FILE)" \
781                    --remove "$(GCOV_OUTPUT_FILE).tmp" \
782                    "/tmp/*" \
783                    "/usr/include/*" \
784                    "$(includedir)/*"
785            -@rm -f "$(GCOV_OUTPUT_FILE).tmp"
786            LANG=C $(GENHTML) $(gcov_quiet) \
787                    --prefix $(top_builddir) \
788                    --output-directory "$(GCOV_OUTPUT_DIR)" \
789                    --title "$(PACKAGE) $(VERSION) Code Coverage Report" \
790                    --show-details "$(GCOV_OUTPUT_FILE)" \
791                    --legend \
792                    $(GCOV_GENHTML_FLAGS)
793            @echo "Code coverage report written to file://$(abs_builddir)/$(GCOV_OUTPUT_DIR)/index.html"
794    
795    coverage-clean:
796            -$(LCOV) $(gcov_quiet) --zerocounters --directory $(top_builddir)
797            -rm -f "$(GCOV_OUTPUT_FILE)"
798            -rm -f "$(GCOV_OUTPUT_FILE).tmp"
799            -rm -rf "$(GCOV_NAME)"
800            -find $(top_builddir) -name '*.gcda' -o -name "*.gcov" -delete
801    
802    coverage: coverage-check coverage-report
803    clean-local: coverage-clean
804    distclean-local: coverage-clean
805    
806    else
807    
808    coverage:
809            @echo "Configuring with --enable-coverage required to generate code coverage report."
810    
811    endif # WITH_GCOV
812    
813  ## CMake support  ## CMake support
814    
815  EXTRA_DIST += \  EXTRA_DIST += \

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

  ViewVC Help
Powered by ViewVC 1.1.5